Hybrid· RWhole classBreakoutsPredict, observe, explainAccessibility checks passPublished
One Trial, Many Trials (remix)
By Alexis Diamond · Statistics · causal inference · Undergraduate · Simulation of a known property · version 8
Remixed from One Trial, Many Trials by Alexis Diamond
Students run a simulated tutoring experiment again and again, and see that any single RCT estimate misses the true effect while the average of many lands on it. They also see the spread of estimates shrink with the square root of n. Interactive dials drive R code cells, and students then complete the key calculations themselves.
Licence: CC BY 4.0
Assumption ledger (15)
- parameterPopulation of N = 2000 students. Score without tutoring Y(0) ~ Normal(50, 10). Individual effect tau ~ Normal(5, 4), independent of Y(0). Y(1) = Y(0) + tau. The true ATE is the mean of tau in this population, about 5 points.
- parameterStudents per trial n ranges from 2 to 400 in even steps. Number of trials ranges from 1 to 2000 and defaults to 200 so shared sessions stay light. Seed ranges from 1 to 99. Selection ranges from 0 to 3.
- distributionEach trial draws n students independently with replacement from the population. Exactly n/2 are assigned to treatment, by a random shuffle. The estimator is mean(treated outcomes) minus mean(control outcomes).
- distributionVar(estimate) = v1/(n/2) + v0/(n/2), where v1 and v0 are the population variances of Y(1) and Y(0). SD is the square root of that, proportional to 1/sqrt(n). At n = 2 it is about 14.7 points; at n = 40 about 3.3. The theory SD readout is hidden until the reveal opens, so students compare it with their own observed SDs.
- simplificationNo dropout, no spillovers between students, full compliance, one outcome, and a single fixed population whose potential outcomes are all known (possible only in a simulation).
- simplificationThe break-it control makes treatment depend on baseline score: students are ranked by a noisy score of selection x (Y(0) - 50)/10 plus standard normal noise, and the top half are treated. At 0 this is pure randomization. The reveal shows a warning whenever selection is above 0.
- dataNo external data. Every number is simulated by R in the platform's code cells, with set.seed(2024) for the population. Each set of trials uses the seed on the page.
- interpretationUnbiased is read as: the mean of the estimator over repeated trials equals the ATE. It is not a claim about any one trial, and it does not depend on n.
- interpretationCheck my predictions opens only after the browser has finished runs of at least 200 trials at two different n and a run with selection above 0. Feedback is worded as what the simulation shows, gives different messages for the three first-prediction choices, and quotes the observed SDs at n and 4n when both were run with selection 0.
- interpretationThe exit question uses a hand-built two-student trial, not the simulated population. Maya (Y(0) = 70) gains +2 from tutoring and Sam (Y(0) = 35) gains +8, so the average effect is +5. A fair coin picks who is tutored. If Maya is tutored the estimate is 72 - 35 = +37; if Sam is, it is 43 - 70 = -27. The average of the two equally likely estimates is +5, so the estimator is unbiased even though each estimate is far off.
- interpretationOver many repeated two-student trials the expected bias is exactly zero. The two estimates sit 32 points either side of +5, so their SD is 32. The observed gap between the mean of the estimates and the truth is sampling noise of size about 32/sqrt(trials): about 3.2 at 100 trials and 0.32 at 10,000. In the simulated population the SD at n = 2 is about 14.7 points.
- interpretationShared state: every button writes only to a state key (New seed to seed, Check my predictions to reveal, Compare with a model answer to exit_reveal, Lock/Unlock to locked). Both predictions and the written exit answer are listed as responses. Only the typed instructor code stays local.
- interpretationBreakout use: the controls are shared, so the page asks each group to pick one driver for the sliders while the others call out answers, and to wait for 'Finished N trials' before reading results. Each browser reruns the same seeded R simulation, so everyone in a group sees identical numbers once finished. On narrow screens the Instructor box sits at the end of the page instead of floating.
- interpretationInstructor lock: typing the code RCT (any case) in the Instructor box toggles the boolean locked in state, freezing the sliders, radio choices, display-size selector, buttons and written-answer box. The code is visible in the page source, so this is a soft classroom lock, not security.
- interpretationStyle (Minerva kit): EB Garamond stands in for the licensed Chronicle Display headings, and Helvetica Neue, Helvetica or Arial for Neue Haas Grotesk. Laptop body text is 19 px (about 14 pt), line spacing 1.35. Clay is used for text, buttons and lines on light backgrounds; Goldenrod appears only as the dashed truth line in dark mode. The true-effect line is dashed and the mean line solid, so colour is never the only cue. No logo file was supplied, so none is shown.
Checks Breakout ✓ · Code ⚠ · Built-in ✓ · Accessibility ✓
Breakout check
✓ Ready for breakouts: every control we tried showed teammates the same thing.
Code checks
Not checked yet.
Built-in checks 11 of 11 pass
- histogram keeps every finite estimate (passes)
- estimates beyond the axis land in the end bins (passes)
- non-finite values are ignored (passes)
- n slider allows only even sizes of at least 2 (passes)
- missing values display as an en dash (passes)
- quadrupling n halves the theoretical SD (passes)
- two students with effects +2 and +8: estimates +37 and -27 average to the average effect +5 (passes)
- instructor code RCT is accepted in any case with spaces trimmed (passes)
- wrong or empty instructor codes are rejected (passes)
- every control key and response key exists in state (passes)
- new seed wraps from 99 to 1 and stays in range (passes)
Cite this · History
Cite this
Alexis Diamond (2026). One Trial, Many Trials (remix) [Interactive model], version 8. Ideas at Play. https://ideasatplay.org/play/one-trial-many-trials-remix-97a3ff?v=8 (CC BY 4.0). Remix of “One Trial, Many Trials” by Alexis Diamond.
History
- v8Gated and reworded the prediction feedback around what the simulation shows, added a not-randomized note when selection is above 0, lowered the default trials to 200 with wait-for-Finished instructions and a static Instructor box on narrow screens, and hid the theory SD until the reveal with step 4 asking students to record and compare their SDs. (generated, Nov 1, 2026)current
- v7Breakout audit: added a one-driver and shared-answer instruction, asked the group to agree on step 4 and the exit answer, repaired the truncated style entry in the ledger and added a breakout entry; state keys and window.artifact are unchanged. (generated, Nov 1, 2026)View
- v6The two prediction questions now sit inside their white boxes instead of straddling the box border; nothing else changed. (generated, Oct 29, 2026)View
- v5The exit question now gives Maya an effect of +2 and Sam +8 instead of +5 each, so the estimates become +37 and -27, still averaging to the +5 average effect; the model answer, ledger and one assertion were updated to match. (generated, Oct 29, 2026)View
- v4The exit question and its model answer now concern a two-student trial (estimates +40 or -30, average +5), step 3 now uses n = 2, and one assertion and the ledger were updated; state keys and the window.artifact interface are unchanged. (generated, Oct 29, 2026)View
- v3Raised the laptop text scale to the Minerva kit's 14 pt minimum body size (19 px body, 16 px controls, 14 px chart labels) and documented the style choices in the ledger; state keys and the window.artifact interface are unchanged. (generated, Oct 29, 2026)View
- v2Removed the compute-it-yourself section, visible code cells, first-trial readout and triangle marker; the students-per-trial slider now goes down to 2 (R still runs the trials from hidden read-only cells). (generated, Oct 29, 2026)View
- v1Remixed from version 5 of "One Trial, Many Trials". (remixed, Oct 29, 2026)View
Comments
No comments yet.
Sign in to comment or like.