Expected Value and Variance - Finding expected winnings A game is played where a fair coin is tossed until the first tail occurs.
The probability $x$ tosses will be needed is:
$$f(x)=(0.5)^x;x=1,2,3,\ldots$$
You win $2^x$ dollars if $x$ tosses are needed for $x=1,2,3,4,5$  but lose $256$ dollars if $x>5$
Determine your expected winnings
I'm a little confused on where to start in this question, if anyone can lead me in the right direction that'll be great, thanks!!
 A: \begin{align}
& \left(\sum_{x=1}^5 2^x\cdot\Pr(\text{winnings}= x)\right) - 256\cdot\Pr(\text{winnings}=256) \\[8pt]
= {} &  \left(\sum_{x=1}^5 2^x\cdot(0.5)^x\right) - 256\cdot \Pr\Big(\text{heads on all five of the first five tosses}\Big) 
\end{align}
Now simplify the expression $2^x (0.5)^x$ and figure out the probability of getting heads on all five of the first five tosses.
A: Let $X$ be the random variable indicating # of the toss in which the first tail occurred. Let $Y$ be a random variable which indicates the amount of money you earned.
We are given that $X$ has a probability function $P_X(x) =\left( \frac{1}{2}\right)^x=\mathbb P(X=x)$.
It is clear that $Y$ takes the values $2,4,8,16,32,-256$.
By definition: 
$$\mathbb E(Y) = \sum\limits_{y}y\;\mathbb P(Y=y) = \left[\sum\limits_{y}y\;\mathbb P(2^X=y)\right]-256\;\mathbb P(2^X=y)$$$$=\left[\sum\limits_{y}y\;\mathbb P(X\ln2=\ln |y|)\right]-256\;\mathbb P(X\ln2=\ln 256)$$
$$=\left[\sum\limits_{y}y\;\mathbb P\left( X=\frac{\ln |y|}{\ln2}\right)\right]-256\;\mathbb P\left( X=\frac{\ln 256}{\ln2}\right)$$
$$=\left[\sum\limits_{y}y(0.5)^{\frac{\ln |y|}{\ln2}}\right]-256(0.5)^{\frac{\ln 256}{\ln2}}$$
$$=\left[\sum\limits_{y}y(0.5)^{\frac{\ln |y|}{\ln2}}\right]-1.$$
Now compute $\mathbb E(Y^2)$ and apply $\mathbb{Var}(Y) = \mathbb E(Y^2)-(\mathbb E(Y))^2$.
