← All 70 questions
Question 5·Trinity College·2025·Standard first-round question, reachable by every candidate and discriminating in practice — the difficulty is the direction of the conditioning and the number sense around 128, 129 and 256, not the algebra
Bayes' theorem in odds form: posterior odds = prior odds × likelihood ratio, with the pile of coins as the base rate
6–10 minutes at interview pace, longer if the generalisation is pursued
Live video, shared whiteboard. Everything under BOARD is written with the pen; everything under SAY is spoken over it, at the same time. Never write a line in silence, and never say a line you have not put on the board.
There is a pile of 129 coins on a table, all unbiased except for one which has heads on both sides. Bob chooses a coin at random and tosses it eight times. The coin comes up heads every time. What is the probability that he chose the double-headed coin?
Answer: 23 — posterior odds 2:1, from prior odds 1:128 times the likelihood ratio 256:1, converted by o↦o/(1+o)

The whiteboard, beat by beat

1 · Orient · beat 1 of 9

Guess the size of the answer before touching the algebra

D=double-headed coin
N=it is fair
E8=all eight tosses show heads
129=27+1,28=256=2⋅128
guess: odds against D: 1:128, favours D: 256
⇒ P(D|E8)>12,near 23
What you say, out loud

Let me name the objects before I compute with any of them. D is that Bob picked the double-headed coin, N is that he picked a fair one, and E eight is that all eight tosses came up heads. What the question asks is the probability of D given E eight; that is a statement about the coin, not about the tosses. The reversal is the whole difficulty.

I also want the two numbers on the board at once, because they are not accidental: one hundred and twenty-nine is two to the seven plus one, and two to the eight is two hundred and fifty-six, which is exactly twice one hundred and twenty-eight. That is the seam this question is built on. I will come back to it.

So let me guess out loud before I prove anything. Picking the odd coin is a one in one hundred and twenty-nine shot, so the odds are one to one hundred and twenty-eight against. Eight heads is two hundred and fifty-six times more likely on the double-headed coin. That is exactly twice the disadvantage, nothing more than that. So I expect the answer comfortably above a half, somewhere near two over three. Now let me earn it.

Why this beat exists: Examiners here listen for an estimate given and then defended. Naming the events and guessing the magnitude, both before any formula, is the opening move.
2 · Set up · beat 2 of 9

Priors and likelihoods in two columns that never mix

priors:P(D)=1129,P(N)=128129,P(D)+P(N)=1
likelihoods:P(E8|D)=18=1,P(E8|N)=(12)8=1256
asked for: P(D|E8)
E8=all eight heads
What you say, out loud

Two columns, and I will not let them mix. The prior column is about the pile: one coin in one hundred and twenty-nine is double-headed, so the prior on D is one over one hundred and twenty-nine and the prior on N is one hundred and twenty-eight over one hundred and twenty-nine. Note it is one hundred and twenty-eight fair coins, not one hundred and twenty-nine.

The likelihood column is about the tosses, conditional on which coin we hold. On the double-headed coin heads is certain every time, so eight heads has likelihood one to the eighth, which is one. On a fair coin the tosses are independent given the coin, so eight heads in a row is one half to the eighth, that is one over two hundred and fifty-six.

One assumption I want stated rather than smuggled in: the evidence is that all eight are heads, not that at least one is. At least one head on a fair coin has probability one minus one over two hundred and fifty-six, which is nearly one and would change the entire answer. And Bob gains no other information; he never looks at the second face of the coin.

Why this beat exists: Writing priors and likelihoods as two labelled columns is what turns the odds form in beat 4 into a one-line job.
3 · Draw · beat 3 of 9

Surviving mass: the picture already contains the answer

P(D∩E8)=1129⋅1=1129=2258,P(N∩E8)=128129⋅1256=1129⋅12=1258
one block =1258 of mass
128256=12(never 12833024)
3 surviving blocks in all,2 of them the fake coin: P = 2/3posterior odds 2 : 1 =prior odds 1 : 128 times likelihood ratio 256 : 1the fake coina fair coin1/2581/2581/2581/129 times 1 = 2/258128/129 times 1/256 = 1/258total surviving mass 2/258 + 1/258 = 3/258 = 1/86 = P(E_8);one block is 1/258both columns on one common scale, so area equals probability
Because both columns are drawn on one scale, area is probability: after eight heads the fake branch holds 2/258 and the fair branch 1/258 — two equal blocks against one — so the surviving mass is split 2 to 1 and exactly 2/3 of it is the double-headed coin.
What you say, out loud

I want this as a picture, because the argument is really about mass. Take total probability as an area, and cut it the way the pile is cut: a narrow strip of one over one hundred and twenty-nine for the odd coin, the rest for the fair ones. Then flood each branch with its chance of surviving eight heads. The fake strip survives with probability one and keeps everything; the fair branch survives with probability one over two hundred and fifty-six.

The only multiplication worth doing is one hundred and twenty-eight over two hundred and fifty-six, and that is a clean one half. So the fair branch is left holding exactly half of what the fake branch holds. I deliberately do not compute one hundred and twenty-eight over thirty-three thousand and twenty-four; that big fraction is the trap, and the question is testing whether I see the cancellation instead.

Look at what is still standing: two blocks against one block. The drawing already says two over three, so whatever the next two beats compute has to agree with this picture or one of them is wrong.

Why this beat exists: The diagram is not decoration: it is the addition rule made visible, and it is what makes the endpoint checks of beat 6 unavoidable.
4 · Compute · beat 4 of 9

The odds form: the route the question was built for

odds: posterior=prior×likelihood ratio
P(D|E8)P(N|E8)=P(D)P(N)⋅P(E8|D)P(E8|N)=1128⋅12−8=256128=2⟺2:1
o⟼o1+o:P(D|E8)=21+2=23,and back: p⟼p1−p
What you say, out loud

Here is the route I would actually defend under time pressure. Odds are the honest currency for this problem: posterior odds equal prior odds times likelihood ratio. The evidence term never has to be computed at all, because it cancels between the two branches.

Read it straight off the two columns. Prior odds are one to one hundred and twenty-eight. The likelihood ratio is one divided by one over two hundred and fifty-six, that is two hundred and fifty-six to one. Multiplying, the powers of two do the entire job. Two hundred and fifty-six over one hundred and twenty-eight is two, so the posterior odds are two to one.

Then the conversion, and I state it instead of skipping it. Odds o become probability o over one plus o, so two to one is two over three. Backwards, a probability p is odds p over one minus p; I will want that in a moment. Notice that one hundred and twenty-nine never appeared as a divisor. The size of the pile entered purely as the prior disadvantage.

Why this beat exists: This is the route the question's own key-points page calls the intended one: the whole computation lives in powers of two, with no large denominators.
5 · Cross-check · beat 5 of 9

Full Bayes in exact fractions — the same constant by a second route

P(E8)=P(D∩E8)+P(N∩E8)=1129+128129⋅256=2258+1258=3258=186
P(D|E8)=1⋅1129186=86129=23,P(N|E8)=1258186=86258=13
check: 23+13=1,2/31/3=2,129⋅2=258=86⋅3
What you say, out loud

Now the textbook route, in exact rational arithmetic rather than decimals. I want a genuinely independent second number, not the same one twice. The denominator is the total chance of eight heads. The fake branch contributes one over one hundred and twenty-nine, which is two over two hundred and fifty-eight, and the fair branch contributes one over two hundred and fifty-eight.

So the evidence has probability three over two hundred and fifty-eight, which reduces to one over eighty-six. That is the fraction I measured off the drawing, and it is worth hearing how ordinary it is. Eight heads is nothing to boast about: once the pile is in play, about one run of eight tosses in eighty-six produces it. That is exactly why the base rate has to be in the argument.

Dividing, one over one hundred and twenty-nine over one over eighty-six is eighty-six over one hundred and twenty-nine, and both are multiples of forty-three, so two over three. The fair branch gives one third. The two sum to one, and their ratio is the two to one the odds form predicted and the two blocks to one block the drawing showed. Three routes, one number.

Why this beat exists: The two routes share no intermediate quantity except the final constant, which is what makes their agreement worth anything. Say that out loud.
6 · Check numerically · beat 6 of 9

The family P(D | E_n), the table, and the two free endpoint checks

P(D|En)=11+128⋅2−n=2n2n+128(n heads in a row)
n012345P(D|En)11291651331171915decimal0.00780.01540.03030.05880.11110.2000
n678910P(D|En)1312234589decimal0.33330.50000.66670.80000.8889
n=0 ⇒ 1129 (the prior),n→∞ ⇒ 1,P(D|one tail)=0
01/22/31prior 1/129 at n = 0even odds at n = 7answer 2/3 at n = 8P(D | E_n)024681012n = heads in a row; every head doubles the odds, so the curve is logistic in n
Plotting P(D | E_n) = 2^n/(2^n + 128) shows what the single answer hides: the posterior starts at the prior 1/129, crosses one half exactly at n = 7 because 128 = 2^7, and reaches 2/3 at n = 8 — one doubling past even odds.
What you say, out loud

Before I commit to two over three I want the family this answer sits in. Take the evidence to be n heads in a row. The identical odds argument then gives one over one plus one hundred and twenty-eight times two to the minus n, and that is the same thing as two to the n over two to the n plus one hundred and twenty-eight. That is the curve I have drawn.

Two endpoints come free, and both are checks on me rather than on the arithmetic. With no tosses at all the posterior is one in one hundred and twenty-nine; it collapses back onto the prior, which is the only sane behaviour when there is no evidence. With heads for ever it tends to one. A formula that failed either test would be wrong however neat it looked.

Now the table from one to ten: one sixty-fifth, one thirty-third, one seventeenth, one ninth, one fifth, one third, one half, two thirds, four fifths, eight ninths. It is strictly increasing, as it must be, since another head can never argue against the coin that always gives heads. And look where it crosses a half: at seven heads exactly, because one hundred and twenty-eight is two to the seven. That is why the pile has one hundred and twenty-nine coins. Seven heads merely erase the disadvantage, and the eighth doubles the odds past even.

The same table shows the asymmetry: one tail anywhere sets the probability to zero at once. Eight heads take seven tosses to be worth anything; one tail finishes the case immediately.

Why this beat exists: Reading n = 7 off the table is the move that shows 129 = 2^7 + 1 was designed rather than chosen; binary number sense is what this question is actually grading.
7 · Justify · beat 7 of 9

Why the shortcut is legal, and what the answer is sensitive to

P(D|E8)P(N|E8)=P(D)P(E8|D)P(N)P(E8|N)
log2⁡:+8⏟heads −7⏟prior = +1 bit
⟺odds 21=2:1
misread: 128 coins (1 fake, 127 fair)
P=256256+127=256383≈0.6684
against 0.6667
What you say, out loud

Let me justify the shortcut rather than merely use it. The odds form is Bayes' theorem written for both hypotheses and then divided, so the evidence term cancels. That is precisely why one hundred and twenty-nine never had to be multiplied into anything. No approximation is hiding in it.

And in base two, which is the number sense being probed: each head is worth one bit of evidence for the odd coin, and the pile starts seven bits against. So seven heads break even and the eighth leaves one bit in front, that is two to the first power, odds two to one. This is the same computation as beat four, but it explains the choice of one hundred and twenty-nine rather than one hundred and thirty.

Last, what the answer is sensitive to. If I misread the pile as one hundred and twenty-eight coins, one fake and one hundred and twenty-seven fair, I get two hundred and fifty-six over three hundred and eighty-three, about zero point six six eight, against two thirds at zero point six six seven. The change is less than two thousandths. So a one-coin miscount is nearly harmless, while dropping the fair branch or reading the conditional backwards destroys the answer completely. I would rather be accused of miscounting than of misconditioning.

Why this beat exists: Quantifying the harmless error and naming the fatal one is the level of self-critique that separates a strong pass from a pass.
8 · Conclude and generalise · beat 8 of 9

The answer, the family it belongs to, and where the model stops

P(D|E8)=23and P(N|E8)=13
N coins, n heads in a row
P=2n2n+N−1
(N=129, n=8 ⇒ 256384=23)
fails if: other face seen(P∈{0,1})
a tail appears (P=0)
What you say, out loud

So the probability is two over three. The number I would say out loud first is its complement: even after eight heads, there is still a one in three chance Bob holds a perfectly fair coin that got lucky, because one hundred and twenty-eight lucky fair coins is a large population to argue against.

The general fact behind it: with one odd coin in a pile of N and n heads in a row, the fake branch contributes one to the numerator and the fair branches contribute N minus one times two to the minus n, so the posterior is two to the n over two to the n plus N minus one. Our case, one hundred and twenty-nine coins and eight heads, is two hundred and fifty-six over three hundred and eighty-four, which is two thirds once more.

And where it stops. This is a statement about Bob's information, not about the metal. If he turns the coin over and looks, the probability is no longer two thirds but nil or one, and the question dies. If a tail appears it is nil. If he re-picks a coin for each toss, the tosses are no longer conditionally independent given one coin, the likelihood column is not two to the minus eight, and the whole argument has to be rebuilt. I would ask which of those the examiner intends before going further.

Why this beat exists: Answer, family, boundary. Naming that the probability lives in the information rather than in the coin is the conceptual point of the entire question.
9 · Only if invited · beat 9 of 9

How much evidence is enough — in exact arithmetic

P>0.99 ⟺ 2n>99⋅128=12672:213=8192<12672<16384=214⇒n=14, P=128129
one more head: 2:1→4:1, P=45
even odds when N−1=28,N=257
biased coin, heads with probability p:P=(2p)8(2p)8+128,p=34⇒656139329≈0.1668,P=12⇒p=2−1/8≈0.9170
What you say, out loud

Only if you want to push further: how much evidence is enough. To exceed ninety-nine per cent I need two to the n greater than ninety-nine times one hundred and twenty-eight, which is twelve thousand six hundred and seventy-two. Two to the thirteen is eight thousand one hundred and ninety-two, too small. Two to the fourteen is sixteen thousand three hundred and eighty-four, so fourteen heads. And at fourteen heads the posterior is exactly one hundred and twenty-eight over one hundred and twenty-nine, the prior turned inside out. That closes a very satisfying circle around the number one hundred and twenty-nine.

Sequentially, the odds form has paid for itself. Given two to one now, one further head doubles the odds to four to one, four fifths, and I recompute nothing. The closed form agrees, since five hundred and twelve over six hundred and forty is four fifths. The reverse question is equally quick: a pile of two hundred and fifty-seven coins would make eight heads worth exactly even odds, because two hundred and fifty-seven is two to the eight plus one.

If the odd coin were merely biased, heads with probability p, the likelihood ratio becomes p over one half, all to the eighth, so the odds are two p to the eighth over one hundred and twenty-eight. At p three quarters that is one and a half to the eighth, roughly twenty-five point six. That is still far short of one hundred and twenty-eight, so the prior wins and the probability falls to six thousand five hundred and sixty-one over thirty-nine thousand three hundred and twenty-nine, about one sixth. The exact tipping value is two to the minus one eighth, roughly zero point nine one seven; below that a suspicious coin is not believable at all. I would offer this as a bonus rather than as the answer.

Why this beat exists: Going here unprompted reads as showing off; going here when invited, and labelling it as beyond the question, reads as depth with judgement.

Where the interviewer pushes next

“How many heads in a row would make you 99% sure?”
What you say, out loud

It is an inequality in powers of two, so let me solve it rather than iterate. P above ninety-nine hundredths means two to the n over two to the n plus one hundred and twenty-eight exceeds ninety-nine hundredths, which rearranges to two to the n greater than ninety-nine times one hundred and twenty-eight, that is twelve thousand six hundred and seventy-two.

Two to the thirteen is eight thousand one hundred and ninety-two, which fails. Two to the fourteen is sixteen thousand three hundred and eighty-four, which works. So fourteen heads, and the posterior there is exactly one hundred and twenty-eight over one hundred and twenty-nine.

For calibration: eleven heads give sixteen over seventeen, about zero point nine four. Seventeen heads are needed to pass three nines, since two to the sixteen is sixty-five thousand five hundred and thirty-six, short of one hundred and twenty-seven thousand eight hundred and seventy-two.

P(D|En)>99100 ⟺ 2n>99⋅128=12672,213=8192<12672<16384=214 ⇒ n=14, P=128129
for comparison: n=11⇒1617≈0.9412;0.999: 2n>999⋅128=127872⇒n=17
“Bob tosses a ninth time and it is heads again. Update — without redoing the problem.”
What you say, out loud

This is why I want the answer stored as odds. The odds are two to one; one more head multiplies the odds by the same per-toss factor of two, giving four to one. And four over one plus four is four fifths. Nothing about eight heads re-enters the working.

The closed form confirms it: two to the nine over two to the nine plus one hundred and twenty-eight is five hundred and twelve over six hundred and forty, which is four fifths exactly, and ten heads give eight ninths.

And the other branch of the nine: if that ninth toss is a tail, the posterior is nil at once, because the double-headed coin cannot produce it. Sequential updating is linear in log-odds: one bit for a head, minus infinity for a tail.

odds 2:1→ ×2 4:1⇒P=41+4=45;2929+128=512640=45,210210+128=10241152=89
P(D|E9∩a tail)=0
“What if the odd coin were biased, heads with probability p, instead of double-headed?”
What you say, out loud

The double-headed coin is just the endpoint p equals one of a one-parameter family, and the odds form survives it untouched. The likelihood ratio is p to the eighth over one half to the eighth, which is two p to the eighth, so the odds are two p to the eighth over one hundred and twenty-eight.

At p equals three quarters, two p is one and a half, and one and a half to the eighth is six thousand five hundred and sixty-one over two hundred and fifty-six, about twenty-five point six. That is still only a fifth of the way to one hundred and twenty-eight. The probability is six thousand five hundred and sixty-one over thirty-nine thousand three hundred and twenty-nine, roughly one sixth, so the pile's base rate comfortably beats a mildly biased coin.

Even odds, the point where I would call the coin suspicious, needs two p to the eighth equal to one hundred and twenty-eight, so p is two to the minus one eighth, about zero point nine one seven. At p equals one we recover two thirds, as we must.

likelihood ratio=p8(1/2)8=(2p)8,P=(2p)8(2p)8+128(p=1 ⇒ 256384=23 ✓)
p=34: (2p)8=(32)8=6561256≈25.63,P=65616561+32768=656139329≈0.1668
P=12 ⟺ (2p)8=128 ⟺ p=2−1/8≈0.9170
“For what size pile would eight heads leave you exactly undecided? And what breaks if Bob picks a new coin for every toss?”
What you say, out loud

Even odds means the surviving masses tie, so two to the eight equals N minus one, giving N equals two hundred and fifty-seven coins. One hundred and twenty-nine is the pile size at which seven heads are even, so eight heads is one doubling past it. The examiner set the question to land on two thirds rather than on a half.

Re-picking is a different problem, not a harder version of this one. Then the eight tosses are no longer conditionally independent given a single coin, so there is no event E eight whose likelihood under D is one. Each toss has its own prior; eight heads just says the coin happened to be the odd one that time, and the probability that all eight picks were the odd coin is one over one hundred and twenty-nine to the eighth.

So my first question back to the examiner would be exactly this one: same coin, eight times, or eight coins once? The wording says he chooses a coin and tosses it eight times, so it is the same coin, and I would have checked either way.

2828+N−1=12 ⟺ N−1=256 ⟺ N=257(129=27+1: even at n=7)
re-picking each toss
P(odd coin 8 times)=(1129)8
— a different experiment, not a harder one

Traps on this question

  • Prosecutor's fallacy — answering 1 because eight heads are certain on the double-headed coin. P(E eight | D) = 1 is the likelihood, not the posterior; one hundred and twenty-eight fair coins throwing eight heads is worth half of a fake coin's mass, which is not nothing.
  • Quoting whichever number is already on the board: one in one hundred and twenty-nine is the prior, one in two hundred and fifty-six is a likelihood. Both are legitimate lines of the working and neither is the answer; the question asks for the reverse conditional.
  • Building the denominator from the fake branch alone. Writing P(E eight) as one over one hundred and twenty-nine makes Bayes return 1 exactly, so the candidate appears to use the right theorem and still fails, because the fair coins are the entire reason the answer is not certain.
  • Misreading the evidence as 'at least one head' rather than 'every one of the eight': on a fair coin that likelihood is one minus one over two hundred and fifty-six, nearly one, and it makes the posterior about one. Related and merely slow: crunching one hundred and twenty-eight over thirty-three thousand and twenty-four instead of cancelling one hundred and twenty-eight over two hundred and fifty-six to a half.
  • Confusing the two powers of two. The disadvantage is one hundred and twenty-eight to one, which is two to the seven; the likelihood ratio is two to the eight. Treating the disadvantage as two to the eight makes eight heads worth even odds and yields the wrong answer one half. A genuine one-coin miscount, a pile of one hundred and twenty-eight, only moves two thirds to two hundred and fifty-six over three hundred and eighty-three, about zero point six six eight — miscounting is cheap, misconditioning is not.

What gets written on the assessor’s form

  • Named the events, the priors and the likelihoods as three separate objects, and gave a magnitude estimate for the answer before doing any algebra.
  • Chose the odds form unprompted and kept the whole calculation in powers of two, so the size of the pile entered only as a prior disadvantage and 129 never had to be multiplied through.
  • Did not trust the first answer: re-derived it by full Bayes in exact fractions, measured P(E eight) = 1/86, and made the two routes and the area diagram agree at 2 to 1.
  • Ran the endpoint checks unasked — zero tosses returns the prior 1/129, an infinite run returns 1, a single tail returns 0 — and produced the table of posteriors to read the trend off.
  • Explained that 129 = 2^7 + 1 is the design of the question (even odds at seven heads), and separated the harmless one-coin miscount from the fatal dropped branch.