Now we observe for some . The test can be one-sided or point vs two-sided or interval vs two sided
1 One-sided Testing
We have proved that MLR leads to UMP. But generally we can't find MLR in any statistic . In such cases we still come up with a test that rejects for some large (which is larger when is larger.) We say is stochastically increasing in if is non-decreasing in , . The power function, then, is also non-decreasing in , and is valid for (1).
1.1 Score Test
When MLR is not existent, our idea is to maximize power for alternatives near . If is large, we will then have a lot of information about so power will be close to . Consider LRT so it is equivalent to reject for large .
Score Test
Reject for large .
Example (Laplace)
Suppose and we want to test Given , the LRT is where
If take , approaches to Since then gives the score test.
1.2 The Sign Test as a Nonparametric Test
Sign Test
. Usually for nonparametric testing problem.
Suppose ( is an unknown c.d.f for distribution). Assume that is continuous and strictly increasing, then median is well-defined, and consider Then . So
2 Two-sided Alternatives
Consider (3). Specifically, if , it goes to (2). If , is a point null. If , is an interval null.
2.1 Two-tailed Tests
For two-sided alternative, we generally employ two-tailed test:
(We say the test rejects for extreme . )
Example (Z-test)
If we test for , we choose
This is undesirable because the power falls below on part of the alternative: there are alternative values of for which our chance of rejecting the null is even less than it would be if the null were true.
Intuitively, we can't find a test that maximizes power on both parts of the alternative.
From the example above with no UMP test, we can impose a constraint that rules out all but one test. In the above example, leads to a test that
Is equal-tailed: Type I Error is balanced on left & right part.
Is unbiased: the power is at least everywhere on the alternative.
Example (Exponential)
Consider for , with c.d.f
We set , . Then the power is
The power is below every on , so it is not unbiased.
If we want unbiased test, we have to set derivative of the power to at . We can solve numerically for
2.2 Optimal Unbiased Tests
If power is differentiable at , and , then any unbiased test must have , and . (See figure in this example. )
Example (Exponential Family)
In exponential family, let , (this is MLR in ,) then
Set the last expression to , we have
UMPU
is UMP unbiased (UMPU), if for any other unbiased level test , , .
For exponential family models we have the following result:
Theorem (UMP Unbiased Test)
Assume , and we want to test (3).
Suppose rejects for extreme values of , with the cutoffs chosen so that
attains power at the boundary of the null:
If , .
Then is UMPU.
Proof
WLOG: . First consider . The proof is similar as proof of NP lemma. For , solve where . The Lagrangian is
Since , the test maximizing the Lagrangian is Here , . , we can find for which at , in which case Then solve .
For any other unbiased test
For , replace constraints by .