Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The problem says as follows: We throw a die repeatedly. $X$ and $Y$ denote, respectively, the number of rolls until we reach a $5$ and $6$.

Then the question is to compute $E[X\mid Y=1]$ and $E[X\mid Y=5]$. I get respectively $1/p - p$ and $1/p - 5p$ where $p=1/6$

But I have the feeling that if $Y=5$ then the probabolity that 5 comes up in the first 4 rolls is higher.. am I right? How would you guys compute it?

Thanks a lot for you help! :)

share|cite|improve this question
$E[X|Y=1]$ should be $1+6 = 7$. – Calvin Lin Jan 15 '13 at 20:47
Sure? I did it like this: $E[X|Y=1] =\sum_{x=1}^\infty x P(X=x|Y=1) = \sum_{x\geq 2} xP(X=x) = 1/p - p = 6 - 1/6$. – daniel Jan 15 '13 at 20:53
If $E[X]=6$, and now you're told that the first roll is definitely not a 5, then you should expect to need more rolls, not less. Your 2nd equality is wrong. – Calvin Lin Jan 15 '13 at 20:54
The 2nd equality is $\sum_{x=1}^\infty xP(X=x|Y=1) = P(X=1|Y=1) + 2P(X=2|Y=1) + \dots$ but I understand that $Y=1$ is independent of the future rolls. I don't see the error :( – daniel Jan 15 '13 at 20:57
So, for example, $P(X=1 | Y=1) = 0$ which you seem to understood, but $P(X=2|Y=1) = P(X=1)$ and not $P(X=2)$ which you used. It may be independent, but that doesn't mean that you just ignore it and never account for it. – Calvin Lin Jan 15 '13 at 20:59

We use the linearity of conditional expectation.

We know that $E[X] = \frac {1}{p} = 6$. If we are given that $Y=1$, it means that the first throw is 6, and hence cannot be 5. Thus, $E[X | Y=1] = 1 + E[X] = 7$. Another way of thinking about this, is that we can create the obvious bijection (i.e. phase shift) between all rolls, and also between all rolls with the first roll being 6. Then, we see that

$$ [X|Y=1] = X+1 $$

Edit: To calculate $E[X|Y=5]$, we likewise create the bijection (where we shift by 5, and then roll the numbers 1-5 for the first 5 entries) between all rolls, and also all rolls with the fifth roll is the first that has value 6. Then, we see that

Hence, $$ \begin{array}{l l l l } E[X|Y=5] & = 1 \times \frac {1}{5} &+ 2 \times \frac {4}{5} \times \frac {1}{5} &+ 3 \times \left( \frac {4}{5} \right)^2 \times \frac {1}{5}\\ & + 4 \times \left( \frac {4}{5} \right)^3 \times \frac {1}{5} &+ 5 \times 0 &+ \left(\frac {4}{5} \right)^4\left( E[X] + 5 \right) \\ & = 5.8192 \end{array}$$

The reason why this cases didn't appear in the earlier example, is because the case $X<1$ is the empty set. Thinking back, we should have added that, but likely ignored it.

share|cite|improve this answer
Oh yes now I see it! Thanks sooo much! :D – daniel Jan 15 '13 at 21:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.