Assume you have a die in your hand. Each time you throw it, you look to see what value you would get. If the value is greater than 4, roll the die again. Otherwise you stop.
Let X be the number of times you toss the die before coming to a halt. For instance, if you get $5 → 6 → 1 → stop$, the corresponding value of $X$ will be 3.
a). What's the probability mass function $p_x$?
b). What is the expectation value $E(X)$?
c). Is the value of $(X^2+1)$ odd or even on average? [Just curious]
$P(5,6)=\frac{1}{3}$
$P(1,2,3,4)=\frac{2}{3}$
My solution for a): $$ p_x(n)=\left(\frac{1}{3}\right)\left(\frac{2}{3}\right)^{n-1}where \space n\ge1 $$
My solution for b): $$ E(X) = \sum_{n=1}^{\infty}n.p_x(n)=\sum_{n=1}^{\infty}n.\left(\frac{2} {3}\right)^{n-1}\left(\frac{1}{3}\right) $$ Simplification then gives me $r=\frac{2}{3}$ to yield $$ E(X) = \frac{1}{3}\sum_{n=1}^{\infty}n.r^{n-1} $$
Since
- $n.r^{n-1}$=$\frac{d}{dr}r^{n}$
- along with the fact the sum of a geometric series is given by $\sum_{n=0}^{\infty}r^{n}=\frac{1}{1-r}$
- Also, $\sum_{n=0}^{\infty}r^{n}=1+\sum_{n=1}^{\infty}r^{n}$
Hence, it is possible to write $$ \begin{align} E(X) & = \frac{1}{3}\frac{d}{dr}\left(\sum_{n=1}^{\infty}r^{n}\right)=\frac{1}{3}\frac{d}{dr}\left(-1+\sum_{n=0}^{\infty}\right) \\ & = \frac{1}{3}\frac{d}{dr}\left(-1+\frac{1}{1-r}\right) \\ & = \frac{1}{3}\left[\frac{1}{({1-r})^2}\right] \\ & = \frac{1}{3}\left[\frac{1}{(1-(2/3))^2}\right]\\ & = 3 \end{align} $$
I'm not sure whether I'm correct for both parts because I am not particularly good at this subject of mathematics.
Could you aid me and confirm that I've done it correctly?