Randomization and control groups: making a fair comparison
People who got a new treatment got better. Was it the treatment? Without a group to compare with, you cannot tell. Even with one, if a person picks who goes into which group, the groups lean from the start. Split 40 made-up participants yourself and see how to compare fairly.
Short answer. To know whether a treatment works, you compare a group that got it with a group that did not (the control group). If a person picks who goes into which group, the two groups differ from the start. If you draw lots instead (random assignment), both the differences you know about and the ones you do not are spread evenly over the two groups on average. That is why you can say the difference left at the end was caused by the treatment.
The 40 participants and their results are all made up with a fixed-seed random number generator, so they are the same every time you open the page. Bigger figures were more severe at the start (severity 1 to 9), darker figures are older (30 to 75). The result is "improvement" after 4 weeks, in points. There is one made-up hidden rule: no matter the treatment, each point less of starting severity means 1 point more improvement. Older people improve a little less, and a "constitution" that never shows on screen also adds a little. "Doctor's bias" is how strongly the doctor tries to put lighter cases on the new treatment (0 means no bias). ③ Draw lots ignores it. The lower picture stacks up the estimated effect from every "Assign again", one row per method. The black dashed line is the true effect, the orange line is the mean of the estimates collected. Changing the bias or the true effect starts the collection over.
Try this. ① The first view is the doctor's pick (bias 0.6, true effect 0). Mean starting severity is 3.89 in the treatment group and 6.46 in the control group. Improvement is 9.56 against 6.13, so the estimated effect comes out as 3.42. A treatment with zero effect looks like it works. ② Press "Assign again 200 times": the 201 estimates average 2.37. However many times you repeat, it does not come back to 0. ③ Press "③ Draw lots": starting severity is now close, 4.85 against 5.5, and the estimate is 0.54. After 200 more, the mean is 0.04 and the standard deviation 0.86, moving around 0. ④ "② Alternate" gives a first estimate of 2.12 and a mean of 2.47 over 201 runs. Taking turns looks fair, but a doctor who knows which group the next person will join can swap the order, and the bias comes back much like ①. ⑤ Set the bias to 0 and assign ① 200 more times: the mean is −0.02, the same as drawing lots. At bias 1 you get 3.93 every single time. But nobody can measure a real doctor's bias, not even the doctor. ⑥ At bias 0.6, set the true effect to 2: ① gives a first estimate of 5.42 and a mean of 4.37 over 201 runs, inflated, while ③ averages 2.04 over 201 runs, close to the true effect.
Definitions
The page explains with 40 participants, but the definitions are the same for any number of participants. For participants i = 1, …, n, is 1 if person i is assigned to the treatment group and 0 if assigned to the control group.
- control group
- The group that does not get the treatment being tested and serves as the baseline for the comparison. The group that gets the treatment is the treatment group. The control group gets a placebo, an existing treatment, or nothing, and everything else is kept the same as in the treatment group.
- potential outcomes and average treatment effect
- is the result participant i would have if treated, and the result if not treated. For each participant only the one for the assigned group is observed. The average treatment effect (ATE) is the mean of the individual effects over all participants.
- random assignment (randomization)
- Deciding which group each participant joins with a chance device such as random numbers. The assignment probabilities are fixed in advance and do not depend on any characteristic of the participant, so the assignment is independent of the potential outcomes. The simplest method, assigning each participant independently with the same probability ( for 1:1), is called simple randomization.
- block randomization
- Participants are grouped in order of arrival into blocks of size b, and within each block the order is set at random so that each group gets a fixed number (b/2 each for 1:1). Each time a block ends, the two groups are the same size. With 1:1 assignment, the number of possible orders in one block is:
- stratified randomization
- Participants are split into strata by the value of a variable that strongly affects the result (severity, sex, hospital, and so on), and block randomization is done separately within each stratum. That variable is then spread evenly across the two groups.
- allocation concealment
- Making sure that, until a participant is enrolled and assigned, the person enrolling them cannot know the next assignment in advance. It prevents selection bias before assignment and can be done in any trial. In the text this is "hiding the assignment order".
- blinding (masking)
- After assignment, keeping chosen people (participants, those giving care, those measuring the outcome, those analyzing) from knowing who is in which group. It prevents bias during care and while measuring the outcome.
1. You only know by comparing: the control group
To learn what a new treatment does, the question is not "what happened to the people who got it" but how that differs from "what would have happened to the same people without it". You cannot try both on the same person, so you keep a separate set of people who do not get the treatment and compare. The side that gets the treatment is the treatment group. The side you compare against is the control group.
For the comparison to be fair, the two groups must be alike in everything except the treatment: starting condition, age, daily life, even a constitution nobody knows about yet. If the doctor picks lighter cases for the new treatment, as in ① above, the treatment group fills up with people who would have done better anyway. The difference at the end then mixes the treatment's share with a share that was "different from the start", and you cannot pull them apart.
Observational studies and experiments
Studies split in two depending on whether the researcher decides who gets the treatment.
| Observational study | Experiment (randomized controlled trial) | |
|---|---|---|
| Who decides the treatment | The people themselves, or the doctor as usual. The researcher watches and records | The researcher. With random assignment, drawing lots decides |
| The groups at the start | May differ, and it is hard to know every reason why | Alike on average. Any difference left is chance |
| What you can say directly | "They show up together" (association) | "This caused it" (causation) |
| To claim a cause | You must block other causes (confounding) separately. Unknown causes cannot be blocked (confounding and bias) | Check that assignment, blinding and analysis went as planned |
| Example | Collect records of people who have been taking a drug and compare them with people who have not | Recruit participants, split them by drawing lots, and give the drug to one side only |
2. Without a control group: the before-after trap
The most common mistake is to skip the control group and compare the treated group "before" and "after" the treatment. All the improvement looks like the treatment's effect, but at least three things that would have happened without the treatment are mixed in.
- Getting better anyway. Many illnesses and symptoms ease with time on their own. A cold is the classic example.
- Drifting back toward the mean. People come to a clinic when they feel worst, and studies often take only people with a high score. That day's score includes some bad luck, so measured again later it often comes out less severe even with no treatment. This is regression to the mean (correlation and regression).
- Expectation (the placebo effect). Knowing you are being treated can make you feel better, or change what you do, like resting more or being more careful. It matters most for scores people report themselves, like pain or mood.
With a control group, these shares land on both sides equally, so subtracting one group from the other removes them. Change the sizes and the kind of control group below.
The numbers are made-up points for the explanation. The treatment group gets all four shares. The do-nothing control group gets only "gets better anyway" and "back toward the mean". The placebo control group also gets the expectation effect. The black dashed line carries the control group's height over to the treatment group, and whatever sticks out above it is the "difference" on the right. The scale stretches or shrinks so the treatment group's bar always fills the box.
Try this. ① At first (no control) all you see is that the treatment group improved by 7.5 points. The true effect is 1, and the other 6.5 points would have happened without the treatment. ② Press "Do-nothing control": the control group also improves by 5 points, and the difference is 2.5. The expectation effect of 1.5 is still stuck to the true effect of 1. ③ Press "Placebo control": the control group improves by 6.5, and the difference is 1, only the true effect. ④ Lower the true effect to 0. Without a control group, 6.5 points still look like an "effect", but against the placebo control the difference is 0.
Kinds of control group
| Control | What they get | What the difference tells you | When it is used |
|---|---|---|---|
| Placebo | Something that looks, tastes and is taken the same way, without the active ingredient | The new treatment's effect with expectation taken out | When there is no useful treatment yet |
| Existing treatment | The treatment that is standard today | Whether the new treatment beats the existing one (or is not much worse) | When a good treatment already exists, so withholding it and giving only a placebo would be unethical |
| Nothing | Nothing. Sometimes people wait and get it later | The effect of getting treated at all, expectation included | When a placebo cannot be made (surgery, exercise, counseling) |
Read it this way and you are wrong. "The placebo group improved this much, so that is the placebo effect." The placebo group's improvement also contains getting better anyway and drifting back toward the mean. In the lab above the placebo control improved by 6.5 points, but only 1.5 of that was expectation. To measure the placebo effect alone you need one more group that gets nothing.
3. How the formula is built
What you actually measure is the difference between the two group means. Let's follow the formula to see when that difference equals the treatment effect. There are three symbols. Y(1) is the result a person would have if treated, and Y(0) the result if not treated. Read T[Y(1)] as the mean of Y(1) over the treatment group, and C[Y(0)] as the mean of Y(0) over the control group.
Press "Next" to move one step at a time. A piece is added to the formula (the orange-shaded piece is the new one), the picture changes by that step, and the reason appears below. The people are the same 40 as in the first lab, and here the true effect is set to 1. Steps ② to ④ use an assignment the doctor picked with bias 0.6. Step ⑤ uses drawing lots. "Draw lots again" works in step ⑤.
Written only as formulas, the steps above look like this. The numbers are the doctor's pick from steps ② to ④.
- Two results per person:
Y(1) − Y(0). Think of each person as having a result "if treated", Y(1), and a result "if not treated", Y(0). What the treatment did for that person is the difference. In this toy example it is 1 point for everyone. The means over all 40 are Y(1) 8.84 and Y(0) 7.84. - You only see one:
difference = T[Y(1)] − C[Y(0)]. One person cannot be treated and not treated at the same time. In the treatment group you only see Y(1). In the control group you only see Y(0). So the difference you measure subtracts values from different people. With the doctor's pick it is 9.83 − 6.86 = 2.97, about three times the true effect of 1. Why: the formula has to start from what you can actually see. - Subtract and add the same thing:
− T[Y(0)] + T[Y(0)]. Take the value you cannot see, "the mean result the treatment group would have had without treatment", subtract it once and add it once. That adds 0, so the difference stays 2.97. Because the data is made up, we can open that value (8.83). Why: slotting it in is what lets you split "the same people compared with themselves" from "different people compared with each other". - Name the two parts:
difference = treatment effect + starting gap. The first part,T[Y(1)] − T[Y(0)], compares the same people's two results, so it is the treatment effect (1). The second part,T[Y(0)] − C[Y(0)], is two "without treatment" results from different people. It is the share by which the groups differed from the start, regardless of treatment: the starting gap (8.83 − 6.86 = 1.97). 2.97 = 1 + 1.97. When a person picks the groups, the starting gap is not 0. This is called selection bias. - With drawing lots: the starting gap averages 0. Drawing lots never looks at anyone's Y(0). So every person has the same chance of joining the treatment group, and the starting gap moves around 0. The more people, the closer it stays to 0. Repeating the same draw 1,000 times, the starting gap has a standard deviation of about 0.86 with 40 people and about 0.24 with 400. Now you can read the difference as "treatment effect + a little chance", and measuring the size of that chance is the job of hypothesis tests and confidence intervals.
In this toy example everyone's effect is the same, 1. In real life the effect can differ from person to person. Then the first part becomes "the average effect over the people in the treatment group", and with drawing lots that also equals "the average effect over everyone" on average. So what a randomized trial estimates is not one person's effect but the average effect over the whole group.
Try this. ① In the first step the means over the 40 people are Y(1) 8.84 and Y(0) 7.84, and the black arrow (treatment effect) is 1. ② Press "Next": the people split into two groups and one bar each turns into "?". The purple arrow (the difference you measure) is 2.97. ③ Press once more: the hidden Y(0) of the treatment group opens as orange dashed bars, with a mean of 8.83. ④ Once more: 2.97 splits into the treatment effect 1 and the starting gap 1.97. ⑤ The last step draws lots, and the starting gap is −0.04. Press "Draw lots again" four times: the gap goes −0.88, 0.62, 0.59, −0.38, back and forth across 0, and the mean of the five is −0.02.
Read it this way and you are wrong. "We drew lots, so the two groups are identical." "Zero on average" is about repeating the same draw many times. In one assignment a starting gap remains, like the −0.88 in step ⑤, and it is bigger with fewer people. Tests and confidence intervals account for that chance. The opposite is wrong too: "there is a small starting gap, so the randomization failed."
4. What drawing lots does: the known and the unknown
You might think: "Instead of drawing lots, why not split carefully by age and severity?" You can match the values you know. But the result does not depend only on what you know. The result in the lab above had a "constitution" mixed in that never showed on screen, and in real life habits, genes and things nobody has named yet get mixed in. You cannot match what you do not know.
Drawing lots looks at no property of anyone. So it is unrelated to every property, and it spreads both the known and the unknown evenly over the two groups on average. The Y(0) in section 3 bundles up everything about a person that affects the result. Drawing lots spreads Y(0) evenly, and that is the same as spreading the known and the unknown evenly together.
Fisher explained in The Design of Experiments (1935) why the treatments in an experiment should be assigned at random. Because they were assigned at random, you can calculate "the chance of a difference this big from luck alone, even if the treatment does nothing". That chance is the basis of the p-value.
The draw must really be impossible to predict. Taking turns in order of arrival, or splitting by whether a birth date or record number is odd or even, follows a fixed rule, so the next assignment can be guessed. Once it can be guessed, as in ② of the first lab, the picker's bias comes back in. The CONSORT explanation document says such methods should not be called "random".
Random sampling and random assignment are different jobs
| Random sampling | Random assignment | |
|---|---|---|
| The question | Who gets into the study | Which group each person in the study joins |
| What it protects | You can extend the result to a bigger group (the population) | You can say the difference between the groups was caused by the treatment |
| Without it | The result may only hold for the people who took part | You compare two groups that differed from the start |
| More | Samples and sampling distributions | This page |
Participants in a clinical trial are usually not drawn at random from a population. They are people who met the criteria and chose to join. So thanks to random assignment you can trust "it worked for these people", but before extending that to a wider population you have to look separately at who the participants were.
5. Different ways to draw lots
There is more than one way to draw lots. Split the same people three ways.
Each cell is one person, placed in order of arrival from the top left. A green circle is treatment, a blue square is control, and a big mark is a "more severe" person, with starting severity 5 or more. In block and stratified randomization, shaded and white cells alternate, one block each. Stratified randomization lines up the more severe and less severe people separately. The two histograms below count 1,000 assignments of the same people with the same method. Changing the number of people makes up a new set of people (the first 40 are the same as in the first lab).
| Method | What it does | Good | Watch out |
|---|---|---|---|
| Simple | Flip a coin for each person | The simplest, and the next assignment cannot be guessed | Group sizes drift apart by chance. The size gap has a standard deviation of about √n, so small studies drift a lot in proportion |
| Block | Group people in fours and shuffle "2 treatment, 2 control" inside each block | Every time a block ends, the groups are the same size. Stopping the trial early does not leave them far apart | If you know the block size you can guess the last person in a block. Mix or hide the block sizes. It does not balance other values like severity |
| Stratified | Split people by an important value (severity, sex, hospital), then use blocks inside each split | That value is also spread evenly over the groups | With many splitting values each cell has few people and blocks stay unfilled, so it helps less. Without blocks inside each stratum, stratifying does nothing |
Try this. ① At first (simple, 40 people) there are 16 in treatment and 24 in control, 8 apart. The 21 more severe people split 7 in treatment and 14 in control. Out of 1,000 assignments the groups are exactly equal only 128 times, and 634 times they are 4 or more apart. ② Press "Blocks of 4": all 1,000 are 20 against 20. But this time the severe cases split 13 against 8, and in 235 of the 1,000 they are 4 or more apart. Blocks only balance the sizes. ③ Press "Stratified": the severe cases split 10 against 11, and in 1,000 assignments they are never 4 or more apart. In exchange the sizes are exactly equal only 470 times. The 21 severe and 19 less severe people do not divide by 4, so the last block in each stratum is cut short, but the gap never goes past 2. ④ With simple randomization, lower the people to 8: the sizes are exactly equal 291 times, and 290 times they lean 6 against 2 or worse. ⑤ With simple randomization, the standard deviation of the size gap is 6.27 for 40 people and 10.34 for 100, close to √n (6.32 and 10). The gap itself grows, but divided by the number of people it shrinks from 0.16 to 0.10. With a very large number of people, even simple randomization comes out close to half and half.
The "block design" of experimental design (grouping similar units and comparing inside each group) shares its root idea with stratification. It has its own page, block designs.
By hand: 8 people with block randomization
Say 8 participants arrive one after another, numbered from 1 (a made-up example). We use two blocks of 4.
- List the orders. There are six ways to place "2 treatment, 2 control" in a block of 4 (the number of ways to pick 2 treated out of 4 is 6). Writing T for treatment and C for control: 1 TTCC, 2 TCTC, 3 TCCT, 4 CTTC, 5 CTCT, 6 CCTT.
- Pick one per block. Roll a die: 3 (TCCT) for the first block and 4 (CTTC) for the second. This list is made and sealed before anyone arrives.
- Assign in order of arrival. The treatment group is people 1, 4, 6, 7. The control group is people 2, 3, 5, 8. Each block is 2 against 2.
- Measure. Improvement after 4 weeks (points), from person 1 on, was 9, 6, 7, 10, 5, 9, 8, 6.
- Means and difference. Treatment group
(9 + 10 + 9 + 8) ÷ 4 = 36 ÷ 4 = 9, control group(6 + 7 + 5 + 6) ÷ 4 = 24 ÷ 4 = 6. The estimated effect is9 − 6 = 3points.
The same calculation written as formulas looks like this. is a group mean.
We do not yet know whether 3 points is big enough that luck alone is unlikely to explain it. With only 4 people per group, a large starting gap can remain. That judgment is made with hypothesis tests and the t-test.
# Python standard library only: an assignment list of 10 blocks of 4 (40 people)
import random
rng = random.Random(42) # write down the seed and you can rebuild the same list
sequence = []
for _ in range(10):
block = ["treatment", "treatment", "control", "control"]
rng.shuffle(block) # shuffle the order inside the block
sequence += block
6. Blinding and hiding the assignment order
Even after drawing lots, knowing who is in which group lets bias creep back in.
| Who knows the assignment | The bias it causes | How to prevent it |
|---|---|---|
| Participants | Knowing they got the new treatment, they feel better or take more care. The control group may be disappointed, drop out or look for other treatment | A placebo. Pills that look the same |
| People giving care (doctors, nurses) | They check on the treatment group more often, or give extra treatment to one side | Identical-looking containers marked only with numbers |
| People measuring the outcome | They read unclear results the way they expect. Worst for scores a person judges | Someone who does not know the assignment measures. Use values a machine measures |
| People doing the analysis | They look at the results and pick the method that looks best | Write the analysis plan in advance |
Hiding the assignment order and blinding are different jobs. The CONSORT explanation document separates them like this.
- Hiding the order protects the time before assignment. Until the moment someone is accepted into the trial, nobody can know in advance which group they will join. It prevents the picker's bias (selection bias), and it can always be done. The assignment is made away from the trial (central assignment by phone or web), or sequentially numbered opaque sealed envelopes are opened in order. What the doctor did in ② of the first lab is what happens when the order is not hidden.
- Blinding protects the time after assignment. Nobody knows who is in which group, which prevents bias during care and while measuring the outcome. It cannot always be done, for example when comparing surgery with a pill. Even then, the people measuring the outcome can often be kept blind.
The term "double blind" means different pairs of people in different studies, so CONSORT asks authors to say who was blinded and how instead.
7. Analyze people in the groups they were assigned to
A person who drew the treatment group is counted in the treatment group even if they did not take all the medicine or stopped halfway. This is called intention-to-treat (ITT) analysis.
The reason is that dropping out is not decided by drawing lots. Suppose people who struggle with side effects, or who get worse, drop out of the treatment group more often. Count only those who finished, and the remaining treatment group leans healthier than it started, which breaks the balance the draw created. In the terms of section 3, the starting gap is no longer 0.
- The effect measured this way is the effect of "deciding to give this treatment". It includes people who did not take all of it, so it can come out smaller than the effect on people who took it all.
- An analysis of only the people who followed the plan to the end (per-protocol) is looked at alongside, as a supporting check. If the two differ a lot, find out why.
- CONSORT 2010 notes that the term "intention to treat" is used inconsistently, and asks authors to report instead how many people were in each analysis and whether they were analyzed in their originally assigned groups.
- What to do with people whose outcome was never measured (missing data) is a separate problem, outside this page.
8. Key properties
| Property | In plain words | On this page |
|---|---|---|
| Drawing lots looks at no property | So both the known and the unknown are spread evenly over the groups on average | Lab 1 ③, section 4 |
| Difference = treatment effect + starting gap | If a person picks, a starting gap remains (selection bias). With drawing lots its average is 0 | Section 3 |
| It is "on average" | One assignment can lean by chance, and the fewer the people, the more it leans | Section 3 ⑤, lab 4 |
| The control group goes through everything except the treatment | Getting better anyway, drifting back toward the mean and expectation land on both sides equally and cancel when you subtract | Lab 2 |
| If it can be predicted, it breaks | Guessable rules like taking turns or odd and even dates or numbers bring the picker's bias back. Dropping people after assignment breaks the balance too | Lab 1 ②, sections 6 and 7 |
9. When you cannot assign at random
- Ethics. You cannot deliberately give something known to be harmful, or take away a treatment known to work.
- Cost and time. Very rare diseases, or outcomes that appear decades later, are hard to wait for in a trial.
- Things you cannot change. Age, genes and events in the past cannot be assigned.
Then you use observational data, but you have to block the other causes that affect the result along with the treatment (confounding) on your own. Methods include comparing matched pairs of similar people, comparing within strata, and adjusting with regression. But these methods can only match what you know. Unknown causes can remain, and that is the biggest difference from random assignment. See confounding and bias.
Where it is used
- Clinical trials. Trials that check whether a new drug or treatment works are, as a rule, trials with a control group and random assignment. How such trials are designed is on clinical trial design. When reporting, follow the CONSORT checklist: how the assignment order was made and hidden, and who was blinded.
- A/B tests on websites. Splitting users at random into A (the current page, the control group) and B (the new page, the treatment group) is exactly what this page is about. You split during the same period so that other causes like the day of the week, the season or an ad campaign land on both sides evenly. "It went up compared with last month" is a before-after comparison with no control group. With a very large number of users, even simple randomization should give nearly half and half, so a big mismatch is a reason to suspect a bug in the assignment code first.
- Labs and fields. Cell culture plates, cages of lab animals and plots of farmland are split at random. That keeps conditions that differ by position, like the edge versus the middle of an incubator, from piling up in one group. Shuffling the order of measurements also spreads out the slow drift of an instrument over time.
# A/B test: split by hashing the user id. The same person always lands on the same side
import hashlib
def assign_group(user_id: str, experiment: str) -> str:
digest = hashlib.sha256(f"{experiment}:{user_id}".encode()).digest()
return "B" if digest[0] % 2 else "A" # odd or even first byte: close to half and half
The experiment name goes into the hash so that each experiment splits people into a different mix. Otherwise the B group of one experiment would always travel together into the next one.
Frequently asked questions
What is the difference between random assignment and random sampling?
Random sampling uses chance to decide who gets into the study. Random assignment uses chance to decide which group each person in the study goes into. Sampling is what lets you extend the result to a bigger population. Assignment is what lets you say the difference between the groups was caused by the treatment. Many studies have only one of the two.
If the groups differ at the start after drawing lots, did the randomization fail?
No. One draw can lean one way by chance, and tests and confidence intervals already account for the size of that chance. Putting p-values on the starting differences tells you nothing, because with random assignment you already know every starting difference is chance. For values that strongly affect the result, stratify when you assign, or write the adjustment into the analysis plan in advance.
Is the improvement in the placebo group the placebo effect?
No. The placebo group's improvement also contains getting better anyway and drifting back toward the mean. Calling all of it the placebo effect makes the placebo effect look bigger than it is. To measure the placebo effect alone, you need one more group that gets nothing, and you compare against that.
Is drawing lots useless when there are few people?
It still helps. The bias is zero on average no matter how many people there are. But a single draw can lean a lot by chance. So the fewer the people, the more you use block randomization to keep group sizes equal and stratify on values that strongly affect the result. How many people you need is decided in advance with a sample size calculation.
Is an A/B test on a website the same thing?
Yes. The people who see the current page are the control group, and the people who see the new page are the treatment group. You have to split users at random during the same period, so that other causes like the day of the week, the season or an ad campaign land on both sides evenly. Comparing last month with this month is a before-after comparison with no control group.
How many people you need is covered in sample size calculation.
Words
| Words used here | What textbooks call it |
|---|---|
| the group that gets the treatment / the group you compare against | treatment group / control group |
| drawing lots to pick the groups | random assignment, randomization |
| an experiment that splits by drawing lots and compares | randomized controlled trial (RCT) |
| a study that only watches and records | observational study |
| the result if treated / the result if not treated | potential outcomes, Y(1) and Y(0) |
| you cannot see both for one person | the fundamental problem of causal inference |
| the average effect over the whole group | average treatment effect (ATE) |
| starting gap (caused by someone picking) | selection bias. When it comes from chance: baseline imbalance |
| getting better anyway | natural history, natural course |
| drifting back toward the mean | regression to the mean |
| expectation / a fake without the active ingredient | placebo effect / placebo |
| a control group that gets the existing treatment | active control |
| a coin flip per person | simple randomization |
| half and half in every block | block randomization, permuted blocks |
| split first, then draw inside each split | stratified randomization. One split is a stratum |
| keeping the assignment order unknown in advance | allocation concealment |
| not knowing who is in which group | blinding, masking. Single and double blind |
| analyzing as assigned / only people who finished | intention-to-treat (ITT) / per-protocol |
| another cause affecting the result along with the treatment | confounding |
| A/B tests of web pages | A/B testing, online controlled experiments |
Sources
- R. A. Fisher, The Design of Experiments, Oliver and Boyd, 1935. Why treatments are assigned at random, and how that grounds the test.
- Kenneth F. Schulz, Douglas G. Altman, David Moher, for the CONSORT Group, CONSORT 2010 Statement: Updated Guidelines for Reporting Parallel Group Randomised Trials, PLoS Medicine 7(3): e1000251 (2010). The checklist for reporting randomized trials (making the assignment order, hiding it, blinding, analyzing people in their original groups).
- David Moher et al., CONSORT 2010 Explanation and Elaboration, BMJ 340: c869 (2010). That alternation and birth dates are not random, how hiding the order differs from blinding, that a known block size can be guessed, that strata need blocks inside them, that testing starting differences is illogical, and that "double blind" is ambiguous.
- The CONSORT and SPIRIT website. The 2025 update (CONSORT 2025) is also there. This page follows the 2010 version.
- Python docs: random (Random, shuffle), hashlib.
This page explains a statistics concept. All people, scores and results are made up, and nothing here is advice about any treatment.