Probability facts for 1–2
| Question | Answer |
|---|---|
| Chance of one specific number | 1 in 2 (50%) |
| Chance of an even number | 1 of 2 = 50% |
| Chance of a prime number | 1 primes = 50% |
| Average result (expected value) | 1.5 |
| Standard deviation | 0.50 |
| Chance a given number shows up at least once in 10 picks | 99.9% |
| Average picks to see every number at least once | 3 |
How it works
The generator draws a uniform random integer from 0 to 1 with crypto.getRandomValues and adds 1. Rejection sampling removes the small bias that the plain “random modulo 2” trick would cause.
With two outcomes this is a coin flip: 50/50 each time, independent of previous results.
Every outcome
| Number | Probability |
|---|---|
| 1 | 50% (1/2) |
| 2 | 50% (1/2) |