InteractiveHomeworkPredict, observe, explainRecall with feedbackDecisionContrasting casesBefore teachingAccessibility not checkedPublished
Who Gets Cleaned Out?
By Alexis Diamond · Statistics · Experiments · Undergraduate · Simulation of a known property · version 7
Students design, step by step and without code, the logic for removing controls who live with a treated person in an individually randomized experiment: choosing the essential column, building test data that would catch a bug, ordering an algorithm, and writing the Boolean filter. Then they apply it to a simulated population and discover that the cleaning selects the control group on household size, trading interference for selection bias, before comparing better designs.
Licence: CC BY 4.0
Topicsselection biasspillover interferenceboolean filteringrandomized experimentshousehold randomization
Assumption ledger (11)
- dataThe three toy datasets (X with 6 people, Y with 8, and the canonical dataset Z with 9) are invented for the exercise; Z's correct removal set is Ben, Fe and Iggy.
- interpretationCorrectness standard stated on the page: a rule is correct only if it removes exactly the controls who share a household with a treated person, for any dataset, in any row order, with households of any size and any mix. Households with several treated people, or several controls and no one treated, are allowed and keep everyone.
- interpretationThe cleaning rule under study: remove every control (Treated = 0) who shares a household with at least one treated person; treated people are never removed.
- distributionThe simulated population is 100 households with sizes 1–6 drawn with probabilities 0.12, 0.22, 0.24, 0.20, 0.13, 0.09 from a fixed seed, giving 336 people.
- parameterProbability of treatment p ranges from 0.05 to 0.95 in steps of 0.05 (default 0.50); each assignment draw is seeded and can be re-randomized.
- simplificationIndividual randomization treats each person independently with probability p; household randomization treats each whole household with probability p, so no household is mixed.
- interpretationA control in a household of size k survives cleaning with probability (1 − p)^(k − 1); the survival chart compares this curve with each draw, with a normal-approximation 95% band.
- distributionBaseline income (thousand pesos per month) is 15 − 1.6 × household size plus normal noise with SD 2, floored at 2; it is used only to check balance, never by any cleaning rule.
- simplificationNo outcomes, treatment effects or spillovers are simulated; the lesson is about who is removed and whether the groups stay comparable.
- interpretation'Drop entire mixed households' removes treated and control members alike from every household containing both.
- simplificationThe R code shown is a display of the designed logic (vectorized %in% filter), not run in the page.
Checks Breakout ✓ · Accessibility ✓
Breakout check
✓ Ready for breakouts: every control we tried showed teammates the same thing.
Cite this · History
Cite this
Alexis Diamond (2026). Who Gets Cleaned Out? [Interactive model], version 7. Ideas at Play. https://ideasatplay.org/play/who-gets-cleaned-out-bd6a2d?v=7 (CC BY 4.0)
History
- v7What counts as correct: a fourth point on what the cleaned data looks like (no sorting, grouping or splitting needed; each remaining household is all treated or all controls). (edited, Oct 30, 2026)current
- v6Test-data stage: correctness restated for a set of rules; lists the situations a dataset can contain (to fix, to leave alone, any row order) and says a good test includes every one. (edited, Oct 30, 2026)View
- v5Test-data stage: clearer reminder of what a correct rule must do, and what makes a good test dataset is now stated before students choose. (edited, Oct 30, 2026)View
- v4Correct answers now get a light yellow background, on the feedback and on the box the student chose. (edited, Oct 30, 2026)View
- v3Algorithm stage: a 'Gimme a hint' button with up to three hints that nudge without giving the answer; hints used appear in the answer summary. (edited, Oct 30, 2026)View
- v2States what counts as correct: any row order, any household mix (several treated or several controls in one household is fine), and what makes a rule a bug. (edited, Oct 30, 2026)View
- v1Imported; lineage before import is not available. (imported, Oct 30, 2026)View
Comments
No comments yet.
Sign in to comment or like.