# What is the formula of the expected value of a geometric random variable?

Nov 19, 2015

If you have a geometric distribution with parameter $= p$, then the expected value or mean of the distribution is ...

#### Explanation:

expected value $= \frac{1}{p}$

For example, if $p = \frac{1}{3}$, then the expected value is $3$

hope that helped

Jan 11, 2018

$E \left(X\right) = 1 / p$

#### Explanation:

Where $k$ is the number of trials that have elapsed, we see that the number of trials multiplied by the probability of the series ending at that trial is $k {\left(1 - p\right)}^{k - 1} p$.

Note that ${\left(1 - p\right)}^{k - 1} p$ is the probability of $k$ trials having elapsed, where $p$ is the probability of the event occurring.

So, the expected value is given by the sum of all the possible trials occurring:

$E \left(X\right) = {\sum}_{k = 1}^{\infty} k {\left(1 - p\right)}^{k - 1} p$

$\textcolor{w h i t e}{E \left(X\right)} = p {\sum}_{k = 1}^{\infty} k {\left(1 - p\right)}^{k - 1}$

$\textcolor{w h i t e}{E \left(X\right)} = p \left(1 + 2 \left(1 - p\right) + 3 {\left(1 - p\right)}^{2} + 4 {\left(1 - p\right)}^{3} + \cdots\right)$

In my view, the previous step and the following step are the trickiest bits of algebra in this whole process. Pay close attention to how the $k$ can be rewritten into the infinite sum of infinite sums starting at ascending values.

$\textcolor{w h i t e}{E \left(X\right)} = p \left({\sum}_{k = 1}^{\infty} {\left(1 - p\right)}^{k - 1} + {\sum}_{k = 2}^{\infty} {\left(1 - p\right)}^{k - 1} + {\sum}_{k = 3}^{\infty} {\left(1 - p\right)}^{k - 1} + \cdots\right)$

Note that $0 < p < 1$, so we also have that $0 < 1 - p < 1$. Thus, we can use the sum of the infinite geometric series, i.e., that ${\sum}_{k = 1}^{\infty} {r}^{k - 1} = \frac{1}{1 - r}$.

$\textcolor{w h i t e}{E \left(X\right)} = p \left(\frac{1}{1 - \left(1 - p\right)} + \frac{1 - p}{1 - \left(1 - p\right)} + {\left(1 - p\right)}^{2} / \left(1 - \left(1 - p\right)\right) + \cdots\right)$

$\textcolor{w h i t e}{E \left(X\right)} = 1 + \left(1 - p\right) + {\left(1 - p\right)}^{2} + \cdots$

Which is another geometric series:

$\textcolor{w h i t e}{E \left(X\right)} = \frac{1}{1 - \left(1 - p\right)}$

$\textcolor{w h i t e}{E \left(X\right)} = \frac{1}{p}$

So, the expected number of trials is $1 / p$.