So I have $X \sim \text{Geom}(p)$ and the probability mass function is:
$$p(1-p)^{x-1}$$
From the definition that:
$$\sum_{n=1}^\infty ns^{n-1} = \frac {1}{(1-s)^2}$$
How would I show that the $E(X)=\frac 1p$
So I have $X \sim \text{Geom}(p)$ and the probability mass function is:
$$p(1-p)^{x-1}$$
From the definition that:
$$\sum_{n=1}^\infty ns^{n-1} = \frac {1}{(1-s)^2}$$
How would I show that the $E(X)=\frac 1p$
On
\begin{eqnarray} E(X)&=&\sum_{x=1}^\infty x p(1-p)^{x-1}\\ &=&p\sum_{x=1}^\infty x(1-p)^{x-1}\\ &=&p\sum_{x=1}^\infty -\frac{d}{dp}(1-p)^{x}\\ &=&-p\left[\frac{d}{dp} \sum_{x=1}^\infty (1-p)^x\right]\\ &=&-p\cdot \frac{d}{dp}\frac{1-p}{1-(1-p)} \\ &=&-p\cdot \frac{d}{dp}\frac{1-p}{p} \\ &=&-p\cdot \frac{-1}{p^2} \\ &=& \frac{1}{p}\\ \end{eqnarray}
What is $s$ in your case? Consider:
$$ E(X)=\sum_{x=1}^\infty x p(1-p)^{x-1}=p\sum_{x=1}^\infty x(1-p)^{x-1}=\cdots=? $$
Can you see how to take it from here?