How this calculator works
The seed initializes a Park-Miller pseudorandom sequence. Each generated value is mapped into [0,1) and compared with the chosen probability of heads. The same seed and settings always reproduce the same results, including after reset. This is a teaching simulation with a finite deterministic sequence. It is unsuitable for passwords, cryptographic keys, audited draws or gambling settlement.
Formula
State_next = (16807 × state) mod 2147483647. U = (state_next - 1)/2147483646. A flip is heads when U < p.
Worked example
With seed 1, a 50% head chance and five flips, the sequence is Heads, Heads, Tails, Heads, Tails. There are three heads and two tails, with a longest heads run of two.
Advertisement
Frequently asked questions
How do I flip again?
Change the seed. Changing only the number of flips extends or shortens the same reproducible sequence.
Does reset create a new sample?
Reset restores the default seed and settings, so it restores the same default sample.
Must a short sample be half heads?
No. A probability describes the generating model, not a fixed quota. Short sequences can have strongly uneven totals.