# Showing that the Geometric distribution $E(X)=\frac 1p$ [closed]

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$

• What you call a definition is not a definition. Perhaps you could call it a proposition or simply a fact or, in this case, a lemma. ${}\qquad{}$ Sep 30, 2015 at 3:39

\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?

$p(1-p)^{x-1}$

\begin{align} \operatorname{E}(X) & = \sum_{x=1}^\infty x\Pr(X=x) = \sum_{x=1}^\infty x p(1-p)^{x-1} = p \sum_{x=1}^\infty x(1-p)^x \\[10pt] & = \underbrace{p \sum_{n=1}^\infty xs^{x-1} = p\cdot \frac 1 {(1-s)^2}}_{\text{This is the identity that you cited.}} \quad \text{where }s=1-p, \\[15pt] & = p\cdot \frac 1 {p^2} = \frac 1 p. \end{align}

A simpler way would be to plug in $q=1-p$ and solve it that way using formula for geometric sequences:

\begin{align*} E(X) &= \sum\limits_{k=1}^\infty kpq^{k-1}\\ &= \frac{p}{q} \sum\limits_{k=1}^\infty kq^{k}\\ &= \frac{p}{q} \frac{q}{(1-q)^2}\\ &= \frac{p}{q} \frac{q}{p^2}\\ &= \frac{p}{q} \frac{q}{p^2}\\ &= \frac{1}{p}. \end{align*}