4. A carnival game has the following payouts:

payout (x) $10 $20 $30 $40
probability (p) 40% 25% 20% 15%
a) If you play the game repeatedly, what is the expected value (long-run average) of the payouts?
b) What does the carnival have to charge to make this a fair game?

To find the expected value of the payouts, you need to multiply each payout by its corresponding probability and then sum them up. Let's calculate:

a) Expected value (E) = (Payout_1 * Probability_1) + (Payout_2 * Probability_2) + (Payout_3 * Probability_3) + (Payout_4 * Probability_4)

E = ($10 * 0.40) + ($20 * 0.25) + ($30 * 0.20) + ($40 * 0.15)
E = $4 + $5 + $6 + $6
E = $21

The expected value of the payouts in the long run is $21.

b) To make the game fair, the carnival needs to charge an amount that is equal to the expected value. In this case, the carnival should charge $21 per game. This way, over a large number of games, the average amount paid by players will be counterbalanced by the average amount won, resulting in a fair game.