If we define the geometric pmf as , the second moment of a geometric random variable should be . However, when I try to derive it, I'm getting . Can somebody help me find the error in my derivation?
Let q = 1-p.
If we define the geometric pmf as , the second moment of a geometric random variable should be . However, when I try to derive it, I'm getting . Can somebody help me find the error in my derivation?
Let q = 1-p.
$\displaystyle \sum \limits_{x=1}^\infty ~x\left(\dfrac{d}{dq}~q^x\right)p \neq p \dfrac {d}{dq}\left( \displaystyle \sum \limits_{x=1}^\infty~x q^x\right)$
what you probably have to do is
$\displaystyle \sum \limits_{x=1}^\infty ~x^2 q^{x-1}p =
\displaystyle p\sum \limits_{x=1}^\infty~\left(q \dfrac{d^2}{{dq}^2}\left(q^x\right) + \dfrac{d}{dq}\left(q^x\right)\right)$
and proceed as you did before.
a minor nit: One doesn't use $x$ for integer variables. Use $i,j,k,m,n$ instead