
Origins
How Gambling Invented the Math That Now Trains Machines
The math behind machine learning begins with gamblers, probability, and centuries of thinking about chance and error.

Origins
The math behind machine learning begins with gamblers, probability, and centuries of thinking about chance and error.
Welcome to Origins. In this program we explore the technological and scientific roots of the modern world. Let's begin.
There is a certain kind of human impatience that keeps showing up in the history of ideas: the refusal to accept uncertainty as a permanent condition. Storms arrive without warning. Crops fail. Ships vanish. A child survives one winter and not the next. And for most of human time, the best tool for facing the unknown was ritual—charms, omens, sacrifices, stories that made randomness feel negotiable.
Then, in the middle of the seventeenth century, something wonderfully unromantic happened. Well-off Europeans began to gamble with enough regularity—and enough money—that “luck” stopped being a mood and started being a question. When a game is interrupted, who deserves the pot? If two players have different chances to win, how should that be divided fairly? These sound like tavern problems. They turned out to be the seed crystals for a new kind of thinking.
In 1654, a nobleman and avid gambler—known as the Chevalier de Méré—pestered his mathematically gifted friends with puzzles about dice. Blaise Pascal took the bait and began a correspondence with Pierre de Fermat. The letters were not written like a textbook. They read like hurried problem-solving between people trying to outthink chance itself. But out of those exchanges came a radical move: treat uncertain outcomes as things that can be counted, combined, and priced. Probability, in a modern sense, did not arrive from a clean philosophical system. It arrived from people who wanted to settle bets without fistfights.
Soon the dice table connected to something darker: the city as a machine that produces both order and tragedy. In London, weekly “Bills of Mortality” listed deaths and their supposed causes. At first these were public warnings—early signals of plague and contagion. But in the 1660s, a haberdasher named John Graunt looked at those lists and saw not just grief, but pattern. The numbers wobbled, yet they wobbled around stable averages. Whole populations, taken together, behaved with a kind of statistical regularity that no single life could promise.
That insight was morally strange and intellectually powerful. It suggested that uncertainty could be managed at the level of crowds even if it remained brutal at the level of individuals. Insurance, pensions, and annuities followed. So did the notion that a government could plan—tax, provision, build—using tables rather than prayers.
Astronomy then gave probability an even sharper edge. The sky looks eternal, but measurements are not. Early telescopes and instruments produced readings smeared by wind, imperfect lenses, tired eyes, and vibrating floors. So a practical question emerged: if several measurements disagree, which one should be trusted?
Around 1800, a method took hold that still lives quietly inside modern software: least squares. The idea is almost embarrassingly simple. Choose the value that makes the total error—as measured by squared deviations—as small as possible. Carl Friedrich Gauss and Adrien-Marie Legendre both became associated with it. What mattered was not priority but the concept: error could be modeled, and a best estimate could be extracted from messy observations without pretending the mess wasn’t there.
This is where the story begins to feel contemporary. Least squares is not just a trick for orbits. It is a philosophy of learning from data: propose a model, compare it to reality, penalize mistakes, adjust the model to reduce the penalty. That loop—guess, measure, correct—has been a backbone of science for centuries. Machine learning did not invent it; machine learning industrialized it.
In the nineteenth century, the new mathematics of uncertainty wandered into the human sciences, sometimes with noble intentions, sometimes with ugly consequences. Adolphe Quetelet argued that societies have averages as real as physical constants. Francis Galton, fascinated by heredity and measurement, noticed that extreme traits tend to be followed by more moderate ones—a phenomenon he called “regression toward the mean.” The phrase sounds like a technical footnote. In practice it describes a trap that catches the mind again and again: confusing reversion to typical outcomes with the effect of an intervention.
From there came correlation, a way to measure how tightly two quantities move together. Correlation became a power tool: in economics, in psychology, in engineering. It also became a temptation, because correlation does not reveal cause. This was another milestone in the human relationship with uncertainty: not every pattern is a lever.
Then the twentieth century arrived with factories, fertilizers, and mass production—systems in which small improvements mattered enormously. Ronald Fisher, working in agricultural research, formalized the logic of experiments: randomization, control groups, replication, and the careful separation of signal from noise. This was not just about crops. It was about discipline—ways to keep wishful thinking from masquerading as discovery.
By the time computers became common, the mathematics of probability and statistics was already a mature toolkit waiting for a new kind of muscle. Computers made it feasible to fit enormous models, test countless hypotheses, and optimize complex functions by repeating small corrections millions of times. The old dream—taming uncertainty—suddenly had electricity and silicon behind it.
And that brings the story to the present moment, where “learning” machines reshape the environment that humans must then adapt to. A recommendation system changes what people watch, and what people watch changes culture, and culture changes the data that trains the next system. This is recursion with consequences.
The roots of this are not mystical. They are human and familiar: a gambler wanting a fair division, a city clerk counting deaths, an astronomer squinting at a jittery measurement, a researcher trying to separate real improvement from coincidence. Under candlelight, in noisy rooms, with paper stained by ink and impatience, a method was assembled for negotiating with the unknown.
Uncertainty never left. But it became something that could be quantified, argued over, improved—sometimes even trusted. And in that quiet shift, a species that once asked the gods for signs learned to ask the data for odds.
That’s all for today’s Origins. If the modern world feels like it runs on algorithms, it helps to remember the older engine underneath: the long, stubborn effort to make chance speak in numbers, and to make those numbers do honest work.
Your Daily Knowledge Companion
Get the app
Get the app