Question #122041

Suppose you start with one penny and repeatedly flip a fair coin. Each time you get heads, before the first time you get tails, you get two more pennies. Let X be the total number of pennies you have at the end. Compute E(X).

Expert's answer

Let X be the number of flips we make before seeing tails. Let p be the probability of getting heads on any one flip. The probability of not getting tails on that first flip is p.

the expected number of flips we perform before seeing tails, as:

E[h] = 1 + pE[h].

Because coin flipping is memoryless, the expected value of X after flipping a heads is the same as before flipping that heads .

E[h] = 1 + pE[h]=> E[h] - pE[h] = 1=> (1 - p)E[h] = 1=> E[h] = 1 / (1 - p)

Since p = 1/2, we get E[X] = 2 - expected value of heads,so expected value of pennies is

E[X]=1+2*2=5


LATEST TUTORIALS
APPROVED BY CLIENTS