Play n Tools

Free tools & games for everyone

Free · No sign-up · No accounts

Experiment design & randomizer

Randomly allocate participants with blocks and strata, make blind codes, plan factorial runs, Latin squares and cross-overs, and estimate sample sizes.

Write the seed down: the same seed always gives the same plan.

How to use

  1. Allocate: list the participants (or samples, plots, classes) with an optional stratum after a comma, or just type how many. Name the groups and their ratio and pick a method. Save the list as CSV and keep the seed.
  2. Factorial plan: list each factor and its levels. Every combination is run once per replicate, in a random order; ticking blocks keeps each replicate together.
  3. Latin square & cross-over: name the treatments to get an order for each subject or block, so position effects even out.
  4. Sample size: enter the smallest difference worth finding and the spread you expect (or two percentages) for a rough number per group.

Keyboard

TabMove between tabs, boxes and buttons; plans update as you type
Enter or SpaceOpen a tab or press the button that has focus

Tips

  • Blocks keep the groups balanced as people join; random block sizes make the next allocation harder to guess.
  • Stratify by the one or two things most likely to affect the result (site, age band). Too many strata leave each one nearly empty.
  • Blind codes hide the group: give staff and participants the codes, keep the key elsewhere.
  • Run factorial experiments in the random order shown, not in the tidy standard order, so drift over the day does not look like an effect.
  • Sample sizes here use the normal approximation; small studies, clusters or unusual outcomes need a statistician.
  • To pick random winners or split a class into teams, try our Random picker & team maker.

About the methods

All plans come from a seeded generator (mulberry32 seeded from the text you type), so they can be reproduced and checked. Simple randomization picks each group with chance in proportion to its ratio. Permuted blocks list each group ratio × multiplier times and shuffle the block (Fisher–Yates); stratified allocation runs separate blocks inside each stratum. Blind codes are 5 characters from 31 letters and digits with look-alikes (0, O, 1, I, L) removed.

The half fraction keeps the runs whose levels multiply to +1 (defining relation I = ABC…). Latin squares shuffle the rows, columns and symbols of a cyclic square. A Williams design has each treatment follow every other exactly once (twice the rows for an odd number of treatments).

Sample size: n per group = (1 + 1/k) (z1−α/2 + z1−β)² σ² / δ² for means, and the usual pooled formula for two proportions. The tests check balance, reproducibility, Latin and Williams properties and the sizes against Python’s own normal distribution.

See you tomorrow!

A fresh daily puzzle every morning, and new tools added every month.

Browse every product