You have an unfair coin. The probability it will land on heads is 3 2 .
The expected value for the number of coin flips it will take to get 3 heads in a row can be expressed as b a , where a and b are coprime positive integers, find a + b .
What is a + b ?
Other Expected Value Quizzes
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.
You initially have a 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 chance of getting a head, but then a tail, in which case you are back where you are started, but you have "spent 2 moves".
You have a ( 2 / 3 ) ∗ ( 2 / 3 ) ∗ ( 1 / 3 ) = 4 / 2 7 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 moves).
Finally, you have a ( 2 / 3 ) ∗ ( 2 / 3 ) ∗ ( 2 / 3 ) ) chance of getting heads, heads, heads, in which case you are done, and you did 3 flips, which adds on ( 2 / 3 ) ∗ ( 2 / 3 ) ∗ ( 2 / 3 ) ∗ 3 to the expectaion value.
This translates to the following equation for E :
E ( H H H ) = ( 1 / 3 ) ( E + 1 ) + ( 2 / 9 ) ( E + 2 ) + ( 4 / 2 7 ) ( E + 3 ) + 2 4 / 2 7
Solving that linear equation, E ( H H H ) = 5 7 / 8 .
5 7 + 8 = 6 5
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?
Log in to reply
Good question... Lemme think about that one @Natassa Gkelameri
why multiple by 3?
Log in to reply
Because it took you 3 moves to get there.
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
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.
Problem Loading...
Note Loading...
Set Loading...
Let n be the number of heads already obtained, and E n the expected number of tosses needed to toss three heads in a row. Obviously, E 3 = 0 , and the problem asks for E 0 . In general, E n = 1 + k ∑ p n → k E k , where p n → k is the probability of getting from state n to state k . For this coin, p n → 0 = 1 / 3 (tossing "tail" gets you back to state zero), and p n → n + 1 = 2 / 3 (tossing "head" gets you one step ahead). Thus ⎩ ⎪ ⎨ ⎪ ⎧ E 0 = 3 1 E 0 + 3 2 E 1 + 1 ; E 1 = 3 1 E 0 + 3 2 E 2 + 1 ; E 2 = 3 1 E 0 + 1 . Multiplying each equation by 3 and writing it in matrix notation, we get ⎣ ⎡ 2 − 1 − 1 − 2 3 0 0 − 2 3 ⎦ ⎤ ⎣ ⎡ E 0 E 1 E 2 ⎦ ⎤ = ⎣ ⎡ 3 3 3 ⎦ ⎤ . The solution is ⎣ ⎡ E 0 E 1 E 2 ⎦ ⎤ = 8 1 ⎣ ⎡ 9 5 3 6 6 2 4 4 4 ⎦ ⎤ ⎣ ⎡ 3 3 3 ⎦ ⎤ = ⎣ ⎡ 5 7 / 8 4 5 / 8 2 7 / 8 ⎦ ⎤ , showing that the expected number of tosses is E 0 = 5 7 / 8 , so that we submit the answer 65 .