I am having a hard time getting comfortable with random variables and expected values.
Here is the question:
I flip two fair and indepedent coins. If the first coin comes up tails you loose $\$1$ (ie. you win $-\$1$). If the second coin comes up heads you win $\$2$.
For example: First coin comes up tails and second coin comes up heads your total winning is $\$1$ ($-\$1$ + $\$2$ = $\$1$)
Define the random variable X to be the amount of dollars that you win. What is the expected value of X?
Here is what I think:
So I'll define $X$ as $X= amount\ won$
The probability of each winning amount is $\frac1 4$. So my expected value is calculated as:
$E(X) = -1 * \frac1 4 + 1*\frac1 4+0*\frac1 4+2*\frac1 4=\frac1 2$
Am I doing this correctly or is there a better way? Also what would happen in the case of if I flipped a fair coin n times, and after n times I stop with the same rules what would be the expected value?