Problem:
a) Find the expected number of flips to get two heads in a row.
b) Find the expected number of flips to get heads followed by tails.
Solution
Solution:
a.
Let be the expected number of flips. There is a chance that she gets two heads right away. There is a chance the first flip is tails, in which case she is basically starting over after the first flip, so it will take an expected flips total. Finally, there is a chance the first flip is heads and the second tails, in which case she is basically starting over after 2 flips, so it will take an expected flips total. Thus we get
Solving this gives .
b.
Let the expected number of flips be . There is a chance you get tails on the first flip, in which case she is basically starting over, so it will take an expected flips total. If she gets heads on the first flip, then she is just waiting until she first gets tails. She has a chance of getting tails on each flip, so it will be an expected 2 flips before she first gets tails, for an expected 3 flips total. Thus we get
Solving this gives .