NapkinCalc

Probability — Chance & Counting

What a probability is

ELI5: a probability is just a fraction of outcomes that count: P = (favourable outcomes) / (all equally-likely outcomes). It always sits between 0 (impossible) and 1 (certain). A fair die has 6 faces, so rolling an even number (2, 4, 6) has probability 3/6 = 1/2.

peven=36p_{even} = \frac{3}{6} = 0.50000.5000 P(even on a die)
✓ pass peven==0.5p_{even} == 0.5 three of six faces are even
pnotsix=56p_{not_six} = \frac{5}{6} = 0.83330.8333 P(not a six) = 1 − P(six)
✓ pass abs(pnotsix+161)<109\mathrm{abs}\left(p_{not_six} + \frac{1}{6} - 1\right) < 10^{-9} something and its opposite cover all the probability (sum to 1)

Real-world hook: "fraction of outcomes that count" is exactly how insurance premiums, casino odds, and a weather app's "30 % chance of rain" are computed.