Alex L. answered 06/23/21
Experienced and licensed math educator w/ practical statistics exp.
Good question.
First flip: Half the time it's heads and you win $5, so $5 *0.5 = $2.50
If tails, then heads, win $10, so $10 * 0.5 * 0.5 = $2.50
If tails, then tails, then heads, win $20, so $20 * 0.5 * 0.5 * 0.5 = $2.50
If tails, then tails, then tails, win nothing, so $0 * 0.5 * 0.5 * 0.5 = $0
We can check that all of those fractional parts, added together, make 1, or all possibilities.
Expected value is the sum of those dollar amount results, or $7.50.
So, if someone says you can play for $5, then play. If the game costs $10, then don't play.