(Roughly) Daily

Posts Tagged ‘Pascal

“Patience’s design flaw became obvious for the first time in my life: the outcome is decided not during the course of play but when the cards are shuffled, before the game even begins. How pointless is that?”*…

A young girl sitting on the floor playing cards, with a glass on the side, surrounded by various cards spread out on a rug, and a fireplace in the background.

As Simone de Rochefort explains, Patience– or as we tend to know it, solitaire— illustrates the way in which some of humanity’s oldest toys are our most complex…

… last year, I got addicted to Solitaire.

Why me.

During the dark final days of 2024, I was averaging 12 wins per day in Sawayama Solitaire, one of the Solitaires created by developer Zachtronics. Sawayama Solitaire is a variant of Klondike — the one that’s been bundled into every version of Windows since 1990.

Some games of Sawayama Solitaire felt impossible. Some were absurdly easy. Most of them were a satisfying detangling of cards that had me immediately pressing that “new game” button once I got the win.

How was the most basic card game on Earth owning my life like this?

I think it’s because we don’t understand playing cards.

In 1969, as protests raged against the Vietnam War and counterculture made waves across the nation, a magician [and dear friend of Ricky Jay] named Persi Diaconis went to college.

Diaconis had been a professional magician since age 14, and was skilled in sleight-of-hand tricks. But it was probability that fascinated him.

He went on to take a degree in statistics. He became a world-renowned mathematician. In 1992, he proved that it takes seven riffle shuffles to truly randomize a 52-card deck, alongside fellow mathematician Dave Bayer. His research on card shuffling has implications for scientific fields as far-flung as the study of glass melting and the creation of magnets.

He doesn’t know how Solitaire works.

“One of the embarrassment of applied probability is that we can not analyze the original game of solitaire,” he wrote in the abstract for an academic talk called “The Mathematics of Solitaire,” given at the University of Washington in 1999. The talk has been given several times over the years, and is currently viewable on YouTube. One of his most recent appearances, in 2024, reiterates that despite all the technical advances we’ve made in science and mathematics, the complexity of cards is still somewhat a black box.

“What’s the chance of winning, how to play well, how do various changes of rules change the answers?” Diaconis wrote. “Surely you say, the computer can do this. Not at present, not even close.”

It’s not hard to see the relationship between magic and math. Cards contain limitless possibilities. In fact, math tells us there are more combinations of cards in a 52-card deck than there are atoms on Earth.

Writing for Quanta Magazine, Erica Klarreich asked mathematician Ron Graham what that means in practice. He told her, “If everyone had been shuffling decks of cards every second since the start of the Earth, you couldn’t touch 52 factorial,” the number of possible arrangements of a 52-card deck. Klarreich goes on: “Any time you shuffle a deck to the point of randomness, you have probably created an arrangement that has never existed before.”

So that’s nuts…

More amazement at “No one understands how playing cards work,” from @polygon.com‬.

And here:

* David Mitchell, Cloud Atlas

###

As we shuffle along, we might spare a thought for Christiaan Huygens; he died on this date in 1695. A mathematician, physicist, engineer, astronomer, and inventor, he was a key figure in the Scientific Revolution. In physics, Huygens made seminal contributions to optics and mechanics, while as an astronomer he studied the rings of Saturn and discovered its largest moon, Titan. As an engineer and inventor, he improved the design of telescopes and invented the pendulum clock, the most accurate timekeeper for almost 300 years. A talented mathematician and physicist, his works contain the first idealization of a physical problem by a set of mathematical parameters, and the first mathematical and mechanistic explanation of an unobservable physical phenomenon.

Relevantly to the piece above, Huygens also contributed to the development of probability theory and statistics. In 1665 he visited Paris and encountered the work of Fermat and Pascal, which led him to write what was, at the time, the most coherent presentation of a mathematical approach to games of chance in De Ratiociniis in Ludo Aleae (On reasoning in games of chance)– a work contains early game-theoretic ideas.

Portrait of Christiaan Huygens, a 17th-century mathematician and physicist, featuring curly hair and wearing an ornate robe with a decorative collar.

source

“Chance, too, which seems to rush along with slack reins, is bridled and governed by law”*…

And the history of our understanding of those laws is, as Tom Chivers explains (in an excerpt from his book, Everything is Predictable), both fascinating and illuminating…

Traditionally, the story of the study of probability begins in French gambling houses in the mid-seventeenth century. But we can start it earlier than that.

The Italian polymath Gerolamo Cardano had attempted to quantify the maths of dice gambling in the sixteenth century. What, for instance, would the odds be of rolling a six on four rolls of a die, or a double six on twenty-four rolls of a pair of dice?

His working went like this. The probability of rolling a six is one in six, or 1/6, or about 17 percent. Normally, in probability, we don’t give a figure as a percentage, but as a number between zero and one, which we call p. So the probability of rolling a six is p = 0.17. (Actually, 0.1666666… but I’m rounding it off.)

Cardano, reasonably enough, assumed that if you roll the die four times, your probability is four times as high: 4/6, or about 0.67. But if you stop and think about it for a moment, that can’t be right, because it would imply that if you rolled the die six times, your chance of getting a six would be one-sixth times six, or one: that is, certainty. But obviously it’s possible to roll six times and have none of the dice come up six.

What threw Cardano is that the average number of sixes you’ll see on four dice is 0.67. But sometimes you’ll see three, sometimes you’ll see none. The odds of seeing a six (or, separately, at least one six) are different.

In the case of the one die rolled four times, you’d get it badly wrong—the real answer is about 0.52, not 0.67—but you’d still be right to bet, at even odds, on a six coming up. If you used Cardano’s reasoning for the second question, though, about how often you’d see a double six on twenty-four rolls, it would lead you seriously astray in a gambling house. His math would suggest that, since a double six comes up one time in thirty-six (p ≈ 0.03), then rolling the dice twenty-four times would give you twenty-four times that probability, twenty-four in thirty-six or two-thirds (p ≈ 0.67, again).

This time, though, his reasonable but misguided thinking would put you on the wrong side of the bet. The probability of seeing a double six in twenty-four rolls is 0.49, slightly less than half. You’d lose money betting on it. What’s gone wrong?

A century or so later, in 1654, Antoine Gombaud, a gambler and amateur philosopher who called himself the Chevalier de Méré, was interested in the same questions, for obvious professional reasons. He had noticed exactly what we’ve just said: that betting that you’ll see at least one six in four rolls of a die will make you money, whereas betting that you’ll see at least one double six in twenty-four rolls of two dice will not. Gombaud, through simple empirical observation, had got to a much more realistic position than Cardano. But he was confused. Why were the two outcomes different? After all, six is to four as thirty-six is to twenty-four. He recruited a friend, the mathematician Pierre de Carcavi, but together they were unable to work it out. So they asked a mutual friend, the great mathematician Blaise Pascal.

The solution to this problem isn’t actually that complicated. Cardano had got it exactly backward: the idea is not to look at the chances that something would happen by the number of goes you take, but to look at the chances it wouldn’t happen…

… Pascal came up with a cheat. He wasn’t the first to use what we now call Pascal’s triangle—it was known in ancient China, where it is named after the mathematician Yang Hui, and in second-century India. But Pascal was the first to use it in problems of probability.

It starts with 1 at the top, and fills out each layer below with a simple rule: on every row, add the number above and to the left to the number above and to the right. If there is no number in one of those places, treat it as zero…

… Now, if you want to know what the possibility is of seeing exactly Y outcomes, say heads, on those seven flips:

It’s possible that you’ll see no heads at all. But it requires every single coin coming up tails. Of all the possible combinations of heads and tails that could come up, only one—tails on every single coin—gives you seven heads and zero tails.

There are seven combinations that give you one head and six tails. Of the seven coins, one needs to come up heads, but it doesn’t matter which one. There are twenty-one ways of getting two heads. (I won’t enumerate them all here; I’m afraid you’re going to have to trust me, or check.) And thirty-five of getting three.

You see the pattern? 1 7 21 35—it’s row seven of the triangle…

Pascal’s triangle is only one way of working out the probability of seeing some number of outcomes, although it’s a very neat way. In situations where there are two possible outcomes, like flipping a coin, it’s called a “binomial distribution.”

But the point is that when you’re trying to work out how likely something is, what we need to talk about is the number of outcomes— the number of outcomes that result in whatever it is you’re talking about, and the total number of possible outcomes. This was, I think it’s fair to say, the first real formalization of the idea of “probability.”..

On the historical origins of the science of probability and statistics: “Rolling the Dice: What Gambling Can Teach Us About Probability,” from @TomChivers in @lithub.

See also: Against the Gods, by Peter Bernstein.

And for a look at how related concepts shape thinking among quantum physicists, see “The S-Matrix Is the Oracle Physicists Turn to in Times of Crisis.”

* Boethius, The Consolation of Philosophy

###

As we roll the bones, we might send carefully-calculated birthday greetings to a central player in this saga, Abraham de Moivre; he was born on this date in 1667. A mathematician, he’s known for de Moivre’s formula, which links complex numbers and trigonometry, and (more relevantly to the piece above) for his work on the normal distribution and probability theory. de Moivre was the first to postulate the central limit theorem (TLDR: the probability distribution of averages of outcomes of independent observations will closely approximate a normal distribution)– a cornerstone of probability theory. And in his time, his book on probability, The Doctrine of Chances, was prized by gamblers.

source

“I used to measure the skies, now I measure the shadows of Earth”*…

From ancient Egyptian cubits to fitness tracker apps, humankind has long been seeking ever more ways to measure the world – and ourselves…

The discipline of measurement developed for millennia… Around 6,000 years ago, the first standardised units were deployed in river valley civilisations such as ancient Egypt, where the cubit was defined by the length of the human arm, from elbow to the tip of the middle finger, and used to measure out the dimensions of the pyramids. In the Middle Ages, the task of regulating measurement to facilitate trade was both privilege and burden for rulers: a means of exercising power over their subjects, but a trigger for unrest if neglected. As the centuries passed, units multiplied, and in 18th-century France there were said to be some 250,000 variant units in use, leading to the revolutionary demand: “One king, one law, one weight and one measure.”

It was this abundance of measures that led to the creation of the metric system by French savants. A unit like the metre – defined originally as one ten-millionth of the distance from the equator to the north pole – was intended not only to simplify metrology, but also to embody political ideals. Its value and authority were derived not from royal bodies, but scientific calculation, and were thus, supposedly, equal and accessible to all. Then as today, units of measurement are designed to create uniformity across time, space and culture; to enable control at a distance and ensure trust between strangers. What has changed since the time of the pyramids is that now they often span the whole globe.

Despite their abundance, international standards like those mandated by NIST and the International Organization for Standardization (ISO) are mostly invisible in our lives. Where measurement does intrude is via bureaucracies of various stripes, particularly in education and the workplace. It’s in school that we are first exposed to the harsh lessons of quantification – where we are sorted by grade and rank and number, and told that these are the measures by which our future success will be gauged…

A fascinating survey of the history of measurement, and a consideration of its consequences: “Made to measure: why we can’t stop quantifying our lives,” from James Vincent (@jjvincent) in @guardian, an excerpt from his new book Beyond Measure: The Hidden History of Measurement.

And for a look at what it takes to perfect one of the most fundamental of those measures, see Jeremy Bernstein‘s “The Kilogram.”

* “I used to measure the skies, now I measure the shadows of Earth. Although my mind was sky-bound, the shadow of my body lies here.” – Epitaph Johannes Kepler composed for himself a few months before he died

###

As we get out the gauge, we might send thoughtfully-wagered birthday greetings Blaise Pascal; he was born on this date in 1623.  A French mathematician, physicist, theologian, and inventor (e.g.,the first digital calculator, the barometer, the hydraulic press, and the syringe), his commitment to empiricism (“experiments are the true teachers which one must follow in physics”) pitted him against his contemporary René “cogito, ergo sum” Descartes– and was foundational in the acceleration of the scientific/rationalist commitment to measurement…

 source

Happy Juneteenth!

“Everything we care about lies somewhere in the middle, where pattern and randomness interlace”*…

True randomness (it’s lumpy)

We tend dramatically to underestimate the role of randomness in the world…

Arkansas was one out away from the 2018 College World Series championship, leading Oregon State in the series and 3-2 in the ninth inning of the game when Cadyn Grenier lofted a foul pop down the right-field line. Three Razorbacks converged on the ball and were in position to make a routine play on it, only to watch it fall untouched to the ground in the midst of them. Had any one of them made the play, Arkansas would have been the national champion.

Nobody did.

Given “another lifeline,” Grenier hit an RBI single to tie the game before Trevor Larnach launched a two-run homer to give the Beavers a 5-3 lead and, ultimately, the game. “As soon as you see the ball drop, you know you have another life,” Grenier said. “That’s a gift.” The Beavers accepted the gift eagerly and went on win the championship the next day as Oregon State rode freshman pitcher Kevin Abel to a 5-0 win over Arkansas in the deciding game of the series. Abel threw a complete game shutout and retired the last 20 hitters he faced.

The highly unlikely happens pretty much all the time…

We readily – routinely – underestimate the power and impact of randomness in and on our lives. In his book, The Drunkard’s Walk, Caltech physicist Leonard Mlodinow employs the idea of the “drunkard’s [random] walk” to compare “the paths molecules follow as they fly through space, incessantly bumping, and being bumped by, their sister molecules,” with “our lives, our paths from college to career, from single life to family life, from first hole of golf to eighteenth.” 

Although countless random interactions seem to cancel each another out within large data sets, sometimes, “when pure luck occasionally leads to a lopsided preponderance of hits from some particular direction…a noticeable jiggle occurs.” When that happens, we notice the unlikely directional jiggle and build a carefully concocted story around it while ignoring the many, many random, counteracting collisions.

As Tversky and Kahneman have explained, “Chance is commonly viewed as a self-correcting process in which a deviation in one direction induces a deviation in the opposite direction to restore the equilibrium. In fact, deviations are not ‘corrected’ as a chance process unfolds, they are merely diluted.”

As Stephen Jay Gould famously argued, were we able to recreate the experiment of life on Earth a million different times, nothing would ever be the same, because evolution relies upon randomness. Indeed, the essence of history is contingency.

Randomness rules.

Luck matters. A lot. Yet, we tend dramatically to underestimate the role of randomness in the world.

The self-serving bias is our tendency to see the good stuff that happens as our doing (“we worked really hard and executed the game plan well”) while the bad stuff isn’t our fault (“It just wasn’t our night” or “we simply couldn’t catch a break” or “we would have won if the umpiring hadn’t been so awful”). Thus, desirable results are typically due to our skill and hard work — not luck — while lousy results are outside of our control and the offspring of being unlucky.

Two fine books undermine this outlook by (rightly) attributing a surprising amount of what happens to us — both good and bad – to luck. Michael Mauboussin’s The Success Equation seeks to untangle elements of luck and skill in sports, investing, and business. Ed Smith’s Luck considers a number of fields – international finance, war, sports, and even his own marriage – to examine how random chance influences the world around us. For example, Mauboussin describes the “paradox of skill” as follows: “As skill improves, performance becomes more consistent, and therefore luck becomes more important.” In investing, therefore (and for example), as the population of skilled investors has increased, the variation in skill has narrowed, making luck increasingly important to outcomes.

On account of the growth and development of the investment industry, John Bogle could quite consistently write his senior thesis at Princeton on the successes of active fund management and then go on to found Vanguard and become the primary developer and intellectual forefather of indexing. In other words, the ever-increasing aggregate skill (supplemented by massive computing power) of the investment world has come largely to cancel itself out.

After a big or revolutionary event, we tend to see it as having been inevitable. Such is the narrative fallacy. In this paper, ESSEC Business School’s Stoyan Sgourev notes that scholars of innovation typically focus upon the usual type of case, where incremental improvements rule the day. Sgourev moves past the typical to look at the unusual type of case, where there is a radical leap forward (equivalent to Thomas Kuhn’s paradigm shifts in science), as with Picasso and Les Demoiselles

As Sgourev carefully argued, the Paris art market of Picasso’s time had recently become receptive to the commercial possibilities of risk-taking. Thus, artistic innovation was becoming commercially viable. Breaking with the past was then being encouraged for the first time. It would soon be demanded.

Most significantly for our purposes, Sgourev’s analysis of Cubism suggests that having an exceptional idea isn’t enough. For radical innovation really to take hold, market conditions have to be right, making its success a function of luck and timing as much as genius. Note that Van Gogh — no less a genius than Picasso — never sold a painting in his lifetime.

As noted above, we all like to think that our successes are earned and that only our failures are due to luck – bad luck. But the old expression – it’s better to be lucky than good – is at least partly true. That said, it’s best to be lucky *and* good. As a consequence, in all probabilistic fields (which is nearly all of them), the best performers dwell on process and diversify their bets. You should do the same…

As [Nate] Silver emphasizes in The Signal and the Noise, we readily overestimate the degree of predictability in complex systems [and t]he experts we see in the media are much too sure of themselves (I wrote about this problem in our industry from a slightly different angle…). Much of what we attribute to skill is actually luck.

Plan accordingly.

Taking the unaccountable into account: “Randomness Rules,” from Bob Seawright (@RPSeawright), via @JVLast

[image above: source]

* James Gleick, The Information: A History, a Theory, a Flood

###

As we contemplate chance, we might spare a thought for Oskar Morgenstern; he died on this date in 1977. An economist who fled Nazi Germany for Princeton, he collaborated with the mathematician John von Neumann to write Theory of Games and Economic Behavior, published in 1944, which is recognized as the first book on game theory— thus co-founding the field.

Game theory was developed extensively in the 1950s, and has become widely recognized as an important tool in many fields– perhaps especially in the study of evolution. Eleven game theorists have won the economics Nobel Prize, and John Maynard Smith was awarded the Crafoord Prize for his application of evolutionary game theory.

Game theory’s roots date back (at least) to the 1654 letters between Pascal and Fermat, which (along with work by Cardano and Huygens) marked the beginning of probability theory. (See Peter Bernstein’s marvelous Against the Gods.) The application of probability (Bayes’ rule, discrete and continuous random variables, and the computation of expectations) accounts for the utility of game theory; the role of randomness (along with the behavioral psychology of a game’s participants) explain why it’s not a perfect predictor.

source

Written by (Roughly) Daily

July 26, 2021 at 1:00 am

“The door handle is the handshake of the building”*…

 

door handle

Door handle and rose (1833–47), manufactured by Copeland & Garrett, Stoke-on-Trent. Victoria and Albert Museum, London

 

We have all become suddenly more aware of the moments when we cannot avoid touching elements of public buildings. Architecture is the most physical, most imposing and most present of the arts – you cannot avoid it yet, strangely, we touch buildings at only a very few points – the handrail, perhaps a light switch and, almost unavoidably, the door handle. This modest piece of handheld architecture is our critical interface with the structure and the material of the building. Yet it is often reduced to the most generic, cheaply made piece of bent metal which is, in its way, a potent critique of the value we place on architecture and our acceptance of its reduction to a commodified envelope rather than an expression of culture and craft.

Despite their ubiquity and pivotal role in the haptic experience of architecture, door handles remain oddly under-documented. There are no serious histories and only patchy surveys of design, mostly sponsored by manufacturers. Yet in the development of the design of the door handle we have, in microcosm, the history of architecture, a survey of making and a measure of the development of design and how it relates to manufacture, technology and the body.

For as long as there have been doors there have been door handles…

An appreciation of the apparati of accessibility: “Points of contact – a short history of door handles.”

* Juhani Pallasmaa, The Eyes of the Skin: Architecture and the Senses

###

As we get a grip, we might send thoughtfully-wagered birthday greetings to a man whose thought open a great many (metaphorical) doors, Blaise Pascal; he was born on this date in 1623.  A French mathematician, physicist, theologian, and inventor (e.g.,the first digital calculator, the barometer, the hydraulic press, and the syringe), his commitment to empiricism (“experiments are the true teachers which one must follow in physics”) pitted him against his contemporary René “cogito, ergo sum” Descartes…

 source

Happy Juneteenth!

 

Written by (Roughly) Daily

June 19, 2020 at 1:01 am