1

I am reading Casella & Berger's Statistical Inference and trying to solve some of the exercises. Looking at the correction of exercise 2.20, the author used a method I don't understand, even introducing a derivative in the infinite sum. Can you please explain the steps that led to $\frac1p$?


$$\mathbb{E}X = \sum_{k=1}^\infty k(1-p)^{k-1}p = p - \sum_{k=1}^\infty\frac{d}{dp}(1-p)^k = -p\frac{d}{dp}\left[\sum_{k=0}^\infty\left(1-p\right)^k-1\right]=-p\frac{d}{dp}\left[\frac{1}{p}-1\right]=\frac{1}{p}$$


Wikipedia and other websites have similar proofs, usually for deriving the expectation of a geometric distribution.

Nicolas
  • 36
  • 3
    Think of each step as an exercise for yourself to prove. Is there one in particular you're stuck on? – Karl Aug 16 '22 at 15:24
  • Power series can be differentiated term by term, if your problem is the exchange between the derivative and the infinite sum. – Dark Magician Aug 16 '22 at 15:34
  • The derivative of a sum of functions is equal to the sum of their derivatives, et vice versa: $f^{'}(x)+g^{'}(x)=(f(x)+g(x))^{'}$ – callculus42 Aug 16 '22 at 16:13
  • @Karl I can't figure out how the derivative is introduced in the third part. How is the sum of a quantity suddenly becoming the sum of a derivative of something else? – Nicolas Aug 16 '22 at 18:10
  • @Nicolas Can you verify that the expressions are equivalent? Use the power rule and chain rule to evaluate the derivative, and note that the first term of the sum is treated separately. Also, it looks like there are a few mistakes in your mathjax transcription! – Karl Aug 16 '22 at 18:37

1 Answers1

2

The author slightly overcomplicated this by separating out the first term of the sum.

By the power rule and chain rule, $\frac{d}{dp}(1-p)^n=-n(1-p)^{n-1}$. Also, if $S=\sum_{k=1}^\infty r^k$, then $rS=S-r$, so $S=\frac r{1-r}$. Therefore:

$\begin{align} \Bbb EX &=\sum_{k=1}^\infty k(1-p)^{k-1}p \\ &= -p\sum_{k=1}^\infty(-k(1-p)^{k-1}) \\ &= -p\sum_{k=1}^\infty\frac{d}{dp}(1-p)^k \\ &= -p\frac{d}{dp}\sum_{k=1}^\infty(1-p)^k \\ &= -p\frac d{dp}\frac{1-p}{1-(1-p)} \\ &= -p\frac d{dp}\left(p^{-1}-1\right) \\ &= -p(-p^{-2}) \\ &= \frac1p. \end{align} $

Karl
  • 11,446
  • Thanks I understand now! There were no mistakes in the mathjax transcriptions, they are actually in the book. – Nicolas Aug 16 '22 at 19:36