How do you calculate the expected value of geometric distribution without diffrentiation?
Is there any way I can calculate the expected value of geometric distribution without diffrentiation? All other ways I saw here have diffrentiation in them.
Thanks in advance!
Solution 1:
The equivalent question outlined in the comments is to find the value of $$S = \sum_{k=1}^\infty kx^{k-1}$$
We can write out the first few terms:
$$S = 1 + 2x + 3x^2 + 4x^3 + 5x^4 + 6x^5 + \cdots$$
Multiply by $x$ to get
$$xS = 0 + x + 2x^2 + 3x^3 + 4x^4 + 5x^5 + \cdots$$
Now subtract $xS$ from $S$:
$$S - xS = 1 + x + x^2 + x^3 + x^4 + x^5 + \cdots$$
The right hand side is a standard geometric series, which means, when $|x|<1$,
$$S - xS = \frac{1}{1-x}$$
$$S(1-x) = \frac{1}{1-x}$$
$$ S = \boxed{\frac{1}{\left(1-x\right)^2}}$$
The original series' terms are an arithmetico-geometric sequence, and this trick of multiplying by the common ratio and subtracting can be used for many similar series.
Solution 2:
The geometric distribution is memoryless so either you succeed in the initial attempt with probability $p$ or you start again with probability $1-p$ having made a failed attempt,
if the succeeding on the first attempt counts as $1$ attempt:
$$E[X]=p\times 1+(1-p)\times (1+E[X])$$ so $$p\times E[X]=1$$ so $$E[X]=\frac{1}{p} \text{ attempts}$$
while if succeeding on the first attempt counts as $0$ failures:
$$E[X]=p\times 0+(1-p)\times (1+E[X])$$ so $$p\times E[X]=1-p$$ so $$E[X]=\frac{1-p}{p} \text{ failures}$$
and naturally $\frac1p = \frac{1-p}p +1$ since you stop at the first successful attempt
Solution 3:
$$\Pr(X=x)=p(1-p)^{x-1},x\in\{1,2,3,\cdots\}$$ $$\mu_X=\sum_{x=1}^{\infty}x\ p(1-p)^{x-1}$$ changing variable $1-p=q$: $$\mu_X=\sum_{x=1}^{\infty}x\ (1-q)q^{x-1}=\sum_{x=1}^{\infty}x\ q^{x-1}-x\ q^{x}=\sum_{x=0}^{\infty}(x+1)\ q^{x}-x\ q^{x}=\sum_{x=0}^{\infty}q^{x}=\frac{1}{1-q}=\frac1p$$
Solution 4:
I know at least two ways off hand and there are probably others.
First I'll show you a concrete way to do it. After that I'll show you how to express the same thing exactly. (Together these make up only one of those "two ways". The other one now appears in the answer posted by "Henry".) $$ \begin{array}{cccccccccccccccccccccccc} & 0 & & 1 & & 2 & & 3 & & 4 & & 5 & & 6 \\ \hline & & & p^1 & + & 2p^2 & + & 3p^3 & + & 4p^4 & + & 5p^5 & + & 6p^6 & + & \cdots & {} \\[12pt] = & & & p^1 & + & p^2 & + & p^3 & + & p^4 & + & p^5 & + & p^6 & + & \cdots \\ & & & & + & p^2 & + & p^3 & + & p^4 & + & p^5 & + & p^6 & + & \cdots \\ & & & & & & + & p^3 & + & p^4 & + & p^5 & + & p^6 & + & \cdots \\ & & & & & & & & + & p^4 & + & p^5 & + & p^6 & + & \cdots \\ & & & & & & & & & & + & p^5 & + & p^6 & + & \cdots \\ & & & & & & & & & & & & + & p^6 & + & \cdots \\ & & & & & & & & & & & & & & + & \cdots \\ & & & & & & & & & & & & & & \vdots \end{array} $$ First sum each (horizontal) row. Each is a geometric series. Then sum the remaining series, which is also geometric.
Here is the same method expressed abstractly in the language of algebra: \begin{align} \sum_{x=0}^\infty x (1-p) p^x & = \sum_{x=1}^\infty x (1-p) p^x = \sum_{x=1}^\infty \sum_{j=1}^x (1-p)p^x \\[10pt] & = \sum_{ x,j\, : \, 1 \,\le\, j \, \le \, x} (1-p) p^x = \sum_{j=1}^\infty \sum_{x=j}^\infty (1-p)p^x \end{align} Now you're summing a geometric series as $x$ goes from $j-1$ to $\infty,$ and then the outer sum, as $j$ goes from $1$ to $\infty,$ also turns out to be geometric.
(In the very first step above I put $\displaystyle\sum_{x=0}^\infty = \sum_{x=1}^\infty.$ That is justified by the fact that when $x=0,$ the actual term being added is $0$ so it can be dropped.)