We are doing sequential hypothesis testing for a simple null vs simple alternative with densities and , respectively. We examine the likelihood ratio at time ,
We reject the null of and accepts the null if , otherwise we keep sampling. let be the outcome of the procedure: if the null is rejected, if accepted. and are chosen such that the type-I error and type-II error satisfy
for some pre-specified . Wald introduced the test in the 1930s and showed that its stopping time is almost surely finite. and Wald and Wolfowitz proved its optimality: If another test has lower type-I and type-II error then the expected stopping time is larger.
Unfortunately, and are often impossible to solve for, so approximations are necessary. One usually sets and . But this loosens the guarantees. Fischer and Ramdas show how to improve the SPRT when approximating and .