Uniformly most powerful test

In statistical hypothesis testing, a uniformly most powerful (UMP) test is a hypothesis test which has the greatest power formula_1 among all possible tests of a given size "α". For example, according to the Neyman–Pearson lemma, the likelihood-ratio test is UMP for testing simple (point) hypotheses.
Setting.
Let formula_2 denote a random vector (corresponding to the measurements), taken from a parametrized family of probability density functions or probability mass functions formula_3, which depends on the unknown deterministic parameter formula_4. The parameter space formula_5 is partitioned into two disjoint sets formula_6 and formula_7. Let formula_8 denote the hypothesis that formula_9, and let formula_10 denote the hypothesis that formula_11.
The binary test of hypotheses is performed using a test function formula_12.
meaning that formula_10 is in force if the measurement formula_15 and that formula_8 is in force if the measurement formula_17.
Note that formula_18 is a disjoint covering of the measurement space.
Formal definition.
A test function formula_12 is UMP of size formula_20 if for any other test function formula_21 satisfying
we have
The Karlin–Rubin theorem.
The Karlin–Rubin theorem can be regarded as an extension of the Neyman–Pearson lemma for composite hypotheses. Consider a scalar measurement having a probability density function parameterized by a scalar parameter "θ", and define the likelihood ratio formula_24.
If formula_25 is monotone non-decreasing, in formula_26, for any pair formula_27 (meaning that the greater formula_26 is, the more likely formula_10 is), then the threshold test:
is the UMP test of size "α" for testing formula_33
Note that exactly the same test is also UMP for testing formula_34
Important case: exponential family.
Although the Karlin-Rubin theorem may seem weak because of its restriction to scalar parameter and scalar measurement, it turns out that there exist a host of problems for which the theorem holds. In particular, the one-dimensional exponential family of probability density functions or probability mass functions with
has a monotone non-decreasing likelihood ratio in the sufficient statistic formula_36, provided that formula_37 is non-decreasing.
Example.
Let formula_38 denote i.i.d. normally distributed formula_39-dimensional random vectors with mean formula_40 and covariance matrix formula_41. We then have
which is exactly in the form of the exponential family shown in the previous section, with the sufficient statistic being
Thus, we conclude that the test
is the UMP test of size formula_20 for testing formula_46 vs. formula_47
Further discussion.
Finally, we note that in general, UMP tests do not exist for vector parameters or for two-sided tests (a test in which one hypothesis lies on both sides of the alternative). The reason is that in these situations, the most powerful test of a given size for one possible value of the parameter (e.g. for formula_48 where formula_49) is different from the most powerful test of the same size for a different value of the parameter (e.g. for formula_50 where formula_51). As a result, no test is uniformly most powerful in these situations.