The Randomisation Table Simulator

Armando Teixeira-Pinto

How a randomisation table was used — the four classic steps

1. Open the table of random digits.   2. Choose a starting point “by chance” (traditionally: close your eyes and drop a pencil on the page).   3. Apply a pre-written rule converting digits into allocations.   4. Enrol patients in order and read off their allocation, one digit at a time. Nobody can predict or choose the next assignment — that is the whole point.

1 Set up your trial

2 The random digit table

Each cell is one random digit (0–9). Click any cell to place your pencil, or leave it to chance:

digit → Treatment digit → Control block permutation pick skipped digit

3 Enrol patients & allocate

Welcome. First choose a starting cell (or drop the pencil), then press Next patient.
No patient yet
The next patient’s allocation will appear here.
?
Treatment0
Control0
Event log

    4 Watch the balance drift — running difference (Treatment − Control)

    The line wanders around zero. Simple randomisation can drift far from balance in small trials; blocked randomisation snaps back to zero at the end of every block.

    5 “But how often does it actually balance?” — repeat the trial 2,000 times

    One randomisation is just one possible outcome. This panel re-runs your exact design 2,000 times and shows the distribution of the final imbalance (Treatment − Control).

    Teaching notes & discussion questions

    Why randomise at all?

    • Random allocation removes selection bias: the investigator cannot steer healthier or sicker patients into one arm.
    • It makes groups comparable on average — even for factors nobody measured.
    • It underpins the statistics: p-values assume treatment was assigned by chance.

    Why not alternate (A, B, A, B…)?

    • Alternation balances perfectly but is 100% predictable. Allocation must be unpredictable and concealed (sealed opaque envelopes, central pharmacy, web systems).

    A slice of history

    • 1927 — Tippett publishes the first printed random-digit tables.
    • 1938 — Fisher & Yates include them in their statistical tables.
    • 1955 — RAND prints A Million Random Digits, generated by an electronic roulette wheel.
    • Today the same logic runs in software — the principle is unchanged.

    Simple vs blocked

    • Simple: like coin-flipping; small trials can end lopsided (try n = 20 several times).
    • Blocked: every block holds exactly half Treatment / half Control. Trade-off: with a fixed, known block size in an open-label trial, late allocations become guessable — real trials use randomly varying block sizes.

    Questions for students

    • Run simple randomisation with n = 20 five times. How often did you get exactly 10 vs 10? Compare with the theoretical probability shown by the Monte-Carlo panel.
    • Why does blocked randomisation always end balanced when n is a multiple of the block size? What happens when it is not?
    • Block size 4, open-label trial, block so far is T, T, C. What must come next — and why is that a problem?
    • Which digits get skipped with block size 4, and why is skipping legitimate?