While trying to compute the variance I'm getting
$$Var(x)=\sum_{x_i=1}^\infty (x_i-2)^2 \left(\frac{1}{2}\right)^{x_i}$$
I thought to try integrals of the constituents $$\int_1^\infty x^2\left(\frac{1}{2}\right)^{x}dx$$
$$\int_1^\infty 4\left(\frac{1}{2}\right)^{x}dx$$
$$\int_1^\infty -2x\left(\frac{1}{2}\right)^{x}dx$$
but this isn't right and I remember that integrals can only really approximate series. How would one in general tackle a sum like this? Any help is greatly appreciated
For simplicity in notation, I will use n rather than $x_i$ and k for $\frac{1}{2}$. Your original expression is then $Var(x)=\sum_1^{\infty}(n-2)^2k^n=A-4B+4C$, where $A=\sum_1^{\infty}n^2k^n$, $B=\sum_1^{\infty}nk^n$, and $C=\sum_1^{\infty}k^n$. These terms are easily evaluated with infinite geometric series. $C=\frac{k}{1-k}$, $B=k\sum_1^{\infty}nk^{n-1}=k\frac{d}{dk}\sum_0^{\infty}k^n=\frac{k}{(1-k)^2}$, and $A=\sum_1^{\infty}n(n-1)k^n+\sum_1^{\infty}nk^n =k^2\frac{d^2}{dk^2}\sum_0^{\infty}k^n+k\frac{d}{dk}\sum_0^{\infty}k^n=\frac{k^2}{2(1-k)^3}+\frac{k}{(1-k)^2}$ Therefore $C=1, \ B=2,\ A=6,\ and\ var(x)=2$.
Note: In taking the derivatives, the extra terms in the sums drop out.