You are to pay $1 to play a game that consists of drawing one ticket at random from a box of numbered tickets. You win the amount (in dollars) of the number on the ticket you draw. The following two boxes of numbered tickets are available.

Tickets have 0, 1, and 2

Find the expected value and variance of your net gain per play.

$\displaystyle \displaystyle\sum_x xp(x)=(0)\frac{1}{3}+(1)\frac{1}{3}+(2)\frac{1}{3} =1$

But since the game cost a dollar $\displaystyle E[X]=0$, correct?

Is there a way to factor the cost into the sum with out saying the sum is 1 minus the cost?