Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.Let a coin decide
To find out whether a new gripper really picks better, don’t let engineers choose which robots get it; they might pick the best-maintained ones. Flip a coin for each robot. The coin knows nothing about the robots, so the two groups are alike in every way on average, whether or not we measured it. Any difference afterwards is caused by the gripper, or by luck. Statistics tells us how much luck to expect.
An A/B test is the same idea for software. Half the fleet runs version A and half runs version B, chosen at random.
Fleet operators A/B-test planners, perception models and firmware. Flight-software teams randomize test cases and Monte Carlo seeds. Good experiment design (enough samples, no peeking, sanity checks) separates real improvements from noise and prevents shipping regressions.
- 1. Why assign treatment by coin flip?
- 2. An A/B test compares…
- 3. Checking results every day and stopping when it looks good…
Level 1: Beginner
★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.Analysing a success-rate experiment
With and successes, the two-proportion z-test uses the pooled :
The 95% CI for the lift is . For 82% vs 86% with 1000 each, and .
Sample size before you start
To detect an absolute lift with significance and power , use per arm
Detecting 80% → 83% takes about 2600 robot runs per arm. Halving quadruples .
- 1. Halving the minimum detectable effect multiplies the required n by…
- 2. At α = 0.05 and 80% power, z₁₋α/₂ + z₁₋β ≈
- 3. The sample size should be fixed…
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 45 minUndergraduate students and practising engineers.Design choices
- Unit of randomization: robot, mission, day or site. Analyse at that level. Interference between units (shared maps, traffic) calls for cluster or switchback designs.
- Blocking / stratification: randomize separately within terrain types or hardware revisions. This guarantees balance on them and reduces variance.
- Variance reduction with CUPED (Deng et al., 2013): use a pre-experiment covariate and analyse with . The variance drops by , so the same precision needs fewer units. Since is measured before treatment, the estimate stays unbiased.
- Sanity checks: a sample-ratio mismatch (SRM) test on the A/B counts, A/A tests, and guardrail metrics.
Pitfalls
- Peeking: repeatedly testing and stopping at significance inflates the type I error. With 10 looks it’s about 20%. Use group-sequential designs (Pocock, O’Brien–Fleming), alpha spending, or always-valid inference (Johari et al., 2017).
- Many metrics or segments: correct for multiplicity (A5.1-10) or pre-specify a primary metric.
- Novelty effects and non-stationarity: run full cycles.
- 1. CUPED reduces variance by the factor…
- 2. A sample-ratio mismatch indicates…
- 3. Blocking randomizes…
Level 3: Advanced
★★★★☆ Advanced⏱ 40 minGraduate level, with full derivations and proofs.Deriving the sample-size formula
with . We reject when (one side dominates). Power is . Setting this to gives . ∎
Why CUPED is unbiased and optimal
is the same in both arms (it’s pre-treatment and randomization balances it), so subtracting doesn’t shift the difference in means. is minimized at , giving . ∎ This is the control-variates idea from Monte Carlo (A5.2-6).
Why peeking inflates error
Under the null, the running z-statistic behaves like a scaled random walk . By the law of the iterated logarithm it eventually exceeds any fixed threshold with probability 1, so “test until significant” always rejects eventually. Group-sequential boundaries spend across looks so the total stays at .
Exercise 3.1: Per-arm n for a continuous metric with σ = 1 and δ = 0.5
, so 63 per arm.
- 1. The optimal CUPED θ is…
- 2. Testing until significant under the null…
- 3. O'Brien–Fleming boundaries are…
Level 4: Expert
★★★★★ Expert⏱ 35 minResearchers: original papers and open problems.Fleet experimentation done right
A delivery-robot operator tests a new path planner. Plan: randomize per robot, blocked by depot. Primary metric: on-time rate. CUPED uses the previous month’s on-time rate. Fix n from a power calculation, run an SRM check daily (but don’t peek at the metric), and analyse once. Exercise 2 shows CUPED’s variance cut and the false-positive inflation from peeking, using simulation.
Experimentation in AI, robotics and aerospace
- Online controlled experiments at scale: Kohavi, Tang and Xu (2020) is the field manual, covering SRM, guardrails, variance reduction and interference.
- Bandits vs A/B tests: adaptive allocation trades estimation precision for lower regret (A4.1 and A5.2), as in Thompson sampling (Russo et al., 2018).
- Sim-to-real evaluation: randomized seeds and paired designs (common random numbers) compare controllers in simulation with much less variance.
- Clinical-trial-style flight tests: pre-registered success criteria and sequential monitoring for expensive, safety-critical trials (Jennison and Turnbull, 2000).
References
- R. A. Fisher (1935). The Design of Experiments. Oliver & Boyd.
- R. Kohavi, D. Tang, Y. Xu (2020). Trustworthy Online Controlled Experiments. Cambridge University Press.
- A. Deng, Y. Xu, R. Kohavi, T. Walker (2013). “Improving the sensitivity of online controlled experiments by utilizing pre-experiment data.” WSDM.
- R. Johari, P. Koomen, L. Pekelis, D. Walsh (2017). “Peeking at A/B tests: why it matters, and what to do about it.” KDD.
- S. Pocock (1977). “Group sequential methods in the design and analysis of clinical trials.” Biometrika, 64(2).
- P. O’Brien, T. Fleming (1979). “A multiple testing procedure for clinical trials.” Biometrics, 35(3).
- C. Jennison, B. Turnbull (2000). Group Sequential Methods with Applications to Clinical Trials. Chapman & Hall/CRC.
- A. Fabijan et al. (2019). “Diagnosing sample ratio mismatch in online controlled experiments.” KDD.
- D. Russo, B. Van Roy, A. Kazerouni, I. Osband, Z. Wen (2018). “A tutorial on Thompson sampling.” Foundations and Trends in Machine Learning, 11(1).
- I. Bojinov, D. Simchi-Levi, J. Zhao (2023). “Design and analysis of switchback experiments.” Management Science, 69(7).