Practical guide

Fair Random Draws, Sampling & Classroom Grouping

Why naive Math.random() scripts and modulo shortcuts introduce subtle bias—and how to run transparent, reproducible draws for classrooms, teams, and informal giveaways.

WebToolDock Editorial Team Updated November 28, 2026 6 min read

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:

ModeCan the Same Value Win Twice?Typical Use Case
Without replacement (No repeats)No—each selected item is removed from the poolRaffle prizes, seating assignments, presenter order, team splits
With replacement (Allow repeats)Yes—every draw is independentDice simulations, Monte Carlo drills, repeated quiz prompts
Session-wide no-repeatNo across multiple separate clicks until resetCalling on students across a class period one at a time

2. Three reproducible draw workflows

Workflow A — Multi-round classroom cold-calling (1–100)

  1. Open the Random Number Generator 1–100.
  2. If you have 28 students numbered 1–28, enter 29-100 in the Exclude numbers or ranges box.
  3. Set Session history filter to Avoid previous draws in this session.
  4. Click Generate numbers once per question. Each student is drawn at most once until you click Reset history & pool.
  5. Download the CSV at the end of class if you want a clean participation log.

Workflow B — Visual giveaway or multi-winner wheel

  1. Paste one participant per line in Wheel of Names (names containing commas such as Chen, Alex stay intact on one slice).
  2. Click Spin the wheel—the winner is drawn cryptographically first, and the wheel rotates to land squarely under the pointer.
  3. 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.

Scope reminder: Browser-side cryptographic sampling is ideal for classrooms, team decisions, games, and informal giveaways. Legally regulated lotteries or Sweepstakes audits require independent certified draw systems and official compliance logging.
Analytics preferences

Optional Google Analytics cookies help us understand visits and improve our tools. Analytics is off until you allow it. Your tool inputs and files are never included in our analytics events. Read our privacy policy.

Analytics is off.