How WebToolDock keeps draws fair
Every WebToolDock random tool draws entropy from the browser’s Web Crypto API (crypto.getRandomValues()) using rejection sampling to eliminate modulo bias and Fisher–Yates shuffling for draws without replacement—and never silently redraws when you change a dropdown or sort results.
1. With replacement vs. without replacement
Choosing the right sampling rule is the most common source of mistakes in raffles and classroom picks:
| Mode | Can the Same Value Win Twice? | Typical Use Case |
|---|---|---|
| Without replacement (No repeats) | No—each selected item is removed from the pool | Raffle prizes, seating assignments, presenter order, team splits |
| With replacement (Allow repeats) | Yes—every draw is independent | Dice simulations, Monte Carlo drills, repeated quiz prompts |
| Session-wide no-repeat | No across multiple separate clicks until reset | Calling on students across a class period one at a time |
2. Three reproducible draw workflows
Workflow A — Multi-round classroom cold-calling (1–100)
- Open the Random Number Generator 1–100.
- If you have 28 students numbered 1–28, enter
29-100in the Exclude numbers or ranges box. - Set Session history filter to Avoid previous draws in this session.
- Click Generate numbers once per question. Each student is drawn at most once until you click Reset history & pool.
- Download the CSV at the end of class if you want a clean participation log.
Workflow B — Visual giveaway or multi-winner wheel
- Paste one participant per line in Wheel of Names (names containing commas such as
Chen, Alexstay intact on one slice). - Click Spin the wheel—the winner is drawn cryptographically first, and the wheel rotates to land squarely under the pointer.
- For a 3-prize giveaway where one person cannot win twice, click Remove winner & spin after each prize.
Workflow C — Balanced breakout teams
When dividing 10 people into 3 groups in the Random Group Generator, the list is shuffled once with Fisher–Yates and dealt round-robin across the 3 teams. That guarantees group sizes differ by at most one person (two groups of 3 and one group of 4) with equal probability for every pairing.
3. Why rejection sampling matters
A naive JavaScript shortcut like Math.floor(Math.random() * n) has two flaws: Math.random() is a non-cryptographic pseudo-random generator, and taking a 32-bit random integer modulo n slightly favors smaller outcomes whenever 2³² is not evenly divisible by n. Rejection sampling discards out-of-range values above the largest clean multiple of n so every item has an identical mathematical chance.