Statistics, Experimentation & Causality
A model result matters only when the estimand, uncertainty and decision rule survive leakage, selection and alternative explanations.
Section 4 of 5 · 8 units · about 41 hours
By the end you can Audit a flattering experiment, identify its validity failures, and produce a defensible rerun and decision memo.
Units
- Estimands, estimators, bias, variance and consistency4h
- Maximum likelihood and MAP estimation5h
- Intervals, hypothesis tests, power and effect size6h
- Bootstrap, permutation tests and multiple comparisons6h
- Regression diagnostics, calibration and uncertainty5h
- Missingness and selection mechanisms4h
- Randomized experiment design, power and MDE5h
- Causal claims, causal graphs, adjustment and identification6h
Build it
Mini project · about 14 to 18 hours
A statistical audit harness and the memo for a flattering experiment
Build a simulation harness with known truth that tests estimators, intervals, multiplicity, regression, calibration, missingness and causal adjustment, each with an oracle and a failure case. Then audit an experiment that looks too good, rerun it under a plan written first, and write the decision memo.
- 1Build the harness on the probability section's estimator: each check names its known truth and reports a Monte Carlo standard error. Compare the two variance estimators across sample sizes against analytic normal-sampling moments, then repeat under a heavy tail and show the normal-theory formula failing.
- 2Measure percentile-bootstrap coverage for an exponential mean at two sample sizes. Simulate many hypotheses with some true nulls and compare FWER and FDR under Bonferroni and Benjamini-Hochberg, then measure the bias and naive-interval coverage of the largest of several estimates with equal true effects.
- 3Generate separate fitting and evaluation data with a curved mean, growing variance and dependent errors. Compare the usual and sandwich standard errors against the sampling standard deviation, measure prediction-interval coverage, and score fixed forecasts by Brier decomposition with subgroup calibration.
- 4Compare complete-case, standardized and inverse-weighted means under MCAR, MAR and MNAR. Add a stratum with zero observation probability, draw a DAG where selection depends on treatment, and report MNAR as a sensitivity range over an assumed shift rather than a single corrected number.
- 5Define a potential-outcome estimand with a DAG holding a confounder and a selection node. Show observed and interventional means differing, a valid backdoor adjustment recovering the effect, an invalid adjustment failing, and an overlap failure, optionally reporting pre-treatment subgroup effects without claiming individual effects.
- 6Construct the flattering experiment: event-row analysis of a user-randomized test, daily peeking, best-of-several metrics and a post-treatment segment, plus a sample-ratio mismatch. Write the pre-analysis plan before touching it, then list every validity failure with the check that exposes it, including the assignment-count check.
- 7Rerun under the plan: size arms for both rejection tails, randomize and analyze users, hold the fixed horizon, and report the effect and interval against the practical threshold and guardrails. Write a one-page memo deciding ship, extend or do not ship, with reasons.
What you hand in
numlab/stats/: the harness and every check, each with its oracle and failure case.- The audit: the pre-analysis plan, validity failures with checks, the rerun and its output.
- The decision memo, the two DAGs, and
notes/statistics.mdwith the derivations behind each check.
How to check it
- Self-grade with the rubric below
How it's graded
Estimators and intervals
Pass: The variance-estimator comparison matches the normal-theory oracle, the heavy-tail failure is shown, and bootstrap coverage is measured at both sample sizes.
Great: Each Monte Carlo result reports its standard error, and the notes say which assumption each failure breaks.
Multiplicity and selection
Pass: Realized FWER and FDR match what each procedure controls, and the winner's-curse bias is measured.
Great: The notes distinguish the two error rates and explain why the selected estimate needs its own interval.
Regression and calibration
Pass: Diagnostics, the sandwich comparison, prediction-interval coverage and the Brier decomposition are all on separate evaluation data.
Great: Subgroup calibration finds a failure that the overall reliability term hides.
Missingness and causality
Pass: Each missingness mechanism, both overlap failures and the valid and invalid adjustments are shown against the known truth.
Great: The MNAR result is a sensitivity range, and every causal claim names its untestable assumption.
Experiment audit and memo
Pass: The plan predates the analysis, every validity failure has a check, and the rerun reports the effect against the practical threshold.
Great: The memo makes a decision a reader could act on, with guardrails and residual risks stated.
Resources
- MIT 14.310x - Data Analysis for Social ScientistsMIT OpenCourseWare
Follow lectures 11-15, 17-20 and 22 with matching slides and problem sets for inference, regression, causality and experiment design.
- MIT 18.05 - Inference practiceMIT OpenCourseWare
Use classes 17-20, 22-24 and 26 with their problem sets for tests, intervals, bootstrap and regression.
- Causal Inference: What IfHernán & Robins
Read Chapters 1-3 and 6-8 for causal effects, DAGs, confounding, selection bias and identification reasoning.
- Patterns of trustworthy experimentationMicrosoft ExP
Read after the course to connect health checks, guardrails and statistical interpretation to production launch decisions.
- Always Valid InferenceJohari, Pekelis & Walsh
Use the introduction and worked motivation to understand optional-stopping failure. Reproducing the theory is outside this gate.
- Probabilistic Machine Learning: An IntroductionKevin P. Murphy
Use the April 18, 2025 online edition: Sections 4.2.3 to 4.2.5, 4.5.1 and 4.6.4.1 for Bernoulli and Gaussian MLE/MAP; the definition and central intervals in 4.6.6; 2.1.2 and 11.7.4 for predictive uncertainty. Exercises 4.1 and 4.2 supply derivation practice.
- Permutation nulls and false discovery controlSciPy
Read
permutation_testNotes, Unpaired statistics, for exchangeability and exact partitions;false_discovery_controlNotes and the named thrombolysis example for Bonferroni and Benjamini-Hochberg. Use as an independent implementation oracle, not as a substitute for stating assumptions. - Probability calibration: the statistical propertyscikit-learn
Read the opening calibration definition, the proper-scoring-rule note, and Section 1.16.1, Calibration curves. Stop before recalibration methods; the later Classical ML unit implements them.