The interval
Can this study see the thing you are hoping for?
Start at the end, because the arithmetic below decides whether the rest of the post is worth running. Three controls — how many classrooms you have, how alike the children in one room are, and whether your standard error knows they share a teacher.
↳ Leave the pilot at 12 classrooms and switch to naive. Same children, same scores, opposite conclusions.
The design floor is the smallest effect this arrangement could catch four times out of five. It is a property of the arithmetic rather than of the content, and you can compute it from the classrooms you actually have before a single child sees a lesson — which is the entire reason to compute it first.
That last control is not a modelling nicety. A naive standard error on clustered data is the single most common way an education efficacy claim gets published wrong, and it always errs toward a narrower interval — which means toward a more exciting finding.
The problem
Completion makes your best lesson the one the strongest students finished
Follow one child. She finishes the lesson, scores eight out of ten on the exit items, and spends nine minutes on task. Another child opens it, stalls on the second block, and closes the tab. Your dashboard now reports that students who complete the lesson score 80%, and a slide gets made about mastery. Nothing in that sentence is false and nothing in it is evidence, because the strongest predictor of finishing a lesson is being the kind of student who finishes lessons.
completion, and a mean exit-item score of 79% — both measured only on the children who engaged, which is the same variable that predicts the outcome.
on the same unit, over the same window — with an interval that comfortably spans zero, because a twelve-classroom pilot was never going to resolve it.
- Engagement metrics describe a self-selected population. Completion, time on task and exit-item accuracy are all conditioned on the child having engaged, which is exactly the variable that also predicts the outcome.
- Before-and-after gains are contaminated by everything else. Children learn between September and December whether or not you exist. A pre/post gain measures your lesson plus the teacher plus eleven weeks of ordinary schooling, and attributes all of it to the lesson.
- There is no counterfactual in the telemetry. Nowhere in your interaction log is a comparable child who did not get the lesson, so no amount of modelling recovers the difference.
- The feedback loop is self-sealing. The unit with the highest completion gets recommended more, gets used by more motivated classes, reports even higher completion — and the ranking is now measuring teacher enthusiasm.
Be fair to engagement data. It is genuinely useful for diagnosis: which block children abandon, which item has an implausible score and is probably mis-keyed, whether a lesson is too long for a forty-minute period. Those are real jobs, and post 3’s rubric gets better because of them. It is just not evidence that your content taught anything, and it should never be the number in a sentence containing the word “improves”.
The design
Randomise where the intervention actually lands
A holdout in education is not a row filter. Children sit in classrooms, are taught by one teacher, and talk to each other — so assigning individual students to arms inside one room contaminates both arms and violates the independence the arithmetic assumes. The unit of randomisation is the section.
- Randomise sections, analyse students, adjust for the clustering. Anything else understates your uncertainty, often by a factor of two or more, and the direction of that error is always toward false confidence.
- Deterministic assignment beats random-and-stored. A hash of the section and experiment ids is stable across runs, restarts and a database migration, and an analyst in March can re-derive it from two strings without having been in the room in September.
- The publish engine subtracts the control arm, not the lesson definition. Post 5’s diff runs after assignment, so a control section that was published to before the experiment started gets an explicit removal rather than being quietly left with treatment content.
- Pair or stratify before you randomise. With few clusters, simple randomisation frequently hands you arms that differ at baseline. Stratify on prior-year performance and school; the balance you get is worth more than the elegance you lose.
The overlap trap deserves its own paragraph, because it is silent and it is worse here than in most domains. A district running your pilot is also, that term, running a new intervention programme, a schedule change, and a different vendor’s pilot in the same grade — and neither experiment knows about the other. If the overlap is uneven between your arms, one study reads the other’s effect as its own. The fix is boring: a registry of running experiments per district, a check at creation that flags an intersection above a threshold, and — the part that requires a phone call rather than code — asking the district what else is happening in those rooms this term.
Power
Decide the sample size before you look, and put the clustering in it
The uncomfortable arithmetic goes first, not last. Children in the same classroom resemble each other, and that similarity inflates the sample you need by a design effect — at twenty-five children a room and a typical correlation, a factor of about 4.6. Detecting a 0.20 SD effect needs roughly 73 classrooms per arm. A typical pilot runs six.
- The target effect size is a design input, not a result. Compute it from the classrooms you actually have. Six per arm resolves an effect of roughly 0.69 SD — larger than almost anything the education literature has credibly reported, which means the pilot is guaranteed to find nothing and the finding will be read as “it does not work”.
- Peeking is not significance. Checking weekly until the number goes green is a different test than the one you designed, and its real false-positive rate is several times the one you think you are running at.
- Fix the end date and the outcome up front. Both live in the experiment record. An analysis that cannot choose its own window or its own outcome has no room to drift.
- Underpowered is worse than not running. A null gets read as proof of failure and a false positive gets read as proof of success. Both move a district’s budget, and only one of them is reversible.
The readout
Incremental learning, cost per point, and an interval
The query is unglamorous, which is the point. Assign every section to an arm with the same hash the publish engine used, join outcomes in the window, and compare arm means with the clustering respected. No engagement metric appears anywhere.
Three things to say out loud. A result whose interval includes zero is a result — it says the effect, if any, is smaller than this study could see, and it should be reported in exactly those words rather than quietly not reported. The observed clustering belongs in the readout beside the assumed one, because if you planned at 0.15 and measured 0.28 your study was less powered than you thought and every future design should use the new number. And the interval must come from a cluster-robust estimator — which is the control you just drove at the top of this post.
The question
It is usually non-inferiority, not superiority
Here is the part almost nobody designs for. If a generated unit costs a fraction of an authored one, you do not need it to teach better. You need to know it does not teach appreciably worse. That is a different test with a different hypothesis, and running a superiority test and finding nothing is not the same as running a non-inferiority test and finding equivalence.
| Margin you will accept | Classrooms per arm | What that actually is |
|---|---|---|
| 0.05 SD | 1,156 | a multi-district study and a year |
| 0.10 SD | 289 | a large district, or several |
| 0.20 SD | 73 | an ambitious but reachable pilot |
- The margin is a curriculum decision, not a statistical one. How much learning is a district willing to trade for coverage it could not otherwise afford? Someone with a name has to answer that, in writing, before the study.
- Non-inferiority is not the cheap option. Tight margins are expensive, as the table says, and pretending otherwise is how the answer gets fudged.
- Report the margin in every sentence that reports the verdict. “Non-inferior” alone is meaningless; “non-inferior at a 0.10 SD margin” is a claim someone can check.
- A superiority null is not evidence of equivalence. If you designed for superiority, that is the only question you get to answer, and the honest write-up says so.
The ethics
The control arm is a room full of real children
A control section is a class you deliberately did not give the thing you believe is better, for a term, to learn something. That is a decision with subjects, an owner and a date, and it belongs in the same append-only audit log as every publish and every deletion — the experiment id and the held-back section count are already fields on post 4’s audit record.
Three practical consequences. The control condition should be business as usual, not nothing — you are comparing your unit against the district’s existing materials, which is both more ethical and the comparison a district actually wants. The district decides, with informed consent at the level its own policy requires; you propose a design, you do not assign children. And there is a stopping rule: if an interim look shows real harm, the study ends, and the rule for that is written down before the first publish rather than argued about in the moment.
Teaching-grade reference implementation, not a production courseware platform. It reproduces the ideas and the queue/warehouse integration shape; bring your own model keys, curriculum data and LMS credentials. LMS adapters run against a local mock by default. MIT-licensed. View the repo →
What you have now
- A request that is a contract. Scope, framework version and grade band pinned at the edge, with generation behind a log — so a provider outage is consumer lag rather than a broken first period.
- Alignment claims you can retract. A graph of typed nodes and classed edges with provenance, so a bad claim is a removable observation rather than permanent damage, and coverage is reported per class or not at all.
- Appropriateness that is measured, not asserted. Four properties over immutable blocks, one rubric loaded by two runtimes, and an evaluation whose labels come from teachers rather than a model with the generator's blind spots.
- A guardrail the editor cannot route around. Publishability derived from an inner join to gate decisions, review receipts and asset rights, so a pasted paragraph and an uploaded photograph are gated exactly like generated content.
- Publishes that send deltas and report their own fidelity. Diffs rather than re-imports, idempotent elements with stable external ids, dead-lettered rejects, and a freshness target that catches the expired token before a term does.
- A number that survives “compared to what?”. Randomisation at the section level, a power calculation with the clustering in it, and a readout that knows whether it is answering superiority or non-inferiority.
That is the pipeline, and it is honest to say the parts shown here are the easy parts. A queue consumer, a component solver, a rubric in a file, a diff engine, a hash-based assignment — these are solved problems with known shapes, and a competent team can build all of them in a quarter. The hard part in any real company is none of that. It is the organisational agreement about what “covered” means: whether an inferred alignment counts, whether a teacher’s edit means the content was wrong or that she has a strong voice, whether a 0.08 SD shortfall is an acceptable price for content a district could not otherwise afford, whether a photograph of a classroom is a resource or a child’s data. Every one of those is a curriculum decision wearing an engineering costume, and no amount of correct code resolves them. Build the pipeline so that when the answers change, you can change them in one place — and so that the audit log can always say who decided, and when.
Explain it back
Reveal a model answer
The sentence reports a point estimate as if it were the finding. It is not — the interval contains zero and it contains −0.31, so the study is equally consistent with the unit costing children a third of a standard deviation. “0.14” is the centre of a range whose honest summary is “we could not detect an effect”. The mechanism is that the pilot was underpowered for any effect size that is plausible in education: twenty-four classrooms, twenty-five children each, and therefore a minimum detectable effect near 0.5 SD — several times larger than anything a supplemental unit realistically produces.
The readout should have said: no detectable effect; 0.14 SD, 95% CI −0.31 to +0.59; minimum detectable effect at this sample 0.49 SD; observed clustering 0.17 against an assumed 0.15. Every one of those numbers changes what a reader does next.
What the team should do next depends on which question they actually care about, and they should pick before collecting more data. If the claim they want is “as good as what you have, far cheaper”, the study should have been a non-inferiority design with a margin the curriculum director signed off on — and they should price that honestly, because a 0.10 SD margin needs something on the order of 289 classrooms per arm, which is a multi-district study and a year, not a pilot. If that is not affordable, the correct move is to stop making efficacy claims at this resolution and test something coarser: hold out an entire grade level for a term and measure the aggregate, accepting a blunter answer honestly rather than a precise one that is noise.
The bonus consequence is political rather than statistical. Once “0.14 SD improvement” is in a channel it gets pasted into a renewal deck, and it becomes a number nobody can retract without appearing to attack the team that produced it — and, eventually, a claim a district repeats to parents. The interval is what stops that, which is why it belongs in the sentence and not in a footnote.
Every stage in this pipeline is a bet that an artefact teaches what it is labelled. Re-read the map with all six posts behind you and the chain reads differently — every hop is now a place you know how to corrupt a lesson, and how not to.
Back to the map →