Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.Innocent until proven guilty
A new grasp policy is claimed to beat the old one. A test starts by assuming nothing changed (the null hypothesis). Then it asks: if nothing changed, how surprising are the results we got? If they’d be very surprising, say a 1-in-50 fluke, we reject “nothing changed”.
A test can go wrong in two ways:
- False alarm (type I): declaring an improvement that isn’t real.
- Miss (type II): failing to notice a real improvement.
Tests are designed to keep false alarms rare, and enough data keeps misses rare too.
Is the new controller really better? Is this sensor faulty, or was that a fluke? Is the filter’s uncertainty honest? Hypothesis tests turn these into decisions with known error rates, and power analysis tells you how many trials to run before you start.
- 1. A test begins by assuming…
- 2. Declaring an effect that isn't real is a…
- 3. More data generally reduces…
Level 1: Beginner
★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.Ingredients of a test
- A null hypothesis (e.g. ) and an alternative (e.g. , or ).
- A test statistic with known distribution under , e.g. .
- A level (often 0.05). Reject when the statistic lands in the most extreme of its null distribution.
The p-value
The p-value is the probability, if were true, of a statistic at least as extreme as the one observed. Reject when . For example, gives two-sided .
A p-value is not:
- the probability that is true;
- the probability the result is a fluke;
- the size or importance of the effect.
A tiny effect with huge can have a tiny .
The two errors
| true | false | |
|---|---|---|
| Reject | type I error (rate ) | correct (power ) |
| Don’t reject | correct | type II error (rate ) |
- 1. z = 1.96 gives two-sided p ≈
- 2. p = 0.03 means…
- 3. Power is…
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 45 minUndergraduate students and practising engineers.Power and sample size
For a one-sided z test of against ,
For a two-sided test, replace by . Halving the detectable effect needs 4× the data. Plan the sample size before collecting data. An under-powered study usually finds nothing, and when it does find something, it exaggerates the effect (the “winner’s curse”).
Exact tests for counts
Did a policy that succeeded 46 times out of 50 beat a known 80% rate? Under , . Exact binomial tests avoid normal approximations for small samples.
Statistical vs practical significance
Always report the effect size and its confidence interval (A5.1-6), not just “p < 0.05”. A 0.1% throughput gain can be “significant” with a million trials and still be worthless. A 20% gain can be “not significant” with 5 trials and still be worth a bigger test.
- 1. To detect half the effect with the same power you need…
- 2. Lowering α from 0.05 to 0.01 (same n) makes power…
- 3. Under H₀, p-values are distributed…
Level 3: Advanced
★★★★☆ Advanced⏱ 40 minGraduate level, with full derivations and proofs.The Neyman–Pearson lemma
For simple hypotheses vs , the most powerful level- test rejects when the likelihood ratio exceeds a threshold chosen so that .
Proof sketch: let be the LR test and any other level- test. Then pointwise. Integrate: . ∎
For normal means, the LR is monotone in , so the z-test is most powerful. That makes it uniformly most powerful against all .
Generalized likelihood-ratio tests
For composite hypotheses, use . Wilks’ theorem: , where is the number of constrained parameters (A5.1-4). The t-test, the χ² tests and model-comparison tests are all GLRTs.
p-values are uniform under H₀
If the statistic is continuous with null CDF , then and (the probability integral transform, A4.3-2). So rejecting at has exactly rate under the null. Every extra look at the data adds another chance at , which is why peeking inflates false alarms (A4.4-7).
Exercise 3.1: Derive the power formula
Under , . So .
- 1. The most powerful test for simple hypotheses thresholds…
- 2. −2 log λ for a GLRT tends to…
- 3. Looking at the data repeatedly with a fixed-α test makes the overall false-alarm rate…
Level 4: Expert
★★★★★ Expert⏱ 45 minResearchers: original papers and open problems.Is my filter honest? The NEES test
A Kalman filter reports an error covariance . If it’s consistent, the normalized estimation error squared follows . Averaged over Monte Carlo runs, . That gives a two-sided acceptance band. If you tune the process noise too small, the filter becomes overconfident: its NEES sits far above the band, and it may later diverge. The same test on innovations (NIS) works with real data where the truth is unknown (Bar-Shalom, Li and Kirubarajan, 2001). This is standard practice for validating navigation filters before flight.
Hypothesis testing in AI, robotics and aerospace
- Fault detection. χ² residual tests flag sensor or actuator faults. GNSS receiver autonomous integrity monitoring (RAIM) tests the residuals of redundant satellite measurements, with α set by the allowed false-alarm rate (Brown, 1992).
- A/B tests and policy comparison need power analysis up front, fixed stopping rules, and multiple-testing control (A5.1-10).
- Reproducibility. Under-powered studies and p-hacking produce false findings (Ioannidis, 2005). The ASA statement on p-values (Wasserstein and Lazar, 2016) lists what p-values do and don’t mean.
- Distribution shift detection. Two-sample tests (KS, MMD) on model inputs or embeddings warn when deployment data differ from training data (Rabanser et al., 2019).
- Change detection. CUSUM and the generalized likelihood ratio detect regime changes online in telemetry (Page, 1954; Basseville and Nikiforov, 1993).
References
- J. Neyman, E. Pearson (1933). “On the problem of the most efficient tests of statistical hypotheses.” Phil. Trans. R. Soc. A, 231.
- R. A. Fisher (1925). Statistical Methods for Research Workers. Oliver & Boyd.
- E. Lehmann, J. Romano (2005). Testing Statistical Hypotheses, 3rd ed. Springer.
- R. Wasserstein, N. Lazar (2016). “The ASA statement on p-values: context, process, and purpose.” The American Statistician, 70(2).
- J. Ioannidis (2005). “Why most published research findings are false.” PLoS Medicine, 2(8).
- J. Cohen (1988). Statistical Power Analysis for the Behavioral Sciences, 2nd ed. Erlbaum.
- Y. Bar-Shalom, X. R. Li, T. Kirubarajan (2001). Estimation with Applications to Tracking and Navigation, Ch. 5. Wiley.
- R. G. Brown (1992). “A baseline GPS RAIM scheme and a note on the equivalence of three RAIM methods.” Navigation, 39(3).
- M. Basseville, I. Nikiforov (1993). Detection of Abrupt Changes. Prentice Hall.
- S. Rabanser, S. Günnemann, Z. Lipton (2019). “Failing loudly: an empirical study of methods for detecting dataset shift.” NeurIPS.