$$ 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?