17

A fair 6-sided die is rolled repeatedly in till a 6 is obtained. Find the expected number of rolls conditioned on the event that none of the rolls yielded an odd number

I had tried to figure out what will be the conditional distribution of $\frac{X}{Y}$ but I can't solved it yet Where $X $ is the face numbered 6 is obtained and $Y$ is the event only even number is occured

3 Answers3

12

Call $E_k$ the event "the first $k-1$ throws gave even results", and call $E$ the event "the first $6$ exists and is preceded by even numbers only".

I'll skip the clever answer from Mike Earnest's link and try to give an understandable scholar way.

The definition of a conditional expectation is $$\Bbb E(X|E)=\sum_{k=1}^\infty k\cdot\Bbb P(X=k\ |\ E)$$

Now $$\Bbb P(X=k\ |\ E)=\frac{\Bbb P((X=k)\cap E)}{\Bbb P(E)}$$ Note that the event $(X=k)\cap E$ is equal to the event $(X=k)\cap E_k$. $$\Bbb P((X=k)\cap E_k)=\left(\frac26\right)^{k-1}\cdot \frac16$$ as you have to independently get $2$s or $4$s at each of the $k-1$ first throws, and then get a $6$.

On the other hand, \begin{align*}\Bbb P(E)&=\sum_{k=1}^\infty \Bbb P(E\cap(X=k))\\&=\sum_{k=1}^\infty \left(\frac26\right)^{k-1}\cdot \frac16\\&=\frac16\cdot \frac{1}{1-\frac26}\\&=\frac14\end{align*}

Putting it all together: \begin{align*}\Bbb E(X|E)&=\sum_{k=1}^\infty k\cdot4\cdot \left(\frac26\right)^{k-1}\cdot \frac16\\&= \frac46 f'\left(\frac26\right)\\\end{align*} where $$f(x)=\sum_{k=0}^\infty x^k=\frac 1{1-x}\qquad\text{and}\qquad f'(x)=\sum_{k=1}^\infty k\cdot x^{k-1}=\frac 1{(1-x)^2}$$

Finally $$\Bbb E(X|E)=\frac23\cdot \frac1{\left(1-\frac26\right)^2}=\frac32.$$

7

We are throwing a die until we obtain neither $2$ nor $4$. The expected number of throws then is ${3\over2}$, by the formulas for a geometric random variable. If the closing throw is $1$, $3$, or $5$, we don't count the experiment and start afresh. If the closing throw is a six it's a success.

  • 1
    Could you give a bit more details on how you get $3\over 2$? The exponential distribution belongs to a continuous framework, so I guess that is not exactly what you meant? – Arnaud Mortier May 13 '18 at 21:36
  • 1
    @ArnaudMortier $\frac32$ is the reciprocal of $\frac46=\frac{|{1,3,5,6}|}{|{1,2,3,4,5,6}|}$ – Henry Jul 24 '23 at 17:40
3

First a way to make things more clear.

Keep throwing a fair die again and again resulting in an endless string like $$32464344162634521466326...$$

Now have a look at the substrings that end with a $6$, do not contain another $6$, contain only even digits and are of maximal length.

That gives in my example the substrings $246$, $6$, $26$, $46$, $6$, $26$.

Now the question can be interpreted as:

What is the average length of substrings like these?

Finding this comes to the same as finding the expectation of the number of throws needed to arrive at $1,3,5$ or $6$.

If we denote that expectation by $\mu$ then we have the equality:$$\mu=\frac23\cdot1+\frac13(1+\mu)=1+\frac13\mu$$or equivalently: $$\mu=\frac32$$


P.S.

When I saw this problem for the first time (in a question that is now marked as a duplicate of this question) I was completely wrong in my thinking and the answer based on my intuition was $3$.

drhab
  • 151,093
  • Why are you saying that the real expectation (with strings ending in 6 only) is same as finding the expectation of the number of throws needed to arrive at 1,3,5  or 6? – Prof. Shanku Aug 09 '19 at 03:25
  • 1
    @Prof.Shanku Well, you can split the strings in "successes" (i.e. ending on $6$) and "failures" (i.e. ending at $1$, $3$ or $5$) and then focus on successes (see the answer of Christian). But if it comes to expectation of length this focus is not needed. This because the expectation of length of failures ending (e.g. on $1$) is the same is the expectation of length of successes ending on $6$. – drhab Aug 09 '19 at 06:43