Flip a coin

Heads or tails without a coin in your pocket. One flip or a whole series.

Space works too

Exactly fifty-fifty

A two-value range is the one case where rejection sampling is not needed at all: 2³² divides evenly by two and both outcomes are strictly equally likely.

A real coin is messier. Minting makes the sides differ slightly in mass, and studies of physical flipping show another bias: the side facing up before the flip lands up slightly more often, roughly 51 times in 100. A tiny difference, but a real one — and it is absent here.

Streaks and misconceptions

Five tails in a row look like a glitch but happen in about three per cent of five-flip series. Expecting neat alternation is the main misconception about randomness: real randomness looks lumpy.

A coin does not remember previous flips. After five tails the chance of heads is still exactly one half, and the same holds for any fair generator.

Questions

Frequently asked questions

Is it exactly fifty-fifty?

Yes. A range of two divides 2³² evenly, so no rejection is even needed: both outcomes are strictly equally likely. A real coin is not like that — minting makes the sides differ slightly in mass, and when flipped by hand the side that started up comes up slightly more often.

Why did I get five tails in a row?

Because that is how randomness works. Five identical outcomes happen in about three per cent of five-flip series. Expecting neat alternation is the single most common misconception about random numbers.

How do I flip a coin several times?

Raise the count for a series of independent flips. Do not tick “no repeats”: on two flips it would make the result predetermined.

Next

Other tools

Copied