What people actually use random numbers for
Six categories cover almost every real request, and they need different kinds of randomness.
The six categories
| Use | Typical range | With or without repeats |
|---|---|---|
| Fair draw / raffle | 1 to entry count | Without |
| Sampling for review | 1 to record count | Without |
| Game mechanics | Dice, d20, cards | Depends on the dice |
| Test data | Any range or length | Either, usually with |
| Task or seat allocation | 1 to person count | Without |
| Decisions and tie-breaks | 1 to option count | N/A |
Without replacement is the one people get wrong
Drawing winners one at a time and re-rolling on a duplicate is the manual approach, and it has two problems: it wastes attempts, and it makes the process look arbitrary even when it is fair. Sampling without replacement — a partial shuffle — is both correct and easier to explain.
The distinction also changes the maths. With replacement, each draw has the same probability. Without, the pool shrinks, so probabilities shift after every pick.
Where randomness should not be used
Anything that needs to be reproducible: test fixtures that must match across runs, A/B assignment that must be stable for a user, or a deterministic simulation. In those cases you want a seeded generator, not a random one — the same seed reproduces the same sequence.
And anything security-relevant should use a cryptographic source, not a convenience page. A random number for a raffle and a random number for a token look identical but have opposite requirements.
Frequently asked questions
What is the difference between a draw and a pick?
A draw usually implies order and no repeats; a pick implies a single independent choice. For multiple winners, you want the draw behaviour.
Can I use a random number generator for a giveaway?
For a casual one, yes. For anything with legal weight, document the method and the entry list before drawing, and keep the ordered result.
Should test data be random or seeded?
Seeded, if the tests depend on it. Random values that change every run make failures hard to reproduce.