Worked examples
The question
Question: each try has a probability of success of 0.2: what is the probability that the first success comes on try 3?
p = 0.2: first success on try 3?
X counts the tries up to the first success.
X = the try of the first success
1 Name p and q
p, the chance of a success on one try, is 0.2.
p = 0.2
q, the chance of a fail, is 1 minus p: 0.8.
q = 1 โ 0.2 = 0.8
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 try 3: the first 2 tries fail, then try 3 wins.
tries 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 = 0.8 ร 0.8 ร 0.2
Careful!
Only 2 fails come before the win, not 3.
Careful: not q3 ร p โ
3 Multiply
0.8 times 0.8 is 0.64.
Times 0.2: 0.1280.
P(X = 3) = 0.64 ร 0.2 = 0.1280
4 Check
Let's check with 1000 people trying.
On each try, 20 percent of those left win, the rest go on.
Try 1: 200 win, 800 go on.
Try 2: 160 win, 640 go on.
1000 people: try 1: 200 win, 800 go on; try 2: 160 win, 640 go on;
On try 3, 128 win for the first time.
128 out of 1000 is about 0.1280.
So it is right!
try 3: 128 win: 128 รท 1000 โ 0.1280
Let's look back.
First: name p and q.
Then: fail, then win.
Then: multiply.
Last: check.
Answer P(X = 3) = 0.64 ร 0.2 = 0.1280
โถ Watch it solved
The question
Question: we roll a die until we get a 6: what is the probability that the first 6 comes on roll 4?
p = 16: first success on roll 4?
X counts the rolls up to the first success.
X = the roll of the first success
1 Name p and q
p, the chance of a success on one try, is 1/6.
p = 16
q, the chance of a fail, is 1 minus p: 5/6.
q = 1 โ 16 = 56
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 roll 4: the first 3 rolls fail, then roll 4 wins.
rolls 1 to 4: F F F S
F = fail, S = success
Fail, fail, and so on, then win: we multiply.
q for each of the 3 fails, then p for the win.
P(X = 4) = q ร q ร q ร p = 56 ร 56 ร 56 ร 16
Careful!
Only 3 fails come before the win, not 4.
Careful: not q4 ร p โ
3 Multiply
Tops: 5 times 5 times 5 times 1 is 125.
Bottoms: 6 times 6 times 6 times 6 is 1296.
125/1296 is about 0.0965.
P(X = 4) = 1251296 โ 0.0965
4 Check
Let's check with 1296 people trying.
On each roll, 1 in 6 of those left win, the rest go on.
Roll 1: 216 win, 1080 go on.
Roll 2: 180 win, 900 go on.
Roll 3: 150 win, 750 go on.
1296 people: roll 1: 216 win, 1080 go on; roll 2: 180 win, 900 go on; roll 3: 150 win, 750 go on;
On roll 4, 125 win for the first time.
125 out of 1296 is about 0.0965.
So it is right!
roll 4: 125 win: 125 รท 1296 โ 0.0965
Let's look back.
First: name p and q.
Then: fail, then win.
Then: multiply.
Last: check.
Answer P(X = 4) = 1251296 โ 0.0965
โถ Watch it solved
The question
Question: each try has a probability of success of 0.2: what is the probability of a first success within 5 tries?
p = 0.2: first success within 5 tries?
1 Name p and q
p, the chance of a success on one try, is 0.2.
p = 0.2
q, the chance of a fail, is 1 minus p: 0.8.
q = 1 โ 0.2 = 0.8
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 None in 5 tries
Within 5 means on try 1, or 2, up to 5.
The only other way: all 5 tries fail.
within 5: on try 1, or 2, ... or 5
the other way: all 5 fail
All 5 fail: q times itself 5 times.
That is 0.3277.
all fail = q5 = (0.8)5 = 0.3277
3 The rest
Everything else has a success within 5: 1 minus that is 0.6723.
P(X โค 5) = 1 โ 0.3277 = 0.6723
Careful!
p to the power 5 would be 5 successes in a row.
We only need one.
Careful: not 0.25 โ
4 Check
Let's check by adding each try: 0.2000 plus 0.1600 plus 0.1280 plus 0.1024 plus 0.0819.
P(1) + ... + P(5) = 0.2000 + 0.1600 + 0.1280 + 0.1024 + 0.0819
That is about 0.6723.
So it is right!
โ 0.6723
Let's look back.
First: name p and q.
Then: none in 5 tries.
Then: the rest.
Last: check.
Answer Careful: not 0.25 โ
โถ Watch it solved