Math paradoxes

Glossary / Binomial distribution

Glossary · binomial distribution

How often do 100 tosses give exactly 50 heads?

The coin is fair, so half heads is what everyone expects. And exactly 50 really does come up more often than any other number: more often than 49, 51 or 60. But does "most likely" mean it usually happens? Guess first, then toss a few thousand coins.

In plain wordspictures, analogies, small numbers

“In plain words” is hidden on all puzzles.

The fifty heads paradox

Someone tosses a coin 100 times and counts the heads. Then another 100 times, and again. In what share of these series will there be exactly 50 heads?

Pick an answer and the coins will fly.

Why: the peak has many neighbours

Picture 101 baskets, from "0 heads" to "100 heads", and series landing in them. The "50" basket gets the most, but not by much: 49 and 51 come up almost as often (7.8% each against 8.0%), 48 and 52 a little less, and so on. All these neighbours together take the rest. The most likely result is only slightly better than a dozen close rivals, so on its own it is rare.

That is the plain-words explanation, with no formulas. The exact numbers and where exactly 8% comes from are below, in the strict layer.

Exactly half gets rarer, roughly half gets more certain

The more coins, the harder it is to hit exactly half: there are more possible results, and each one becomes rarer. But landing "roughly at half", between 40% and 60% heads, gets easier and easier. Move the number-of-coins slider.

Exactly half heads–
Between 40% and 60% heads–

Exact probabilities, not a simulation. Horizontally, the share of heads; the grey band is 40% to 60%. Each chart is scaled to its own peak.

Both facts are true at once, and there is no contradiction. The share of heads presses ever closer to half: that is the law of large numbers. But the number of heads spreads ever wider, by about √n either way, so hitting one particular number gets harder.

Rigoroustables, charts, formulas

“Rigorous” is hidden on all puzzles.

What the binomial distribution is

Take n identical tries. Each succeeds with the same chance p, and the tries do not affect one another. Count how many succeed. The binomial distribution says how likely each possible number of successes is, from 0 to n. A coin, a die, a visitor who buys or doesn't, a part that is sound or faulty — it is all the same.

It is easiest to see with four coins. There are 2 · 2 · 2 · 2 = 16 different sequences of heads (H) and tails (T), all equally likely. Group them by the number of heads:

1/160 headsTTTT
4/161 headHTTT …
6/162 headsHHTT …
4/163 headsHHHT …
1/164 headsHHHH

The numbers 1, 4, 6, 4, 1 are a row of Pascal's triangle: the number of ways to choose which coins land heads. The middle wins because the most paths lead there. Yet even here "exactly half" happens in only 6 cases out of 16, that is 37.5%.

P(k) = C(n, k) · pk · (1 − p)n − k

C(n, k) is the number of ways to choose which k of the n tries succeed, and pk(1 − p)n − k is the probability of each such way. The average number of successes is np, the standard deviation √(np(1 − p)). For 100 coins: mean 50, standard deviation 5, and P(50) = C(100, 50) / 2100 ≈ 0.0796.

The question Pepys sent to Newton

In 1693 the English official and famous diarist Samuel Pepys wrote to Isaac Newton with a question about dice. Which bet has the best chance?

  • ARoll 6 dice and get at least one six
  • BRoll 12 dice and get at least two sixes
  • CRoll 18 dice and get at least three sixes

Pick a bet and the dice will roll.

A few more traps

  • Two and two is not the most commonA family has four children. If boys and girls are equally likely, "two and two" happens in 6 families out of 16 (37.5%), while "three and one" either way happens in 8 out of 16 (50%). The single most likely split loses to the pair of less even ones.
  • Expecting one sixIn 6 rolls of a die one six comes up on average. But exactly one happens only 40.2% of the time, and none at all 33.5%. A third of attempts fall short of even the average.
  • One in a thousand, a thousand triesIt feels like it should then happen "for sure". In fact it never happens 36.8% of the time. That is almost exactly 1/e, and this is how the binomial distribution for rare events turns into the Poisson distribution.
  • A good free-throw shooterA player makes 70% of free throws. Out of 10 shots, 7 is the most likely number, but exactly 7 happens in only 26.7% of series. A coach drawing conclusions after 5 or 9 makes should remember that.

When to count successes the binomial way

  • Buyers on a websiteEach of 1,000 visitors buys with the same chance. The number of purchases is binomial, so two identical pages give different numbers by pure chance. A/B tests are built on this.
  • Defects in productionHow many faulty parts will a batch of 500 have if the defect rate is 1%? The binomial distribution tells you when 9 faulty parts is still ordinary chance and when it is a reason to stop the line.
  • PollsEach person polled says "yes" with probability equal to the share of supporters. That gives the poll's margin of error: for 1,000 people and half supporters, ±3 percentage points.
  • When it is not binomialIf the tries depend on one another (a sick person infects a neighbour, a buyer recommends to a friend), the chance changes from try to try, or you draw without replacement from a small urn, the formula gives wrong numbers. Usually the spread is then wider than it promises.
Deepergeneralisations, theory, history

“Deeper” is hidden on all puzzles.

Why the peak falls like 0.8 / √n

P(exactly n/2 heads) = C(n, n/2) / 2n ≈ √(2 / (πn)) ≈ 0,8 / √n

The approximation comes from Stirling's formula for factorials. The meaning is simple: the number of heads spreads by √n / 2, so all the probability is smeared over about √n neighbouring numbers, and each gets a share of order 1/√n. To halve the chance of exactly half you need four times as many coins.

Coins nExact√(2 / (πn))
1024,61%25,23%
1007,959%7,979%
1 0002,523%2,523%
10 0000,7979%0,7979%

Toss some series of coins above, and your result for 100 tosses will appear here.

From coins to the bell

In 1733 Abraham de Moivre was looking for a quick way to add up binomial probabilities for large n, since multiplying giant factorials by hand is impossible. He noticed that the bars of a binomial distribution with mean np and standard deviation √(np(1 − p)) lie on one and the same smooth curve. It was later named the normal distribution. That is why for large n all the slider charts above look like the same bell, only narrower.

Rare events: the Poisson limit

n → ∞, p → 0, np = λ:   C(n, k) pk (1 − p)n − k → e−λ λk / k!

When there are very many tries and each has a tiny chance, only the average number of successes λ matters. A thousand tries with chance 1/1000: no success with probability 0.9991000 ≈ 0.3677, and Poisson's formula gives e−1 ≈ 0.3679. Exactly one success: 0.3681 against 0.3679. Siméon Denis Poisson derived this limit in 1837 in a book on the probability of court verdicts. Rare events scattered at random in time are counted the same way, as a Poisson process: calls to a help line, accidents, decaying atoms.

A little history

  • Pascal and the triangleIn the 17th century Blaise Pascal tabulated the numbers of ways to choose k out of n. For a coin that is the binomial distribution itself, just without dividing by 2n.
  • Jacob BernoulliHe derived the distribution for any chance p and proved the first law of large numbers. His book "Ars Conjectandi" came out in 1713, after the author's death. That is why a single such try is still called a Bernoulli trial.
  • Newton calculated right, explained wrongIn 2006 the historian of statistics Stephen Stigler showed that Newton's numbers for Pepys's problem were flawless but his short verbal explanation was wrong: it would equally "prove" the answer for loaded dice, where the answer is different.

Where it shows up

More on “Probability”

All terms →