Coins Left After Pairing Off
Flip 50 fair 1-euro coins. Repeatedly remove one head together with one tail until no head-tail pair is left. You keep every coin that survives.
from math import comb
n = 50
print(round(sum(abs(2*h - n) * comb(n, h) for h in range(n + 1)) / 2**n, 2))
Give the exact expected payout in euros, which is the number this snippet prints.
Answer format: round to 2 decimal places.
Sign in to answer questions and track your progress
Sign In