No single experiment lands on the truth. Many experiments, taken together, do.
A school tests a tutoring programme with a randomized trial. In this simulation we know every student's score with and without tutoring, so we know the true average effect. Commit to your guesses before you touch the controls.
Your instructor has locked the controls and answers on this page.
Each trial uses different students and a different random split, so each estimate carries its own random error. Across many trials those errors cancel. Averaged over repeated trials, the estimator gives the true effect. That is what it means for the estimator to be unbiased. It says nothing about how close any one trial is.
Unbiased estimator. The difference in mean outcomes between treated and control units, under random assignment, satisfies:
Quadrupling n halves the SD, so precision costs sample size at a diminishing rate. When treatment depends on baseline scores, as with the selection control, the errors no longer cancel, and the estimator is biased.
The page above runs the code below. Fill the gaps marked NA, run each cell, and tick Done when you are satisfied. The sliders above re-run exercise 2.
Guess first: will the estimate be within 1 point of the true effect? Then compute the difference in mean outcomes between treated (d = 1) and control (d = 0).
The loop is written for you. Fill in the bias: the mean of the estimates minus the true effect. The sliders above drive this cell.
For each n, the cell simulates 300 trials and takes the SD of the estimates. Fill in the SD predicted by theory, using v1 and v0 from setup and the fact that each group has n/2 students.
A school's trial of 40 students estimates a gain of +9 points, but the true effect is +5. Did the randomized trial fail? What would you tell the school about this one number, and what would change if the trial had 160 students?
0 / 600 charactersThe trial did not fail. Randomization promises that estimates are right on average over many trials, not that any one trial is right. With 40 students the estimates typically scatter about 3.3 points either side of the truth, so a miss of 4 points is about 1.2 standard deviations. That happens often.
Tell the school: +9 is one noisy draw, not the effect itself. Report a plausible range (roughly +2 to +16) instead of a single number, and do not read the extra 4 points as real.
With 160 students: quadrupling n halves the spread to about 1.6 points, so estimates cluster much closer to +5. A miss of 4 points would then be about 2.4 standard deviations, which is rare. If it did happen, check whether assignment was truly random.
Left out: confidence intervals, clustering, stratification and covariate adjustment.