Unit 9 of 11 · about 4 hours · measure

Sequential monitoring and predeclared heterogeneous effects

A dashboard offers many opportunities to choose a favorable stopping time or subgroup. A decision contract preserves which result was confirmatory and why an early intervention occurred.

You'll be able to

  • Separate a fixed-horizon efficacy decision from predeclared harm monitoring and integrity alerts.
  • Measure predeclared subgroup effects and their contrast without selecting the best slice after outcomes.
  • Reject aggregate-SRM reassurance when opposing segment defects cancel.

Covers

Sequential monitoring without post hoc threshold changesHeterogeneous effects with predeclared slices
1

Read

In this order, only the parts listed

0 of 4 done

  1. Microsoft ExP: monitoring and stable segmentsPatterns of Trustworthy Experimentation - During Experiment

    Measure Early and Often; Set Up Alerts to Detect Unintended Degradations; Use Segments that are Stable during the A/B Test

    Use its monitoring checklist, not its unspecified stronger significance level as a stopping boundary. Its aggregate-SRM and segment-validity guarantees are false; use the counterexample below.

  2. What If: effects within pre-treatment strataCausal Inference: What If

    August 19, 2026 revision: Sections 4.1 and 4.2, printed pp. 47 to 50

    Use the cancellation and within-stratum identification arguments. Skip the historical examples and later transportability discussion.

  3. Johari, Pekelis and Walsh: what always-valid meansAlways Valid Inference: Continuous Monitoring of A/B Tests

    arXiv:1512.04922v3, July 16, 2019: Definition 1 on printed p. 13 and Definition 2 on printed p. 15

    Two definitions only. Do not implement always-valid infrastructure here. The required route is fixed-horizon success with separately declared harm stops.

  4. Microsoft ExP: the final decision auditPatterns of Trustworthy Experimentation - Post-Experiment

    Ensure Metric Movements Align with the Test Set-Up; Check for any Telemetry-Breaking Changes; Tradeoff the Observed Metric Movements; When in Doubt, Reproduce Results

    Use these headings as a checklist after the integrity gate. Skip the dilution recipes; keep the primary estimand and denominator fixed rather than selecting them from metric movements.

2

Focus on

  • Freeze the final sample or calendar horizon, outcome-maturation window, primary success threshold and multiplicity policy. Safety checks may halt exposure, but they do not license an unplanned early efficacy claim.
  • Specify harm thresholds, minimum evidence, alert cadence and actions separately. Report stopped estimates and reasons; ordinary fixed-horizon intervals do not acquire stopped-time coverage by naming the stop in advance.
  • Declare baseline slices and effect scale before outcomes, retain counts and uncertainty for every planned slice, and test the difference between effects rather than comparing their separate significance labels.
  • Always-valid p-values remain valid at allowed data-dependent stopping times; the confidence definition supplies coverage at such a time under its assumptions. Ordinary dashboard p-values and repeated ordinary intervals do not have those properties.
Common mistakes · 3
  • Saying one subgroup is significant and the other is not, therefore effects differ. The effect contrast needs its own uncertainty calculation.
  • Calling stable segments and no detected SRM a guarantee of trustworthy insights. Outcome corruption, multiplicity and opposing segment defects can remain.
  • Deleting harm-stopped experiments or analyzing only experiments that reached completion as if they were unselected. Stopping can select the retained estimates.
3

Try it yourself

Closed-book, before checking anything

With NumPy 2.5.4 initialize rng = np.random.default_rng(2026) once. For each of 200 independent experiments, draw 2,000 baseline bits with rng.binomial(1, 0.5, 2000), then assignments the same way, then independent standard-normal outcome noise. Set y = l + a*(1 - 2*l) + e. The planted baseline-stratum effects are 1 and -1; the population ATE is zero. Estimate both stratum differences and the aggregate difference at the planned end of each experiment. Require the three replication means within 0.1 of [1, -1, 0]; retain per-experiment stratum counts, effects and standard errors rather than only the winning stratum. Separately build two static-segment count pairs: treatment/control 5,500/4,500 and 4,500/5,500. Overall counts match perfectly while each segment has against 50/50. This refutes the ExP page's assertion that an aggregate SRM pass implies each static segment is SRM-free.
4

Quiz yourself

Answer first, then mark it. Missed ones go to Review.

0 got · 0 missed

  1. 1.Does a null aggregate effect imply that no subgroup benefits?Answer

    No. Equal population weights make effects 1 and -1 cancel in this generator. A decision about targeting needs the predeclared subgroup contrasts and their uncertainty.

  2. 2.Does predeclaring a harm stop make an ordinary interval valid at that stop?Answer

    No. If the stopping time depends on observed data, ordinary fixed-sample coverage need not hold. Safety action is still appropriate, but report the selection or use inference calibrated for that stopping rule.

  3. 3.A favorable unplanned slice appears at the final horizon. What next?Answer

    Label it exploratory, include the slice search and multiplicity context, and test the targeted hypothesis on fresh confirmatory evidence before treating it as established.

You're done when

The heterogeneity and segment-SRM checks pass, and your decision audit distinguishes planned efficacy, harm intervention and exploratory slice findings.

Only when you can do this without notes.

Leads to

Notes

Resources · 4 for this unit, 13 more in the section
  • Causal Inference: What IfMiguel Hernan and James Robins · primary

    Use the August 19, 2026 revision (printed pages): 3.6 target trials (pp. 41 to 46), 8.4 to 8.5 selection bias, 12.1 to 12.3 inverse probability weighting with Fine Point 12.2 on structural versus random positivity violations (p. 169), 13.1 to 13.5 standardization and its validity conditions, and 15.4 propensity methods. Chapters 1 to 3 and 6 to 8 are lookup for core identification. Compare weighting and standardization estimates; a small difference does not prove a correct model, and failed overlap should narrow the estimand.

  • Patterns of Trustworthy Experimentation - During ExperimentMicrosoft Research ExP · required

    Use Measure Holistically and Frequently, alerts and auto-shutdown, and the static and date segments. Two claims overstate: "as long as the overall test doesn't have an SRM, each segment slide will be SRM-free" (opposite subgroup defects can cancel) and that stable segments "guarantee" trustworthy insights. It asks you to account for peeking without giving a boundary, so predeclare a fixed-horizon success rule and separate harm stops.

  • Patterns of Trustworthy Experimentation - Post-ExperimentMicrosoft Research ExP · required

    Use the post-experiment checks as the decision checklist: SRM and A/A results, triggering and dilution, variance reduction, capping, date and market slices, network effects and experiment interactions, before reading the treatment effect.

  • Always Valid Inference: Continuous Monitoring of A/B TestsJohari, Pekelis and Walsh · reference

    Two definitions only: v3 Definition 1 (always-valid p-values over any stopping time) and Definition 2 (confidence coverage at a stopping time). This stage's required route is a predeclared fixed horizon with separately declared harm stops; never present a harm-stopped estimate as an unselected fixed-horizon result. Full always-valid infrastructure comes later.

Also in this section

  • 14.310x Lecture 22 - Experimental DesignMIT OpenCourseWare · required

    Read slides 2 to 4 (randomization unit, stratification, clustering) and 10 to 20 (displacement effects and two-stage saturation designs: 235 agencies in 47 quintuplets assigned 0% to 100% saturation). Simulate a saturation design with spillovers. Slide 33's "only 28%" is an incremental coefficient, not an absolute receipt rate, and slides 7 to 9 have removed diagrams.

  • Introduction to Causal Inference - Chapter 8Brady Neal · required

    Read Chapter 8, Unobserved Confounding: Bounds and Sensitivity Analysis (pp. 73 to 85). Proposition 8.8's bias formula comes from a noiseless linear example; for practice, vary a hidden confounder in a noisy simulation, derive the matching bias expression and report the tipping point where the conclusion changes. Chapters 12 to 14 are unfinished placeholders.

  • Patterns of Trustworthy Experimentation - Pre-ExperimentMicrosoft Research ExP · required

    Use Forming a Hypothesis and Selecting Users, the randomization-unit and pre-experiment bias checks, Set Up Counterfactual Logging (trigger eligibility for users who were or would have been affected, not both potential outcomes), shared infrastructure and gradual rollout. Specify assignment, exposure, joins, exclusions and the decision before outcomes exist. Rerandomization needs a predeclared design, never seed shopping after outcomes.

  • Diagnosing Sample Ratio Mismatch in A/B TestingMicrosoft Research · required

    Gate every effect on the SRM test (chi-square against the planned allocation; Microsoft's p < 0.0005 is a platform policy). Build a count table from assigned to exposed, logged, joined and triggered, inject one stage-specific defect and find where counts first diverge; the MSN bot-filter case shows treatment-dependent filtering reversing a result. A passing check does not validate outcomes, and symmetric loss can preserve the ratio.

  • Improving the Sensitivity of Online Controlled Experiments by Utilizing Pre-Experiment DataDeng, Xu, Kohavi and Walker, WSDM 2013 · required

    Read 3.1 to 3.3 (stratification, control variates, their connection) and 4.1 to 4.3 (covariate choice, missing pre-period data, covariates beyond the pre-period). Adjust with ; variance falls by the factor . X must be unaffected by treatment, and the abstract's "about 50%" is a Bing result. Simulate the variance reduction and keep new users with a stated missing-history rule.

  • Trustworthy Online Controlled Experiments: Five Puzzling Outcomes ExplainedKohavi et al., KDD 2012 · required

    Read 3.3 (initial effects appear to trend), 3.4 (experiment length and power) and 3.5 (carryover: seven days of A/A, 47 days of A/B and over three weeks of follow-up before the effect faded). Separate novelty from carryover, keep bucket histories and justify a washout; three weeks is one case, not a rule. Plot noncumulative daily cohorts, since cumulative plots drift toward zero mechanically.

  • Design and Analysis of Experiments in Networks: Reducing Bias from InterferenceEckles, Karrer and Ugander, Journal of Causal Inference 2017 · support

    Read Section 1 and Eq. 1: the global effect contrasts everyone treated with everyone in control, and outcomes depend on the whole assignment vector. Cluster assignment trades bias for variance and is not automatically unbiased for the global effect; it also needs enough independent clusters for inference. The rest is depth.

  • DoWhy 0.14 - Simple ExamplePyWhy · support

    Pin dowhy==0.14 and follow the graph-first interface: CausalModel(data=..., treatment=..., outcome=..., graph=...), identify_effect(), estimate_effect(..., method_name="backdoor.linear_regression"), then the refuters. A large refuter p-value means no discrepancy under that perturbation, not "no unmeasured confounding". Include one scenario built to fail: an omitted confounder or a placebo treatment.

  • Causal Inference for the Brave and TrueMatheus Facure · support

    A Python alternative for practice: Chapter 10 Matching (Matching Bias, The Curse of Dimensionality) and Chapter 11 Propensity Score (Propensity Weighting, Standard Error, Common Issues), with overlap diagnostics; Chapter 19 (evaluating causal models with cumulative gain on randomized data) is depth. Part II is the author's labelled work in progress.

  • Diagnosing Sample Ratio Mismatch in Online Controlled Experiments: A Taxonomy and Rules of Thumb for PractitionersFabijan et al., KDD 2019 · support

    The root-cause taxonomy behind the article: 2.3.1 (definition), Section 5 (assignment, execution, log processing, analysis, interference), Figure 5 and Section 6 (investigation rules). Use it to name falsifiable causes; do not read both versions in full.

  • A/B Testing Intuition BustersKohavi, Deng and Vermeer, KDD 2022 · support

    Read Sections 2 and 5: 3/82 against 12/75 conversions reported as a 337% lift, Fisher exact p = 0.013, and observed power determined by the p-value. Report counts, absolute effects and intervals, and replicate surprising selected wins. A false-positive probability needs a prior success rate and power, not one p-value.

  • Seven Pitfalls to Avoid when Running Controlled Experiments on the WebCrook, Frasca, Kohavi and Longbotham, KDD 2009 · reference

    Only for its failure examples: 5.2 (variance of non-per-user metrics), 6 (Simpson's paradox from changing ramp allocations) and 8.1 to 8.4 (audits and instrumentation). Resample the randomized unit, not page views.

  • Causal Inference: The Mixtape (second edition, The Remix)Scott Cunningham · optional

    The live site is the work-in-progress second edition; do not mix first-edition chapter numbers. Use 5.10 (the National Supported Work exercise: matching and weighting against an experimental benchmark, with trimming and falsification) and, for an optional quasi-experiment, Chapter 9 (9.3 parallel trends and no anticipation, 9.5 event studies, 9.6 falsification). The code is R and Stata.