Google has a small fleet of robotic cars that since autumn have driven themselves for thousands of miles on the streets of northern California without once striking a pedestrian, running a stoplight or having to ask directions. The cars’ ability to analyze enormous quantities of data—from cameras, radar sensors, laser-range finders—lies in the 18th-century math theorem known as Bayes’ rule. The formula has survived decades of controversy and marginalization to emerge as the cornerstone of some of the most sophisticated robotics projects now under way around the world.

Discovered by English clergyman Thomas Bayes, the formula is a simple one-liner: Initial Beliefs + Recent Objective Data = A New and Improved Belief. A modern form comes from French mathematician Pierre-Simon Laplace, who, by recalculating the equation each time he got new data, could distinguish highly probable hypotheses from less valid ones. One of his applications involved explaining why slightly more boys than girls were born in Paris in the late 1700s. After collecting demographic data from around the world for 30 years, he concluded that the boy-girl ratio is universal to humankind and determined by biology.

Many theoretical statisticians over the years have assailed Bayesian methods as subjective. Yet decision makers insist that they bring clarity when information is scarce and outcomes uncertain. During the 1970s John Nicholson, the U.S. submarine fleet commander in the Mediterranean, used Bayesian computer analysis to figure out the most probable paths of Soviet nuclear subs. Today Bayesian math helps sort spam from e-mail, assess medical and homeland security risks and decode DNA, among other things.

Now Bayes is revolutionizing robotics, says Sebastian Thrun, director of Stanford University’s Artificial Intelligence Laboratory and Google’s driverless car project. By expressing all information in terms of probability distributions, Bayes can produce reliable estimates from scant and uncertain evidence.

Google’s driverless cars update information gleaned from maps with new road and traffic data from sensors mounted atop the vehicles. Google hopes that robotic cars will one day halve the number of road fatalities, cut energy consumption, fit more densely onto crowded roads and free commuters for more productive activities—like dreaming up even better ways to use a 250-year-old theorem.