About Random Number Generators
A Random Number Generator (RNG) is a mathematical construct designed to generate a sequence of numbers that do not display any predictable pattern. In computing, what we often refer to as "random" is actually "pseudo-random" — meaning it relies on a complex algorithm seeded by unpredictable physical phenomena (like the exact millisecond you clicked the button) to simulate true randomness.
Common Use Cases
- Sweepstakes & Giveaways: Fairly selecting a winner from a list of comments or entries by assigning each an ID.
- Statistics & Sampling: Selecting a random, unbiased sample group for polling or medical studies.
- Gaming & Tabletop: Simulating a dice roll of any size (e.g., a D20, D100, or completely arbitrary dice like a D7).
- Cryptography & Security: Generating unexpected keys or padding. (Note: For high-security cryptographic applications, specialized cryptographically-secure RNGs should be used).
Understanding Duplicates
When generating multiple numbers, you have the option to Allow Duplicates.
- With Duplicates (Replacement)Like rolling a die multiple times. You might roll a 6, and then roll another 6 immediately after.
- Without DuplicatesLike drawing a card from a deck or picking names from a hat. Once a number is picked, it cannot be picked again.
Odds & Probabilities
The probability of drawing a specific number depends entirely on your configured range. Here are the probabilities for common dice and draws:
| Scenario | Range (Min - Max) | Probability of a specific hit |
|---|---|---|
| Coin Toss | 1 - 2 | 50.00% (1 in 2) |
| Standard Die (D6) | 1 - 6 | 16.66% (1 in 6) |
| D&D Die (D20) | 1 - 20 | 5.00% (1 in 20) |
| Deck of Cards | 1 - 52 | 1.92% (1 in 52) |
| Percentage (D100) | 1 - 100 | 1.00% (1 in 100) |