Author: Eiko
Time: 2024-12-28 15:59:49 - 2025-01-03 12:56:59 (UTC)
Reference:
Theoretical Statistics by Robert W. Keener
Probability Theory by Eiko
Foundations of Modern Probability by Olav Kallenberg
Let be some parameter space and be a partition of this space, be certain law. is a hypothesis that .
Hypothesis testing aims to tell which of the two competing hypotheses or is correct by observing .
Test Functions
Non-Randomized Tests
A non-randomized test of versus can be specified by a critical region , so if we reject in favor of .
Power function describes the probability of rejecting given
Significant level is the small error calculating the worst error rate of falsely rejecting when it is true.
In theory we would want which would imply , but this is not possible in practice.
Randomized Tests
Sometimes instead of giving a critical region or equivalently a function , we give a critical function instead, reflecting the probability of rejecting . Then a non-randomized test is just a special case of .
In this case, the power function is
and the significant level is
The main advantage of randomized tests is that they can form (convex) linear combinations.
Simple Hypothesis And Simple Tests
A hypothesis is simple if is a singleton.
Neyman-Pearson Lemma
Assume and are both simple, in this case there is a Neyman-Pearson Lemma describing all reasonable tests. Let and be the distributions of under and respectively.
We have
We would want to choose such that and . Consider maximizing subject to .
Lagrange Multiplier Lemma
Let be any constant, then maximizing gives the function maximizing subject to , here .
Moreover, any function maximizing subject to must have .
Note that and depend on here.
Proof.
How To Maximize ?
We know that is a finite signed measure, so according to Hahn decomposition, any finite signed measure can be uniquely decomposed into the difference of two mutually singular finite measures
So maximizing is equivalent to maximizing . From which it is clear that we can pick where is the set where is concentrated, and there is a freedom for us to pick anything from on a set of measure zero in .
If can be written as density functions, then the set is simply . This can be seen as a slight generalization of a likelihood ratio test, if we ignore the division by zero problem, it can be written as .
The Neyman-Pearson Lemma
The Lemma states that, for a simple test scenario, given any level , there exists a likelihood ratio test (which means and potentially some other function values on a measure zero set) with exactly level (i.e. ). The likelihood ratio test is chosen to be maximizing and any likelihood ratio test maximizes the power function subject to the significant level .
Some Detailed Results Relating To Neyman-Pearson Lemma
For , let be a critical value for a likelihood ratio test in the sense of Neyman-Pearson Lemma, i.e.
Then and .
We have
If or , with a likelihood ratio test with level , then .
Proof.
We already proved that . Since
and by the construction of , we know that a.e. in . This implies a.e. in .
Consider the constant test , by we know . If equality holds then is also in the set, thus a.e. in , but this equality never hold since a.e. in . The only possible case is and .
Examples
Suppose we are testing
with hypothesis and , for simplicity assume . The likelihood ratio test is of the form
And the test with level is simply given by . Some magic is happening here, this test is optimal as it maximizes among level , but is independent of ! (This is an example of Uniformly Most Powerful Test. An interesting question is when does this happen?)
Consider a very simple random variable , with and . The likelihood ratio is
Then clearly there are different regions of we can take to form different tests
The corresponding significant levels are