{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Wald's Sequential Probability Ratio Test" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Sequential test: draw data sequentially\n", "\n", "Sequence of data $X_1, X_2, \\ldots$. \n", "\n", "Two hypotheses, $H_0$ and $H_1$, each of which completely specifies the joint distribution of the data.\n", "\n", "Assume that the joint distributions under $H_0$ and $H_1$ are absolutely continuous with respect to each other, relative to some underlying measure.\n", "\n", "Let $f_{0m}$ be the likelihood of $H_0$ for data $(X_j)_{j=1}^m$ and let $f_{1m}$ be the likelihood of $H_1$ for data $(X_j)_{j=1}^m$.\n", "\n", "The likelihood ratio of $H_1$ to $H_0$ is $f_{1m}/f_{0m}$; this is (loosely speaking) the probability of observing $X_1, \\ldots, X_m$ if $H_1$ is true, divided by the probability of observing $X_1, \\ldots, X_m$ if $H_0$ is true.\n", "\n", "The probability of observing the data actually observed will tend to be higher for whichever\n", "hypothesis is in fact true, so this likelihood ratio will tend to be greater than $1$ if $H_1$ is true,\n", "and will tend to be less than $1$ if $H_0$ is true.\n", "The more observations we make, the more probable it is that the\n", "resulting likelihood ratio will be small if $H_0$ is true.\n", "Wald (1945) showed that if $H_0$ is true, then the probability is at most $\\alpha$\n", "that the likelihood ratio\n", "is ever greater than $1/\\alpha$, no matter how many observations are made.\n", "More generally, we have:\n", "
\n", "\n", "
For any $\\alpha \\in (0, 1)$ and $\\beta \\in [0, 1)$, the following sequential \n", " algorithm tests the hypothesis $H_0$ at level no larger than \n", " $\\alpha$ and with power at least $1-\\beta$\n", " against the alternative $H_1$.\n", "
\n", "\n", "\n", " Set $m=0$.\n", "
\n", "\n", "Wald's SPRT for $p$ in iid Bernoulli trials
\n", "\n", "Conclude $p > p_0$ if \n", "$$\n", " \\frac{p_{1m}}{p_{0m}} \\ge \\frac{1-\\beta}{\\alpha}.\n", "$$\n", "Conclude $p \\le p_0$ if\n", "$$\n", " \\frac{p_{1m}}{p_{0m}} \\le \\frac{\\beta}{1-\\alpha}.\n", "$$\n", "Otherwise, draw again.\n", "\n", "