Lambdia

A Hundred Heads in a Row: the Answer Is Not One Half

Coins have no memory, which is true, and nobody said this coin is fair, which is the whole problem. A fair coin explains the run with probability two to the minus one hundred while a two-headed coin explains it every time. The article locates the threshold exactly and reconciles the answer with the companion piece on ten heads, which asks a different question about a different setup.

A coin has landed heads one hundred times in a row. What is the chance the next toss is heads?

The trained answer is one half, and the reasoning behind it is impeccable: coins have no memory, past tosses do not influence future ones, and believing otherwise is the gambler's fallacy. Every clause of that is true. It is also the answer to a question nobody asked, because nowhere in the problem does anybody say the coin is fair.

Two stories fit the evidence

Suppose that before any toss the coin is a trick coin with heads on both faces with probability qq, and an ordinary fair coin otherwise. Now compare how well each story explains what happened. A fair coin produces a hundred heads with probability

2100=11,267,650,600,228,229,401,496,703,205,3762^{-100} = \frac{1}{1{,}267{,}650{,}600{,}228{,}229{,}401{,}496{,}703{,}205{,}376}
(1)

a denominator with thirty-one digits. A two-headed coin produces it every single time, with probability 11. The evidence favours the trick coin by a factor of 21002^{100}, and no starting doubt anybody would defend out loud is small enough to overturn that.

Fig. 1 — The two explanations, on the only scale that fits them both. The gap is what the intuition about coin memory is up against.

The number, and the honest boundary

Weighing the two stories by how well each explains the run gives the chance the coin is a trick coin,

P(trick100 heads)=qq+(1q)2100P(\text{trick} \mid \text{100 heads}) = \frac{q}{q + (1-q)\,2^{-100}}
(2)

and since a trick coin always shows heads while a fair one shows heads half the time, the chance the next toss is heads is the average of one and one half weighted by (2):

P(next=H)=1+P(trick100 heads)2P(\text{next} = H) = \frac{1 + P(\text{trick} \mid \text{100 heads})}{2}
(3)

Put in a starting chance of one in a thousand that the coin is a trick coin, and (3) exceeds 110271 - 10^{-27}. Drop the doubt to one in a billion and it still exceeds 110211 - 10^{-21}. Drop it to one in a billion billion and the answer is still above 0.990.99. The conclusion is not delicate.

Where the argument stops

At q=0q = 0, meaning certainty that the coin is fair, equation (2) returns 00 and equation (3) returns exactly 1/21/2. So one half is the correct answer to the question in which fairness is given. What is wrong in the reflex answer is the premise, never the arithmetic that follows from it.

There is a real threshold and it is worth locating. Asking for P(next=H)0.99P(\text{next}=H) \ge 0.99 means asking for (2) to reach 0.980.98, which rearranges to

q1q    492100    3.9×1029\frac{q}{1-q} \;\ge\; 49 \cdot 2^{-100} \;\approx\; 3.9 \times 10^{-29}
(4)

Below that the argument weakens, and it is honest to say so: a starting doubt of exactly 21002^{-100} gives (3) the value 0.750.75, not 0.990.99. But 4×10294 \times 10^{-29} is an absurdly small threshold. It corresponds to being so sure the coin is fair that you would expect to inspect roughly twenty-five billion billion billion coins before meeting a single trick one.

Fig. 2 — The whole transition happens inside two orders of magnitude, and both of them are unreasonably small starting doubts.

A hundred is not decoration

Run the same calculation on shorter runs, keeping the starting doubt at one in a thousand. After one head the answer is 0.50100.5010. After ten heads it is 0.75310.7531. After a hundred it is one to twenty-seven decimal places. The length of the run is carrying the conclusion, and a version of this problem with three heads in it would deserve the reflex answer.

The pattern matters as much as the count. A hundred heads makes a two-headed coin available as a rival explanation, which is why the likelihood ratio is as brutal as 21002^{100}. A hundred tosses that alternated perfectly would be equally improbable for a fair coin, but no simple trick coin explains them, so the natural rivals are much weaker and the conclusion much softer.

The conclusion without naming a rival

A fair objection to everything above is that it depends on the rival being a coin that always shows heads. Weaken the rival to a coin with a bias of 0.60.6 and the answer converges to 0.60.6, which is well short of certainty. So "almost one" is doing work that the two-headed hypothesis supplied.

The fix is to stop naming a rival at all. Put a flat spread over the coin's unknown bias θ\theta on [0,1][0,1], observe nn heads out of nn tosses, and the chance the next toss is heads works out to

n+1n+2=101102=0.9902\frac{n+1}{n+2} = \frac{101}{102} = 0.9902\ldots
(5)

a result known as the rule of succession. It names no trick coin, assumes nothing about how the coin was made, and still lands near one. The two models disagree in the third decimal place and agree completely on the point at issue, which is that the answer is nowhere near one half.

Why a companion article answers one half

Four days from this one in the feed sits a piece on ten heads in a row, whose answer is a coin flip. The two are consistent, and the reason is worth spelling out because a reader who meets both is entitled to think one of them is wrong.

Three things differ. That problem specifies the coin's provenance outright, a bag of a thousand coins with exactly one two-headed, so q=1/1000q = 1/1000 is given rather than assumed. The run there is ten heads, not a hundred, so the likelihood ratio is 210=10242^{10} = 1024 rather than 21002^{100}. And the question asked is different: it asks for the probability that the coin in your hand is the rigged one, which comes out at 1024/2023=0.50621024/2023 = 0.5062, just past even money.

Ask that setup the question this article asks, and (3) gives

1+102420232=30474046=0.7531\frac{1 + \tfrac{1024}{2023}}{2} = \frac{3047}{4046} = 0.7531\ldots
(6)

which is not one half either. So the two articles never assign different values to the same quantity. One reports a posterior on the coin, the other a prediction about the next toss, and even the tidy-looking 1024/20231024/2023 stops looking like a coin flip the moment you ask it to predict something.

What the gambler's fallacy warning is actually for

The standard warning targets a belief that tails is now due, that a fair coin compensates for its history. It does not, and the warning is correct. The error in this problem runs the other way: it takes an assumption that was never granted, treats it as given, and then reasons about it flawlessly. Both errors involve the phrase "coins have no memory", and only one of them is a mistake about coins.

In practice this is why the useful question is never "what is the probability" but "what am I conditioning on". A hundred heads is not evidence about the next toss of a fair coin. It is overwhelming evidence about which kind of coin you are holding, and the next toss follows from that.

Sources and further reading

Every number above was computed in exact rational arithmetic rather than floating point, because the two quantities being compared differ by thirty orders of magnitude and a double would round the interesting one to zero. Starting doubts from one in ten down to one in a billion billion were checked, the crossover in (4) was located exactly, and the flat-spread model was verified independently to give 101/102101/102.

Comments · 0

Be the first to comment.