Consider a game with 2 stages. In the first stage, the player tosss a coin until a head is appears. Say that it takes j flips to get a head. Then, in the second stage, he random draws an integer between 1 and $ 2^j $ to get his winnings (so for example if he draws 2,he gets 2 dollars). a) What is the average amount of dollars he gets? b)Given that he wins 4 dollars, what is the probability that the coin was flipped exactly 6 times,i.e,that j=6?
My work for question a is I have the probability $\frac{1}{2^j}$ until getting a head,and each time I have a head,i calculate the expected value of money in range from 1 to j,so:
\begin{equation} E(X) = \sum_{j=1}^\infty \frac{1}{2^j}\sum_{i=1}^{j}i\frac{1}{2^j} \end{equation} b) I call A is the event he gets 4 dollars and B is the event he flipped the coin exactly 6 times,so
\begin{equation} P(B|A) = \frac{P(B \cap A)}{P(A)} \end{equation} with
\begin{equation} P(B \cap A) = \frac{1}{2^6} \ and \ P(A)=\sum_{i=2}^\infty \frac{1}{2^i} \end{equation} is it a right way to do? if it's right, how can i calculate the sums?

  • $\begingroup$ In your equation for the expected value did you mean to have the outer summation be over $j$ instead of $n$? $\endgroup$ Commented Jan 18, 2021 at 4:08
  • $\begingroup$ oh,srry it's a typo $\endgroup$ Commented Jan 18, 2021 at 4:10

1 Answer 1


(a) Your inner summation should go from $1$ to $2^j$. You can also simplify the summations:

$$ \begin{equation} E(X) = \sum_{j=1}^\infty \frac{1}{2^j}\sum_{i=1}^{2^j}i\frac{1}{2^j} = \sum_{j=1}^\infty \left( \frac{1}{2^j}\cdot \frac{1+2^j}{2} \right) =\frac{1}{2}\sum_{j=1}^\infty \left( \frac{1}{2^j} + 1 \right) = +\infty \end{equation} $$

(b) How did you get $P(B \cap A) = \frac{1}{2^6}$? Isn't that $P(B)$? Since $P(A)$ and $P(A \cap B)$ are hard to computer I suggest computing the conditional this way:

$$ \begin{equation} P(flip=6|won=$4) = \frac{P(won=$4|flip=6)P(flip=6)}{\sum\limits_{i=1}^\infty P(won=$4|flip=i)P(flip=i)} \end{equation} $$

  • $\begingroup$ so,question a), i cann't get a specific avarage amount of money, question b) according to your suggestion,i calculated it to be 12/2^12, idk if it's a right solution for this,what do you think? $\endgroup$ Commented Jan 18, 2021 at 6:47
  • 1
    $\begingroup$ The expected value of a random variable does not need to converge and it can diverge to $-\infty$ or $+\infty$ as it did in this case. A simpler example where the expected value diverges to $+\infty$ is a game where you flip a coin until you get heads and you get $2^i$ dollars where $i$ is the number of flips. $\endgroup$ Commented Jan 18, 2021 at 6:50
  • $\begingroup$ As for part (b) $\frac{12}{2^{12}}$ looks correct to me. $\endgroup$ Commented Jan 18, 2021 at 7:06
  • $\begingroup$ thanks alot for your help $\endgroup$ Commented Jan 18, 2021 at 7:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .