# Thread: Coin probability problem

1. ## Coin probability problem

I'm having some trouble with the following problem:

Suppose you toss a fair coin. Let
X be the amount of tosses you need to make until you get HTT

and
Y be the amount of tosses you need to make until you get HTH.
(a) What is expected value of
X?
(b) What is the expected value of
Y ?
(c) The game turns out to be fair even though the expected values of
X and Y are different. How could this be?

Thanks!

2. HTT

state 0 : initial state
state 1 : H
state 2 : HT
state 3 : HTT (final state)

Initially you're in state 0. You will remain in state 0 until you flip a H (in which case you'll move to state 1).

Once in state 1, you will remain there until you flip a T (in which case you'll will move to state 2).

And once in step 2, you'll move to state 3 if you flip a T, and move back to state 1 if you flip a H.

Now let $E(X_{i})$ be the expected amount of flips in takes to reach state 3 starting from state i.

You can set up three equations by conditioning on your first flip after you enter a state.

$E(X_{0}) = E(X_{0}|H)P(H) + E(X_{0}|T)P(T) = E(1+X_{1}) \frac{1}{2} + E(1+X_{0}) \frac {1}{2}$ $= 1+ \frac{1}{2}E(X_{0}) + \frac {1}{2}E(X_{1})$

$E(X_{1}) = E(X_{1}|H)P(H) + E(X_{1}|T)P(T) = E(1+X_{1}) \frac{1}{2} + E(1+X_{2}) \frac {1}{2}$ $= 1 + \frac{1}{2}E(X_{1}) + \frac{1}{2}E(X_{2})$

$E(X_{2}) = E(X_{2}|H)P(H) + E(X_{2}|T)P(T) = E(1+X_{1}) \frac{1}{2} + (1)\frac {1}{2}$ $=1 + \frac{1}{2}E(X_{1})$

now solve for $E(X_{0})$

I get 8 flips.

3. for HTH, the expected number of flips is 10

What game are they referring to in part (c)?

4. thanks a ton!
part (c) basically means explain why P(H) =1/2 and P(T)=1/2 but explain why E(HTT) and E(HTH) are different

5. Originally Posted by morganfor
thanks a ton!
part (c) basically means explain why P(H) =1/2 and P(T)=1/2 but explain why E(HTT) and E(HTH) are different
If you flip a H when in state 2 of HTT you move back to state 1. But if you flip a T when in state 2 of HTH, you move back to state 0.