The first “insurance policy” on record is probably the Codex Hammurabi, circa 1780 B.C., which you can still read in the original at the Louvre Museum in Paris if you are nimble with ancient Sumerian legalese. It avers that shippers whose goods were lost or stolen in transit would be compensated by the state. (How did shippers prove their claims? A sworn declaration before a god was good enough for the king of Babylon.)

Another 3,500 years or so passed before a catastrophe—the Great Fire of London in 1666—begat the first instance of “modern” insurance: a formal setup whereby people paid premiums to companies to bail them out in an emergency; actuaries for the companies set the premium rates based on risk of payout. Such insurance depended on advancements in higher mathematics—namely, probability theory. That development has been insurance’s lasting and profound legacy for modern life, coloring the way we think about so many things, including ourselves.

Mathematical probability theory began in the mid-16th century, when European scholars first applied hard analysis to gambling games. The goal, a hallmark of the Enlightenment, was to lay reason on randomness. Deadly storms, plagues and other misfortunes were understood to be merely unfortunate but natural (and rare) events, not portents—less scourges to be feared and more mysteries to be solved.

Thus did probability crunching find its way into modern science. Geneticists use it to divine the likelihood that parents will have children with a particular birth defect. Particle physicists use it to allay fears that the new supercollider will produce an Earth-swallowing black hole. We organize our lives—from indulgences to duties—with the probabilistic expiration date of our life span in mind. At every turn, we subconsciously intuit that this or that outcome is likely to happen, but those intuitions are pliable. It is the real-world testing of our biases—the scientific method—that confirms or kills them.

The legacy of insurance industry risk crunching is not all positive: its fingerprints are all over the recent massive upheaval on Wall Street. A formula published in 2000 by actuary David X. Li, who went on to head research divisions at Citigroup and Barclays Capital, and widely used by economists and bankers to estimate the risk of asset-backed securities borrowed a key component from life insurance. The formula, called a Gaussian cupola function, was not so much an application of actuarial science as a misapplication of it. As it turns out, the default risk of financial instruments cannot be predicted in the same way that, say, the death risk of spouses can.