PAS204: Lecture 17. tests UMP ad asymtotic I this lecture, we will idetify UMP tests, wherever they exist, for comarig a simle ull hyothesis with a comoud alterative. We also look at costructig tests based o the asymtotic distributio of the MLE. Fially, we brie y itroduce geeralised likelihood ratio tests. 17.1 Simle versus comoud Cosider testig H 0 : = 0 versus H 1 : 2 1, where 1 cotais a rage of ossible values for (obviously excludig 0 ). So we have a simle ull hyothesis but a comoud alterative. I Lecture 15, we de ed size ad ower geerally for ay ull ad alterative hyotheses, ad we itroduced the otio of UMP (Uiformly Most Powerful) tests. The fact that the ull hyothesis is simle makes the de itios of size ad UMP tests a little easier. The size of a test C is just = C ( 0 ) = P (X 2 C j = 0 ), the robability of rst kid of error. Remark 17.1 This is the same as i the last lecture, where we cosidered two simle hyotheses, but ow because we have a comoud alterative we do ot have a sigle value to rereset the robability of secod kid of error. C is a UMP test of size if for ay other test C with C ( 0 ) we have C () C (), 8 2 1. We ca use the Neyma-Pearso Lemma to tell us exactly whe such a UMP test exists. Theorem 1 (UMP tests) If the LR test of size for H 0 : = 0 versus the simle alterative H 1 : = 1 is the same test for all 1 2 1, the this is the UMP test of size for H 0 : = 0 agaist the comoud alterative H 1 : 2 1. Otherwise o UMP test of these hyotheses of size exists. Proof. The LR test of H 0 : = 0 versus H 1 : = 1 of size maximises the ower fuctio at 1, i.e. it maximises C ( 1 ). If it is the same test for all 1 2 1, the it maximises the ower for all 2 1, ad is clearly UMP. 1
Now suose that 1 6= 2 are two di eret elemets of 1. Let the LR test of H 0 : = 0 versus H 1 : = 1 of size have critical regio C 1 ad that with alterative hyothesis that = 2, also of size, have critical regio C 2. Now if C 1 6= C 2, we have di eret tests for these two alteratives. The C 1 has maximal ower at = 1 (ad caot be beate there), but C 2 has maximal ower at = 2 (ad caot be beate there). So either is UMP, but or ca ay other test be UMP. Remark 17.2 So wheever a UMP test exists for a simle H 0 it is a LR test. Examle 17.1 (Normal samle, kow variace) I Examle 16.1 we foud the LR test of H 0 : = 0 versus H 1 : = 1, give a samle from the N(; 2 ) distributio with 2 kow. It has the form C = fx : x k g if 0 > 1 ; C = fx : x k g if 0 < 1 : The i Examle 16.2 we foud that xig the test size leads to k = Z if 0 > 1, i.e. 0 C = x : x 0 o Z if 0 > 1 ; (17.1) ad similarly we had C = o x : x 0 + Z if 0 < 1 : (17.2) We therefore might have, deedig o 1, two di eret LR tests of size, whereas Theorem 1 says we have a UMP test if there is oly oe LR test. Alyig the theorem, we d the followig results The test (17.1) is UMP for H 0 : = 0 agaist H 1 : < 0 (or for ay 1 ( 1; 0 )). The test (17.2) is UMP for H 0 : = 0 agaist H 1 : > 0 (or for ay 1 ( 0 ; 1)). There is o UMP test for H 0 : = 0 agaist H 1 : 6= 0 (or for ay 1 cotaiig some < 0 ad some > 0 ). 2
Examle 17.2 (Exoetial samle) I Examle 16.3 we foud the LR test of H 0 : = 0 versus H 1 : = 1 > 0, for a samle from the Ex() distributio. The test of size was foud to be C = x : x 2 2;1 : 2 0 This is the same test for ay 1 > 0, ad so it is UMP agaist H 1 : > 0. 17.2 Oe-sided ad two-sided tests If we have a ull hyothesis that = 0 ad a alterative that > 0, the we call this a oe-sided alterative. The hyothesis that < 0 is also oe-sided. The geeral two-sided alterative is simly that 6= 0. I both the examles we d that there are UMP tests for oe-sided alteratives. Furthermore, these tests are themselves oe-sided, beig of the form that we reject the ull hyothesis if the relevat test statistic T (x) is o oe side of some boudary. (The test statistic haes to be x i both these cases.) This is commo, ad we ca see that it will arise wheever (x) is a mootoe fuctio of T (x). UMP tests exist for oe-sided alteratives i may simle statistical roblems (ad are oe-sided tests). However, we geerally do ot d UMP tests for two-sided alteratives. Remark 17.3 I Level 1 Statistics, you will have met two-sided tests for two-sided alteratives, ad these ofte have some good roerties but they are ot UMP tests. We do t have time ow to go ito the aroriate criteria for two-sided tests. 17.3 Asymtotic test costructio The rocess of costructig LR tests is, as we saw i Lecture 16, ofte comlicated. If we have a large samle, a simle aroximate test ca be costructed usig the asymtotic distributio of ML estimators. The aroach is like that used i rst year Statistics to costruct tests: we choose a test statistic ad the form of the critical regio (ste 1 of the rocedure i sectio 16.4, Lecture 16) i a ad hoc or ituitive way. We the d the test of size (ste 2) i the usual way. I this case, we are goig to use the MLE as the test statistic i ste 1. We are also goig to 3
use the asymtotic distributio of the MLE to do ste 2 i a aroximate way. We will suose that is a scalar arameter. Suose we have the simle ull hyothesis H 0 : = 0. The if the ull hyothesis is true, the asymtotic theory says that the ^ has aroximately the distributio N( 0 ; I( 0 ) 1 ). Now suose we have the oe-sided alterative H 1 : > 0. A sesible test would be oe-sided also, ad reject H 0 if ^ exceeds some value k. So cosider C = fx : ^ > k g. Now assumig that we caot derive the exact distributio of ^ (ad so caot do ste 2 exactly), we ca use its asymtotic distributio to d k aroximately to give a test of size. = P (^(X) > k j = 0 ) = P I(0 )(^(X) 0 ) > I( 0 )(k 0 ) j = 0 De ig Z s N(0; 1), the asymtotic distributio of ^(X) ow imlies that P (Z > I( 0 )(k 0 )) = 1 I(0 )(k 0 ) ; : ad hece the observed sigi cace of the data is P = 1 I(0 )(^ 0 ) : The test of size is give by I(0 )(k 0 ) = Z ; ) k = 0 + Z = I( 0 ) : So a aroximate 100% test is C = fx : ^(X) > 0 + Z = I( 0 )g. We ca similarly costruct the other oe-sided test C = fx : ^(X) < 0 Z = I( 0 )g for H 1 : < 0, or a two-sided test C = fx : j^(x) 0 j > Z =2 = I( 0 )g for H 1 : 6= 0. Examle 17.3 (Cacer trials) I Case Study A, we modelled the cacer trial data as = 70 Beroulli trials, givig the biomial observatio X = umber of atiets survivig, ad X s Bi(70; ), where is the robability of survival with the ew treatmet. We have observed x = 34. We are iterested i whether the ew treatmet has a di eret survival robability tha the curret gure of 0.4. So we wish to test H 0 : = 0:4 versus H 1 : 6= 0:4. Usig the asymtotic aroach, we kow that ^(X) = X= has the asymtotic distributio N(; (1 )=). 4
So if H 0 is true its distributio is N(0:4; 0:40:6=70), or N(0:4; 0:003429). We have a two-sided alterative, so we use the two-sided test, which is to reject H 0 if j^ 0 j I( 0 ) > Z =2. We d j^ 0 j I( 0 ) = j 34 70 0:4j= 0:003429 = 1:464. From tables we have Z 0:05 = 1:645, ad our calculated value of 1.464 does ot exceed this, so the result is ot sigi cat at the = 100 2 0:05% = 10% level. I fact the observed sigi cace is P = 2f1 (1:464)g = 0:143, or 14.3%. We therefore do ot reject H 0. The data rovide isu ciet evidece agaist the ull hyothesis that the ew treatmet has a survival rate equal to the rate of 40% achieved with curret methods. This is a asymtotic, aroximate, test. That meas it is oly aroximately a 10% test. What is its true size? We kow that ^ = X has a biomial distributio, ad with = 70 this should be well aroximated by a ormal distributio, but let us calculate the exact size of the asymtotic 10% test. It rejects H 0 if (multilyig through by 70) jx 28j > 70 0:003429 1:645 = 6:7. Thus, it rejects H 0 if X > 34 or if X < 22. (With our actual observed x = 34, we early had sigi cace!) Now if X really has the Bi(70; 0:4) distributio seci ed by H 0, we ca d the robability that X lies i this critical regio. The calculatio is easily erformed by comuter (e.g. usig S-Plus), ad we d the true test size is P (X > 34 j = 0:4) + P (X < 22 j = 0:4) = 0:112, or just over 11%. Examle 17.4 (Normal samle, zero mea) Suose that X 1 ; X 2 ; : : : ; X are ideedetly distributed as N(0; 2 ). We wish to test the ull hyothesis that 2 = 2 0 versus the alterative hyothesis that 2 > 2 0. There is a UMP test for this roblem, as show i exercises, but we will cosider derivig a aroximate test from the asymtotic distributio of the MLE. P I Examle 14.2, we foud that the MLE is ^ 2 = S 0 =, where S 0 = i=1 X2 i, ad its asymtotic distributio is ormal with mea 2 ad variace 2 4 =. We ca ow aly the theory of costructig tests from the asymtotic MLE distributio. We have H 0 : 2 = 2 0 ad H 1 : 2 > 2 0, so we wat the oe-sided test C = fx : ^ > 0 + Z = I( 0 )g = fx : ^ 2 > 2 0 + Z q2 4 0=g = fx : ^ 2 > 2 0(1 + Z 2=)g : (Comare with the LR test for this roblem.) 5
17.4 Geeralised LR tests We ed this lecture, ad ed our treatmet of the theory of frequetist hyothesis testig, with a brief look at some more advaced theory. What do we do if we have a simle ull hyothesis but there is o UMP test? What do we do if we have a comoud ull hyothesis? Remark 17.4 The latter is obviously a imortat questio. We have bee lookig at really simle roblems, tyically with just oe arameter, but i the real world of alied statistics we costatly deal with models havig may arameters. I that cotext we ever have a simle ull hyothesis. Our ull hyotheses ofte assert that oe of the arameters takes a seci c value, but such a hyothesis is ot simle, sice that would etail secifyig the values of all the arameters. The stadard geeral method is to costruct the Geeralised Likelihood Ratio (GLR) (x) = max 2 1 [ 0 L(; x) (17.3) max 20 L(; x) ad to use it i the same way as the simle LR. There is some asymtotic theory about the distributio of (X) (which is more useful i this cotext tha the asymtotic theory about the MLE), ad we ca thereby costruct aroximate GLR tests. All of this takes us beyod the remit of this course, but it is useful at least for you to kow of how frequetist theory deals with more comlex situatios tha the oes we ve discussed here. Note, however, that the theory is agai asymtotic, ad we ca rarely d exact tests. A. O Haga Aril 2008 6