Definitionresearch
Test martingale
Also called nonnegative supermartingale test.
A nonnegative process that starts at 1 and is a martingale (or supermartingale) under the null. It is the wealth of a bettor against the null and can be checked at any time.
A test martingale for a null hypothesis is a martingale that starts at and never takes a negative value under every distribution of the null. Its value is the wealth of a bettor who starts with one unit and makes fair bets against the null, so a large value is evidence against the null. By Ville's inequality the process ever reaches with null probability at most , so a test that rejects at that level is valid no matter when the analyst looks or stops. The value at any stopping time is an e-variable.
Definition
Let be observations, let with trivial, and let be a set of distributions of the sequence, the null hypothesis.
Test supermartingale. A process is a test supermartingale for when, for every :
- is -measurable with values in for every ;
- ;
- for every , -almost surely.
Test martingale. It is a test martingale when the inequality in 3 is an equality for every . For a simple null this is the definition of Shafer, Shen, Vereshchagin and Vovk (2011): a nonnegative -martingale with initial value 1.
Limit and stopped value. A nonnegative supermartingale converges almost surely, so exists -almost surely. For a stopping time , possibly infinite, means on .
Every test supermartingale is an e-process. A process is an e-process for when for every and every stopping time . A test supermartingale has this property. Fix and a stopping time . For each , is a bounded stopping time, so the optional stopping theorem for supermartingales gives . As , almost surely, and Fatou's lemma, which needs , gives . So is an e-variable for every stopping time .
The converse is false. If for each the process is a test martingale for , then satisfies , so it is an e-process, but in general it is not a supermartingale under any . Ramdas, Ruf, Larsson and Koolen (2022) use such processes to test exchangeability, a composite null for which test supermartingales are weak. So "e-process" is the wider class, not a second name for this one.
Anytime-valid p-value. The process is nonincreasing, and by Ville's inequality for every and every .
Construction by betting. Most test martingales are running products. Let be a density that depends only on (a predictable bet), and let with conditional density positive where is. Then
is a test martingale, because . For observations in with null mean , the product with predictable is a test martingale for the whole composite null "the conditional mean is ": each factor is nonnegative and has conditional mean 1. A mixture of test martingales with a prior fixed in advance is again a test martingale, by Fubini's theorem.
Examples and non-examples
A likelihood ratio on a coin. Test the fair coin, : the flips are i.i.d. with heads probability , against the bet : heads with probability . A head multiplies the wealth by and a tail by . The conditional mean of a factor under is . On the flips HHTHHHTH:
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | |
|---|---|---|---|---|---|---|---|---|
| flip | H | H | T | H | H | H | T | H |
| 1.4 | 1.96 | 1.176 | 1.6464 | 2.3050 | 3.2269 | 1.9362 | 2.7106 |
So . The largest value is , so the anytime-valid p-value after eight flips is . Rejecting the fair coin at needs .
The Gaussian exponential martingale. For i.i.d. data with sum and a fixed , the process is a test martingale for , since . Mixing over gives the normal mixture , which is the statistic of the mixture SPRT and of a normal confidence sequence.
A Bayes factor. For a simple null and a prior on alternatives fixed before the data, the Bayes factor is a test martingale for . Shafer et al. (2011) discuss this link.
Non-example: the missing drift term. with is nonnegative and starts at 1, but for . It is a submartingale, and a rule that rejects when it exceeds has no level- guarantee.
Non-example: a bet placed after the outcome. On the coin, let the bettor pick the side after seeing the flip: the factor is 1.4 whatever happens, so . Here depends on , so it is not predictable, and .
Non-example: the wrong start. A nonnegative martingale with satisfies only . Dividing by 2 gives a test martingale.
Non-example: the running maximum. is nonnegative and starts at 1, but it is a submartingale, not a supermartingale. On the coin it is 3.2269 at while . Its reciprocal is still the anytime-valid p-value above, because the guarantee comes from Ville's inequality on .
Related definitions
- E-variable. An e-variable is one nonnegative statistic with null mean at most 1. A test supermartingale gives one at every stopping time, as shown above.
- E-process. The wider class of processes with for all stopping times and all null . Every test supermartingale is an e-process; the infimum construction above gives e-processes that are not supermartingales (Ramdas et al. 2022, 2023).
- Martingale. A test martingale is a martingale under each null distribution, with the two extra conditions and .
- Ville's inequality. Ville's inequality is the time-uniform bound that turns a test supermartingale into a sequential test.
- Sequential tests. The log of the SPRT statistic is the log of a likelihood-ratio test martingale; the mixture SPRT uses a mixture; a confidence sequence collects the parameter values whose test martingale stays below .
- Growth rate. Let the data be i.i.d. from and let the bet be a fixed density . By the law of large numbers, almost surely, with the Kullback-Leibler divergence. The rate is largest, equal to , when the bet is . This is the reason to bet with a good guess of the alternative.
References
- Glenn Shafer, Alexander Shen, Nikolai Vereshchagin and Vladimir Vovk, Test martingales, Bayes factors and p-values, Statistical Science 26(1) (2011), pages 84 to 101, the definition of a test martingale, its relation to Bayes factors and p-values, and the history of the idea from Ville
- Aaditya Ramdas, Peter Grünwald, Vladimir Vovk and Glenn Shafer, Game-theoretic statistics and safe anytime-valid inference, Statistical Science 38(4) (2023), pages 576 to 601, test martingales, test supermartingales and e-processes for composite nulls, and testing by betting
- Aaditya Ramdas, Johannes Ruf, Martin Larsson and Wouter M. Koolen, Testing exchangeability, fork-convexity, supermartingales and e-processes, International Journal of Approximate Reasoning 141 (2022), pages 83 to 109, e-processes that are not supermartingales, and the test of exchangeability where they are needed
- Steven R. Howard, Aaditya Ramdas, Jon McAuliffe and Jasjeet Sekhon, Time-uniform Chernoff bounds via nonnegative supermartingales, Probability Surveys 17 (2020), pages 257 to 317, nonnegative supermartingales built from exponential and mixture constructions, with Ville's inequality
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag 8V449R Edit this page History Report an error Markdown