How to find the $~\text{Var}(X)~$ of the function $~f(x)=2(1/3)^x~$ where $~x=1,2,3,\cdots~$?
I was able to find $~E[X]~$ by writing out the series and subtracting series to find that $~E[X] = 3/4~$, but I'm having trouble finding $~E[X^2]~$ through series notation.
So far I have $$E[X^2]=2[1^2(1/3)+2^2(1/3)^2+3^2(1/3)^3+...]~.$$ How do I sum this series to find $~E[X^2]~$ and thus the $~\text{Var}(X)~$?
Thank you and I appreciate any help!
$\newcommand{\E}{\Bbb{E}}$Note that your random variable has PMF $f(x) = q^{x-1}p$, where $p=2/3$ and $q=1/3$.
This means that $X$ has a Geometric distribution on $\Bbb{Z}^{+}$, so its variance is $\frac{q}{p^2} = \frac{1/3}{4/9} = \frac{3}{4}$, using the formula for the variance of a Geometric random variable.
If you want to sum your series directly to find $\E\left[X^2\right]$, note that $$\E\left[X^2\right] = \sum\limits _{k=1}^{\infty}k^2 q^{k-1}p = \frac{p}{q} \sum\limits _{k=1}^{\infty}k^2 q^{k}.$$
Now, it is shown here that $$\sum\limits _{k=1}^{\infty}k^2 z^k = \frac{z(1+z)}{(1-z)^3}$$ if $|z|<1$. Use this result to evaluate the above sum.