On this page
Toss a fair coin until a head shows. Sometimes it takes one toss, sometimes five. Over many tries the average is exactly 2, and you can prove it two ways: with an infinite series, or with one line that looks only at the first toss. Both carry straight over to any probability p and to the classic question of how many throws it takes to get a six.
What is the expected number of tosses to get the first head?
Let X be the number of tosses up to and including the first head. X follows the geometric distribution, which Wikipedia describes as the distribution of when the first success occurs in a sequence of independent, identical trials, with P(X = k) = (1 − p)^(k−1) p.
For a fair coin p = 1/2. The first head lands on toss 1 with probability 1/2, on toss 2 with probability 1/4, on toss 3 with probability 1/8, and so on. Each extra toss halves the chance.
The expected value weights each outcome by its probability:
E = 1(1/2) + 2(1/4) + 3(1/8) + 4(1/16) + ...
How do you sum the series to get 2?
Write the series, then halve it and shift it one place to the right:
E = 1/2 + 2/4 + 3/8 + 4/16 + ...
E/2 = 1/4 + 2/8 + 3/16 + ...
Now subtract the second line from the first, term by term over matching denominators. What is left is 1/2 + 1/4 + 1/8 + 1/16 + ..., a geometric series that adds up to 1. So E − E/2 = 1, which gives E = 2.
Calculus gives the same answer. ProofWiki's proof uses the derivative of the geometric series: the sum of k q^(k−1) from k = 1 upwards equals 1/(1 − q)². Applied to our count of tosses, put q = 1/2 to get 4, then multiply by p = 1/2: the mean is 2.
What is the one-line conditioning argument?
Look only at the first toss. You always spend one toss. With probability 1/2 it is a head and you stop. With probability 1/2 it is a tail. The coin has no memory, so you are back where you started and still face the same expected wait, E.
E = 1 + (1/2)(0) + (1/2)E
Solve it: E/2 = 1, so E = 2. Wikipedia's article gives the same first-step equation in general form, E = p + (1 − p)(1 + E).
What is the expected number of trials for any probability p?
Replace 1/2 with p. The conditioning line becomes E = 1 + (1 − p)E, so pE = 1 and E = 1/p, the mean that Wikipedia lists for the geometric distribution.
Try it on a biased coin. If heads is twice as likely as tails, p = 2/3, the setup in our post on biased coin probability problems. Then E = 1/(2/3) = 1.5 tosses.
Read the wording carefully. If a question counts only the tails before the first head, leave out the final success. The expected number of failures is then (1 − p)/p, as in ProofWiki's version of the result. For a fair coin that comes to 1 tail on average.
How many throws to get a six, on average?
A six has p = 1/6, so the expected number of throws is 1/(1/6) = 6. Wikipedia works the same example for rolling a die until it shows a 1, and also gets an average of 6 rolls.
Six is the average, not the typical wait. The chance of at least one six in the first 4 throws is 1 − (5/6)⁴ = 671/1296, about 0.52, using the at-least-one shortcut 1 − qⁿ. So more than half the time you are done by throw 4. The rare long runs pull the mean up to 6: the probabilities shrink slowly, so the tail is long.
A five-step check for exam questions
Define X precisely: does it count the successful trial, or only the failures before it?
Check the conditions: trials must be independent with the same p each time. Drawing balls without replacement breaks this, as our post on expected draws until the first red shows.
Condition on the first trial: E = 1 + (1 − p)E.
Solve for E, then subtract 1 if the question counts failures only.
Test the extremes: p = 1 must give E = 1, and a smaller p must give a longer wait.
If you can set up the equation but keep slipping on the wording, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer. To revise the ideas underneath (expectation, geometric series and independence), the Fermi Concept Library gives each concept its own lesson and its place in the map.
Try one now: how many throws, on average, until a die shows a number greater than 4? Here p = 1/3, so the answer is 3.



