One trial, many trials

No single experiment lands on the truth. Many experiments, taken together, do.

What do you expect to happen?

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.

In a single randomized trial, the estimated effect will…
If each trial uses 4 times as many students, the spread of the estimates will…

Follow these steps

Work as a group with one driver: one person moves the controls, and everyone else watches the same screen and calls out answers. The controls and written answers are shared across your group. Every browser reruns the simulation, so wait for “Finished N trials” under the chart before you read any number or answer.

  1. 1Choose one answer for each of the two predictions.Does everyone in your group give the same answers? Talk until you agree, or note where you differ.
  2. 2Set Number of trials to 1 and press New seed five times, waiting for “Finished 1 trials” each time.Does the single estimate (the solid line) ever sit exactly on the dashed true-effect line?
  3. 3Set students per trial to 2 and Number of trials to 2000, and wait for “Finished 2000 trials”.The histogram is very wide, yet how far is the solid line from the dashed line? Agree on one answer as a group.
  4. 4Keep 2000 trials. Set students per trial to 20, then 80, then 320, waiting for “Finished” each time. Write down the SD of the estimates each time.Each time n is multiplied by 4, by what factor does the spread (SD of the estimates) change? Agree as a group before moving on.
  5. 5Return n to 80. Raise Selection into treatment from 0 to 3 and wait for “Finished”.Do the solid and dashed lines still agree? What is different about how the treated group is chosen?
  6. 6Set Selection back to 0, wait for “Finished”, then press Check my predictions (in the next section).Compare your three SDs with the SD predicted by theory. Which prediction, if any, did you get wrong, and why?

Run the experiment again, and again

Controls

Half are treated, half are control.
Each trial is a fresh random sample and assignment.
0 is a true lottery. Higher means higher-scoring students are more likely to be treated.

Estimates

True average effect
–
Mean of the estimates
–
SD of the estimates
–
Opens after you have run at least 200 trials at two different values of n, and once with selection above 0.

Exit question

Two dissimilar students are in a trial: Maya scores 70 without tutoring, Sam scores 35. Tutoring helps them differently: it adds +2 for Maya and +8 for Sam, so the average effect of tutoring on these two students is +5. A coin flip decides who is tutored, and the trial's estimate is the tutored student's score minus the other student's score.

What are the two possible estimates? Is this estimator biased for the average effect? What happens to the average estimate as the trial is repeated many times?

Agree on one answer as a group and write it once.

0 / 600 characters

Assumptions and what is left out
  • Parameter. 2000 students. Score without tutoring ~ Normal(50, 10). Individual effect ~ Normal(5, 4). True ATE about 5 points. Students per trial runs from 2 to 400 in even steps. Trials default to 200.
  • Distribution. Each trial draws n students with replacement and treats exactly n/2 by random shuffle. Var = v1/(n/2) + v0/(n/2), where v1 and v0 are the population variances of Y(1) and Y(0). At n = 2 the SD is about 14.7 points. The theory SD readout appears only once the reveal opens.
  • Simplification. No dropout, spillovers or noncompliance. Potential outcomes are all known, which is possible only in a simulation.
  • Simplification. The selection control ranks students on a noisy baseline score and treats the top half. At 0 it is a pure lottery. The reveal warns when selection is above 0.
  • Data. None: everything is simulated by R in the background.
  • Interpretation. Unbiased means the average over repeated trials equals the ATE. It is not a claim about one trial, and it does not depend on n.
  • Interpretation. Check my predictions opens after runs of at least 200 trials at two different n and a run with selection above 0. Feedback says what the simulation shows and quotes the observed SDs at n and 4n when both were run with selection 0.
  • Interpretation. The exit question uses a hand-built pair: Maya (baseline 70, effect +2) and Sam (baseline 35, effect +8), with a fair coin. The effects differ, and their average is +5. The two possible estimates are +37 and −27, which average to +5.
  • Interpretation. Expected bias over repeated trials is exactly zero. The observed gap between the mean of the estimates and the truth is noise of size about SD/√(trials). For the pair the SD is 32, so the gap is about 32/√(trials); in the simulated population the SD at n = 2 is about 14.7. That is the sense in which it approaches zero.
  • Interpretation. Every button writes only to shared state (New seed, Check my predictions, Compare with a model answer, Lock). Both predictions and the written answer are in state. Only the typed instructor code stays local.
  • Interpretation. Breakout use: the controls are shared, so each group picks one driver for the sliders while the others call out answers, waits for “Finished N trials”, and writes one group answer to the exit question. Each browser reruns the same seeded R simulation, so everyone in a group sees identical numbers once finished.
  • Interpretation. The instructor lock is a soft classroom lock, not security. It freezes this page's controls and answers.
  • Interpretation. Style follows the Minerva kit. EB Garamond stands in for the licensed Chronicle Display, and Helvetica Neue, Helvetica or Arial for Neue Haas Grotesk. Body text is 19 px (about 14 pt). The true-effect line is dashed and the mean line solid, so colour is never the only cue. No logo file was supplied.

Left out: confidence intervals, clustering, stratification and covariate adjustment.