Steply

Flip a coin until heads, P(first heads on flip 3)

Step by step, with the reason for every step · The geometric distribution · University Statistics

Step by step

The question

Question: we flip a coin until we get heads: what is the probability that the first heads comes on flip 3?

p = 12: first success on flip 3?

X counts the flips up to the first success.

X = the flip of the first success

1 Name p and q

p, the chance of a success on one try, is 1/2.

p = 12

q, the chance of a fail, is 1 minus p: 1/2.

q = 1 − 12 = 12

Every try has the same chance, and one try does not change the next.

every try: the same p, and the tries do not affect each other

2 Fail, then win

First success on flip 3: the first 2 flips fail, then flip 3 wins.

flips 1 to 3: F F S
F = fail, S = success

Fail, fail, then win: we multiply.

q for each of the 2 fails, then p for the win.

P(X = 3) = q × q × p = 12 × 12 × 12

Careful!

Only 2 fails come before the win, not 3.

Careful: not q3 × p ✗

3 Multiply

Tops: 1 times 1 times 1 is 1.

Bottoms: 2 times 2 times 2 is 8.

1/8 is about 0.1250.

P(X = 3) = 18 ≈ 0.1250

4 Check

Let's check with 8 people trying.

On each flip, 1 in 2 of those left win, the rest go on.

Flip 1: 4 win, 4 go on.

Flip 2: 2 win, 2 go on.

8 people: flip 1: 4 win, 4 go on; flip 2: 2 win, 2 go on;

On flip 3, 1 win for the first time.

1 out of 8 is about 0.1250.

So it is right!

flip 3: 1 win: 1 ÷ 8 ≈ 0.1250

Let's look back.

First: name p and q.

Then: fail, then win.

Then: multiply.

Last: check.

Answer
P(X = 3) = 18 ≈ 0.1250

Your turn

Try this one yourself, then check:

p = 12: first success on flip 4?
Show the answer
P(X = 4) = 0.0625

More from The geometric distribution

The whole lesson: The geometric distribution →