Monday, January 30, 2023

Finding the Expected Number of Coin Flips in a Successive Game

 

A coin having probability p of coming up heads is successively flipped until two of the most recent three flips are heads. Let N denote the number of flips. (Note that if the first two flips are heads, then N = 2.) Find E[N].

To calculate E[N], we need to find the expected number of flips for each possible outcome. For example, if the first flip is heads, then the expected number of flips is 1 + E[N|HH]. If the first flip is tails, then the expected number of flips is 1 + E[N|HT]. We can continue this process for all possible outcomes.


Let's define the expected number of flips for each possible outcome:


E[N|HH] = 2 (since the game ends on the second flip)

E[N|HT] = 1/p + 1 + E[N|HH] (since the game ends on the third flip with probability p)

E[N|TH] = 1/p + 1 + E[N|HT]

E[N|TT] = 2/p + 1 + E[N|TH]


Using the Law of Total Expectation, we have:


E[N] = p(E[N|HH]) + (1 - p)(E[N|HT]) = 2p + (1 - p)(2 + 1/p + E[N|TT])


By substituting E[N|TT], we get:


E[N] = 2p + (1 - p)(2 + 1/p + 2/p + 1 + E[N|TH])


By substituting E[N|TH], we get:


E[N] = 2p + (1 - p)(2 + 1/p + 2/p + 1 + 1/p + 1 + E[N|HT])


By substituting E[N|HT], we get:


E[N] = 2p + (1 - p)(2 + 1/p + 2/p + 1 + 1/p + 1 + 1/p + 1 + E[N|HH])


By substituting E[N|HH], we get:


E[N] = 2p + (1 - p)(2 + 1/p + 2/p + 1 + 1/p + 1 + 1/p + 1 + 2)


Therefore, the expected number of coin flips required to reach the condition is:


E[N] = 2p + 5 - 3p + (1/p^3)


This formula gives us the expected value of N for any value of p, the probability of getting heads on each flip.


In conclusion, finding the expected value of N can provide valuable information for decision-making in successive coin flip games. By examining the relationship between the probability of getting heads and the expected number of flips, we can make informed decisions about the game and its outcome.

No comments:

Post a Comment