Let
be the random variable representing the winnings you get for playing the game. Then
![W=\begin{cases}9&\text{if the sum is odd}\\4&\text{if the sum is 4 or 8}\\49&\text{if the sum is 2 or 12}\\-1&\text{otherwise}\end{cases}](https://img.qammunity.org/2020/formulas/mathematics/middle-school/45hqu279g4rk98zl3tyizvwkkzlfua1z9z.png)
First thing to do is determine the probability of each of the above events. You roll two dice, which offers 6 * 6 = 36 possible outcomes. You find the probability of the above events by dividing the number of ways those events can occur by 36.
- The sum is odd if one die is even and the other is odd. This can happen 2 * 3 * 3 = 18 ways. (3 ways to roll even with the first die, 3 ways to roll odd for the die, then multiply by 2 to count odd/even rolls)
- The sum is 4 if you roll (1, 3), (2, 2), or (3, 1), and the sum is 8 if you roll (2, 6), (3, 5), (4, 4), (5, 3), or (6, 2). 8 ways.
- The sum is 2 if you roll (1, 1), and the sum is 12 if you roll (6, 6). 2 ways.
- There are 36 total possible rolls, from which you subtract the 18 that yield a sum that is odd and the other 10 listed above, leaving 8 ways to win nothing.
So the probability mass function for this game is
![P(W=w)=\begin{cases}\frac12&\text{for }w=9\\\frac29&\text{for }w=4\text{ or }w=-1\\\frac1{18}&\text{for }w=49\\0&\text{otherwise}\end{cases}](https://img.qammunity.org/2020/formulas/mathematics/middle-school/8srxvy2da4omwc9110noy27sbchprk2hzv.png)
The expected value of playing the game is then
![E[W]=\displaystyle\sum_ww\,P(W=w)=\frac{71}9](https://img.qammunity.org/2020/formulas/mathematics/middle-school/n2dreeobg9c5kmgcohkegzx8xovc1pllty.png)
or about $7.89.
The expected value is positive, so a player can expect to earn money in the long run, and so should play the game.