Toss It Til You're Convinced!

You have an unfair coin. The probability it will land on heads is 2 3 \dfrac23 .

The expected value for the number of coin flips it will take to get 3 heads in a row can be expressed as a b \dfrac ab , where a a and b b are coprime positive integers, find a + b a+b .

What is a + b a+b ?


Other Expected Value Quizzes


The answer is 65.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Arjen Vreugdenhil
Sep 21, 2016

Let n n be the number of heads already obtained, and E n E_n the expected number of tosses needed to toss three heads in a row. Obviously, E 3 = 0 E_3 = 0 , and the problem asks for E 0 E_0 . In general, E n = 1 + k p n k E k , E_n = 1 + \sum_k p_{n\to k} E_k, where p n k p_{n\to k} is the probability of getting from state n n to state k k . For this coin, p n 0 = 1 / 3 p_{n\to 0} = 1/3 (tossing "tail" gets you back to state zero), and p n n + 1 = 2 / 3 p_{n\to n+1} = 2/3 (tossing "head" gets you one step ahead). Thus { E 0 = 1 3 E 0 + 2 3 E 1 + 1 ; E 1 = 1 3 E 0 + 2 3 E 2 + 1 ; E 2 = 1 3 E 0 + 1. \begin{cases} E_0 = \frac13 E_0 + \frac23 E_1 + 1; \\ E_1 = \frac13 E_0 + \frac23 E_2 + 1; \\E_2 = \frac13 E_0 + 1. \end{cases} Multiplying each equation by 3 and writing it in matrix notation, we get [ 2 2 0 1 3 2 1 0 3 ] [ E 0 E 1 E 2 ] = [ 3 3 3 ] . \left[\begin{array}{ccc} 2 & -2 & 0 \\ -1 & 3 & -2 \\ -1 & 0 & 3 \end{array}\right]\ \left[\begin{array}{c} E_0 \\ E_1 \\ E_2\end{array}\right] = \left[\begin{array}{c} 3 \\ 3 \\ 3 \end{array}\right]. The solution is [ E 0 E 1 E 2 ] = 1 8 [ 9 6 4 5 6 4 3 2 4 ] [ 3 3 3 ] = [ 57 / 8 45 / 8 27 / 8 ] , \left[\begin{array}{c} E_0 \\ E_1 \\ E_2\end{array}\right] = \frac18 \left[\begin{array}{ccc} 9 & 6 & 4 \\ 5 & 6 & 4 \\ 3 & 2 & 4 \end{array}\right]\ \left[\begin{array}{c} 3 \\ 3 \\ 3 \end{array}\right] = \left[\begin{array}{c} 57/8 \\ 45/8 \\ 27/8 \end{array}\right], showing that the expected number of tosses is E 0 = 57 / 8 E_0 = \boxed{57/8} , so that we submit the answer 65 .

Geoff Pilling
May 24, 2016

You initially have a 1 / 3 1/3 probability of getting a tail, in which case you're back where you started, but you've "spent a move"

You have a ( 2 / 3 ) ( 1 / 3 ) = 2 / 9 (2/3)*(1/3) = 2/9 chance of getting a head, but then a tail, in which case you are back where you are started, but you have "spent 2 2 moves".

You have a ( 2 / 3 ) ( 2 / 3 ) ( 1 / 3 ) = 4 / 27 (2/3)*(2/3)*(1/3) = 4/27 chance of getting a head and then another head and then a tail. In which case end up where you started but have spent ( 3 3 moves).

Finally, you have a ( 2 / 3 ) ( 2 / 3 ) ( 2 / 3 ) (2/3)*(2/3)*(2/3) ) chance of getting heads, heads, heads, in which case you are done, and you did 3 3 flips, which adds on ( 2 / 3 ) ( 2 / 3 ) ( 2 / 3 ) 3 (2/3)*(2/3)*(2/3)*3 to the expectaion value.

This translates to the following equation for E E :

E ( H H H ) = ( 1 / 3 ) ( E + 1 ) + ( 2 / 9 ) ( E + 2 ) + ( 4 / 27 ) ( E + 3 ) + 24 / 27 E(HHH) = (1/3)(E+1)+(2/9)(E+2)+(4/27)(E+3) +24/27

Solving that linear equation, E ( H H H ) = 57 / 8 E(HHH) = 57/8 .

57 + 8 = 65 57+8 = \boxed{65}

Moderator note:

Can you explain how you arrived at the linear equation? The law of iterated expectation is really useful in problems like this.

@Geoff Pilling - could you model this under some distribution? We're counting number of failures until the 3rd success for a sequence of independent Bernoulli trials. This is negative binomial. When I try to model our problem though, it gets tricky. Any suggestions?

Natassa Gkelameri - 4 years, 11 months ago

Log in to reply

Good question... Lemme think about that one @Natassa Gkelameri

Geoff Pilling - 4 years, 11 months ago

why multiple by 3?

Mr Yovan - 5 years ago

Log in to reply

Because it took you 3 moves to get there.

Geoff Pilling - 5 years ago

Log in to reply

can you explain a bit more about why multiply 3 i dont quite understand what you mean by three moves to get there. Thank You

Ashish Sacheti - 4 years, 11 months ago

Log in to reply

@Ashish Sacheti It comes from the definition of expected value:

E = 1P(1) + 2P(2) + 3P(3) + ....

See the expected value wiki.

Geoff Pilling - 4 years, 11 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...