0

$$ Prove: var(X) = \frac{1-p}{p^2} $$

I solved for $$E[X^2]-E[X]^2$$

I did the following for $E(X)$

$$ E(X) = (\frac{1}{p}) $$

I did the following for $E(X^2)$

$$E(X^2)=\sum^\infty_n n^2p(1-p)^n$$

$$E(X^2)=p\sum^\infty_n n^2(1-p)^n$$

$$E(X^2)=p\left(\frac{p^2-3 p+2}{p^3}\right)$$

$$E(X^2)=\frac{p^2-3 p+2}{p^2}$$

I don't know where I make a mistake but when I solve it I end up with this instead: $$ V(X) = (\frac{p^2-5p+2p+1}{p^2}) $$

Where did I go wrong?

William
  • 1
  • 1

1 Answers1

0

For this version of the geometric distribution, the mean is $\frac{1-p}{p}$, not $\frac{1}{p}$. Correcting this in your work will lead you to the right expression for the variance.


If $E[X] = \sum_{n \ge 0} np(1-p)^n$, then $(1-p) E[X] = \sum_{n \ge 0} np(1-p)^{n+1} = \sum_{n \ge 1} (n-1) p(1-p)^n$ where the last equality is due to shifting the index $n$ by one. Thus, $$\begin{align} p E[X] &= E[X] - (1-p)E[X] \\ &= \sum_{n \ge 0}np(1-p)^n - \sum_{n \ge 1} (n-1) p (1-p)^n \\ &= \sum_{n \ge 1} p(1-p)^n \\ &= 1 - p. \end{align}$$

angryavian
  • 89,882
  • How do you differentiate which is the correct mean? I do not understand why it is $\frac{1-p}{p}$ – William May 04 '21 at 00:47
  • @William You were able to compute $E[X^2] = \sum_{n \ge 0} n^2 p(1-p)^n$; you can compute $E[X] = \sum_{n \ge 0} np(1-p)^n$ similarly. – angryavian May 04 '21 at 00:54
  • thank you so much. It just clicked. – William May 04 '21 at 01:16
  • How do I mention you in the comment while responding to your comment like you could use my first name? I am new to MathStack – William May 04 '21 at 01:17
  • @William When possible, writing @ in a comment will bring up a drop down menu with a list of usernames that you can tag. However in this case since you are commenting on my answer, I will be notified anyway, so the @ tag is unnecessary (and actually will not work). – angryavian May 04 '21 at 01:54