I'm trying to find $E[{X \choose 2}]$ where $X$ is geometrically distributed with parameter $p$, but I'm not sure how to finish my solution.
My first thought was to use the standard definition of expected value:
$$E[g(X)]=\sum_x g(x)P(X=x)$$
Since $P(X=x)=p(1-p)^{x-1}$, this gives me:
$$E[{X \choose 2}]=\sum_x {x \choose 2}p(1-p)^{x-1}$$
I couldn't see a clear way to simplify this sum, so I figured I would try another method instead, using the law of total expectation. If I let $A_1$ be the event $X=1$ and $A_2$ be the event $X>1$, then I get this:
$$E[{X \choose 2}]=E[{X \choose 2}|A_1]P(A_1)+E[{X \choose 2}|A_2]P(A_2)$$
This is what I know:
$$E[{X \choose 2}|A_1]=0$$ $$P(A_1)=p$$ $$P(A_2)=1-p$$
That just leaves $E[{X \choose 2}|A_2]$ for what I'm unsure about. My guess is that it equals $E[{X+1 \choose 2}]$, but if that is the case, then I wouldn't know how to solve the result:
$$E[{X \choose 2}]=0p+E[{X+1 \choose 2}](1-p)=E[{X+1 \choose 2}](1-p)$$
So this is where I'm now stuck and I would appreciate some guidance on how to proceed. Thanks!
Let $x' = x-1$. Then
$\sum\limits_{x=1}^{\infty}\dfrac{x(x-1)}{2}p(1-p)^{x-1}$
$= \sum\limits_{x = 2}^{\infty}\dfrac{x(x-1)}{2}p(1-p)^{x-1}$
$=\sum\limits_{x'=1}^{\infty}\dfrac{(x'+1)x'}{2}p(1-p)^{x'}$
$= (1-p)\sum\limits_{x'=1}^{\infty}\dfrac{x'^2 + x'}{2}p(1-p)^{x'-1}$
$= (1-p)\sum\limits_{x'=1}^{\infty}(\dfrac{x'^2-x'}{2} + x')p(1-p)^{x'-1}$
$= (1-p)\sum\limits_{x'=1}^{\infty}\dfrac{x'^2-x'}{2}p(1-p)^{x'-1} + (1-p)\sum\limits_{x'=1}^\infty x'p(1-p)^{x'-1}$
$= (1-p)\sum\limits_{x'=1}^{\infty}\dfrac{x'(x'-1)}{2}p(1-p)^{x'-1} + (1-p)\sum\limits_{x'=1}^\infty x'p(1-p)^{x'-1}$
Thus, $E[\binom{X}{2}] = (1-p)E[\binom{X}{2}] + (1-p)E[X]$
Note that by definition, $\binom{n}{k} = 0$ for $n<k$, so you can use $x(x-1)/2$ instead of $\binom{x}{2}$.