\( E(X)=\sum_{x=1}^{\infty }\frac{x}{2^{x}} \\now\: see\: in\: numerical\: form 1/2+2/2^2+3/2^3+.............. \\simplified\:as \\1/2+1/2^2+1/2^3+............. \\1/2^2+1/2^3+............. \\1/2^3+........... \\this\: can\: be \: written\: as \\\sum_{j=1}^{\infty }\sum_{x=j}^{\infty }\frac{1}{2^{x}}= \sum_{j=1}^{\infty }\frac{1}{2^{j-1}}=2 \\E(X^{2})=\sum_{x=1}^{\infty }\frac{x^{2}}{2^{x}} \\numerical\: form \\1/2+2*2/2^2+3*2^3+............. \\simplified\: as \\1/2+2/2^2+3/2^3+....... \\2/2^2+3/2^3+........ \\3/2^3+........ \\so\: now\: you\:know\:value\: 1/2+2/2^2+3/2^3+....... \\nested\: as\: \sum_{n=1}^{\infty }\left ( \sum_{j=n}^{\infty }\sum_{x=j}^{\infty }\frac{1}{2^{x}}+\frac{n-1}{2^{n-1}} \right ) \\Note:-\frac{n-1}{2^{n-1}} \: is\: added\: because... I\: give\: you\: a\: example \\take\: any \: number \: say\: n= 5 \\\sum_{x=5}^{\infty }\frac{x}{2^{x}}=5/2^5+6/2^6+7/2^7+..... \\=5\left ( 1/2^5+1/2^6+1/2^7+.... \right )+(1/2^6+1/2^7+..)+(...)+...so\: on \\it\: will\: give\: Sum\: as \\\sum_{j=5}^{\infty }\sum_{x=j}^{\infty }\frac{1}{2^x}+\frac{4}{2^4} \\so\: for\: every\: n\: it \: gives\: extra\: \frac{n-1}{2^{n-1}} \\Hence, \\E(X^2)=\sum_{n=1}^{\infty }\left ( \sum_{j=n}^{\infty }\sum_{x=j}^{\infty }\frac{1}{2^{x}}+\frac{n-1}{2^{n-1}} \right )=6 \\Var(X)=E(X^2)-(E(X))^2=6-2^2=2 \) Note:It takes half hour to solve from first principle...... you may choose M.G.F/P.G.F. approach rather. and yes, quarter hour to write on LaTeX editor
Lol, shouldn't they be specifying it is a geometric distribution if we're supposed to use the mean & variance which cannot be worked out from first principles in the exam? This was an alternative way to solve the question, yet...
Which exam question was it? In the UK exams you will be expected to recognise discrete distributions from the question context and then use the standard results in the Tables.