Two dice problem

65 Views Asked by At

Let's roll two dice till same number occurs on two dices. I want to calculate expected sum of all numbers appeared.

My work so far

Let's denote by $X$ expected sum of all numbers appeared, till we have same number on two dices, and $Y$ expected number of throws till on two dices we have same number.

Of course we want to calculate $X$, but it's easier to calculate $Y$. Because expected result of one dice roll is $3.5$ then expected result two dice roll equals to $7$. It means that $E[X]=7E[Y]$.

How to calculate $E[Y]$ ?

$P(Y=1)=\frac16$

$P(Y=2)=\frac56 \cdot \frac16$

$P(Y=n)=(\frac{5}{6})^{n-1} \cdot \frac16$

So :

$$E[Y]=\sum_{i=1}^\infty i \cdot P(Y=i)=1 \cdot \frac16 +2 \cdot \frac56 \cdot \frac16+...$$

And it's type of series $\sum_{i=1}^{\infty} i(1-p)^{k-1}p$ where $p \in [0,1]$ and this sum equals to $\frac1p$. So my sum above equals to 6 and that's exactly $E[Y]$

So finishing my justification $E[X]=7E[Y]=7\cdot 6 = 42$

Am i correct with my way of thinking ?

EDIT

I read comments and you are right. I mean $E[Y] \neq 7 E[X]$. Including only $30$ cases we get :

$$\frac{2}{30} \cdot 3+\frac{2}{30} \cdot 4+\frac{4}{30}\cdot 5+\frac{5}{30} \cdot 6+\frac{6}{30} \cdot 7+\frac{4}{30} \cdot 8 + \frac{4}{30} \cdot 9+\frac{2}{30} \cdot 10+\frac{1}{30} \cdot 11=$$ $$=\frac{205}{30}$$.

So what we get is : $E[Y]=\frac{205}{30}E[X]$. Rest of the justification is correct. Am I right ?