]>
As usual, our starting point is a random experiment with an underlying sample space, and a probability measure . In the basic statistical model, we have an observable random variable taking values in a set . In general, can have quite a complicated structure. For example, if the experiment is to sample objects from a population and record various measurements of interest, then
where is the vector of measurements for the object. The most important special case occurs when are independent and identically distributed. In this case, we have a random sample of size from the common distribution.
In the previous sections, we developed tests for parameters based on natural test statistics. However, in other cases, the tests may not be parametric, or there may not be an obvious statistic to start with. Thus, we need a more general method for constructing test statistics. Moreover, we do not yet know if the tests constructed so far are the best, in the sense of maximizing the power for the set of alternatives. In this and the next section, we investigate both of these ideas. Likelihood functions, similar to those used in maximum likelihood estimation, will play a key role.
Suppose that has one of two possible distributions. Our simple hypotheses are
We will use subscripts on the probability measure to indicate the two hypotheses. The test that we will construct is based on the following simple idea: if we observe , then the condition is evidence in favor of the alternative; the opposite inequality is evidence against the alternative. Thus, let
The function is the likelihood ratio function for the hypotheses and is the likelihood ratio statistic. Restating our earlier observation, note that small values of are evidence in favor of . Thus it seems reasonable that the likelihood ratio statistic may be a good test statistic, and that we should consider tests of the following form, where is a constant:
Show that the significance level of the test is
As usual, we can try to construct a test by choosing so that is a prescribed value. If has a discrete distribution, this will only be possible when is a value of the distribution function of .
An important special case of this model occurs when the distribution of depends on a parameter that has two possible values. Thus, the parameter space is , and denotes the probability density function of when and denotes the probability density function of when . In this case, the hypotheses are equivalent to
The following exercises establish the Neyman-Pearson Lemma, named for Jerzy Neyman and Egon Pearson. This result shows that the test given above is most powerful. Let
Use the definitions of and to show that
Show that if then
Hint: Write and . Use the additivity of probability and the results in Exercise 2.
Consider the tests with rejection regions and . Recall that the size of a rejection region is the significance of the test with that rejection region. Use Exercise 3 to show that if the size of is at least as large as the size of then the test with rejection region is more powerful than the test with rejection region :
The Neyman-Pearson lemma is a beautiful result, and is more useful than might be first apparent. In many important cases, the same most powerful test works for a range of alternatives, and thus is a uniformly most powerful test for this range. In the following subsections, we will consider some of these special cases.
Suppose that is a random sample from the exponential distribution with scale parameter . The sample variables might represent the lifetimes from a sample of devices of a certain type. We are interested in testing the simple hypotheses versus , where and are distinct specified values.
Recall that the sum of the variables is a sufficient statistic for :
Recall also that has the gamma distribution with shape parameter and scale parameter . For , we will denote the quantile of order for the this distribution by .
Show that the likelihood ratio statistic is
Show that the following tests are most powerful test at the level
Note that the tests in Exercise 6 do not depend on the value of . This fact, together with the monotonicity of the power function can be used to shows that the tests are uniformly most powerful for the usual one-sided tests.
Show that
Suppose that is a random sample of size from the Bernoulli distribution with success parameter . The sample could represent the results of tossing a coin times, where is the probability of heads. We wish to test the simple hypotheses versus , where and are distinct specified values. In the coin tossing model, we know that the probability of heads is either or , but we don't know which.
Recall that the number of successes is a sufficient statistic for :
Recall also that has the binomial distribution with parameters and . For , we will denote the quantile of order for the this distribution by ; although since the distribution is discrete, only certain values of are possible.
Show that the likelihood ratio statistic is
Show that the following tests are most powerful test at the level
Note that the tests in Exercise 9 do not depend on the value of . This fact, together with the monotonicity of the power function can be used to shows that the tests are uniformly most powerful for the usual one-sided tests.
Show that
The one-sided tests that we derived in the normal model, for with known, for with unknown, and for with unknown are all uniformly most powerful. On the other hand, none of the two-sided tests are uniformly most powerful.
Suppose that is a random sample, either from the Poisson distribution with parameter 1 or from the geometric distribution on with parameter . Thus, we wish to test the hypotheses
Show that the likelihood ratio statistic is
Show that the most powerful tests have the following form, where is a constant: reject if and only if
The likelihood ratio statistic can be generalized to composite hypotheses. Suppose again that the probability density function of the data variable depends on a parameter , taking values in a parameter space . Consider the hypotheses versus , where . We define
The function is the likelihood ratio function and is the likelihood ratio statistic. By the same reasoning as before, small values of are evidence in favor of the alternative hypothesis.