Suppose I toss a fair coin independently until I get a tail. Let X be the number of time the coin is tossed, if the coin is tossed x times, a reward of $2^x$ will be given, the question is what is the expected money I get?
A systematic approach would be to think of X is a geometric random variables and let $g(x)=2^x$ then use the formula
$E[g(x)]=\sum_xg(x)P_X(x)=\sum_x1$
which can not even be evaluated. Can anyone tell me where I was wrong?