STK4 ad STK9 Autum 6 ypothesis testig Covers (most of) the followig material from hapter 8: Setio 8. Setios 8.. ad 8..3 Setio 8.3. Setio 8.3. (util defiitio 8.3.6) Ørulf Borga Departmet of Mathematis Uiversity of Oslo Basi oepts Assume that we have radom variables X ( X, X,..., X ) with joit pmf or pdf f ( x ) f ( x,..., x ) where We wat to test the ull hypothesis : versus the alterative hypothesis : A hypothesis test is a proedure that speifies: for whih values of X we rejet (aept ) for whih values of we do ot rejet (aept ) X Usually a test is speified i terms of a test statisti W W ( X) Likelihood ratio tests Let X, X,..., X be a radom sample from the populatio f ( x ), so X, X,..., X are iid ad their pmf or pdf is f ( x ), where may be a vetor The the likelihood is give by k i L( x) L( x,..., x ) f ( x ) The likelihood ratio test statisti for testig versus : is sup L( x) sup L( x) i : The likelihood ratio test (LRT) has rejetio regio 3 of the form { x: } Let ˆ be the urestrited maximum likelihood estimator of, i.e. the value of that maximizes the likelihood whe Let ˆ be the maximum likelihood estimator of uder the ull hypothesis, i.e. the value of that maximizes the likelihood whe The the LRT statistis takes the form L( ˆ x) L( ˆ x) Example 8.. (ormal LRT) Let X, X,..., X be iid (,) 4 We will test : versus :
Example 8..3 (expoetial LRT) Let X, X,..., X be iid with pdf ( < < ) ( x ) e x f ( x ) x< We will test : versus Theorem 8..4 : > If T ( X) is a suffiiet statisti for ad λ * ( t) ad are the LRT statistis based o T ad X, respetively, the λ * ( T) for all x i the sample spae 5 Example 8..5 (LRT ad suffiiey) Let X, X,..., X be iid (,) We will test : versus : Example 8..6 (ormal LRT, ukow variae) Let X, X,..., X be iid µσ (, ) We will test : µ µ versus : µ > µ 6 Uio-itersetio tests Assume the ull hypothesis may be expressed as : where Γ is a idex set (fiite or ifiite) Suppose there are tests available for testig versus : : { x: T R} The rejetio regio for the test of is The the uio-itersetio test has rejetio regio { x: T R} 7 : I partiular, if the test for : has rejetio regio { x: T > } the the uio-itersetio test has rejetio regio { x: > } T { x: sup T > } Example 8..8 (ormal uio-itersetio test) Let X, X,..., X be iid µσ (, ) We will test : µ µ versus : µ µ 8
Itersetio-uio tests Assume the ull hypothesis may be expressed as : where Γ is a idex set (fiite or ifiite) { } Suppose that x: T is the rejetio regio R for a test of versus : : The the itersetio-uio test has rejetio regio { x: T R} { } If the test of : has rejetio regio x: T the rejetio regio of the itersetiouio test beomes { x: if T } 9 Error probabilities ad power We will test : versus : We may make two types of error: Let R be the rejetio regio of the test, so we rejet : if X R X R, Probability of Type I error: ( ) P Casella & Berger distiguish betwee the size ad level of a test: a test with power futio β ( ) is a size α test if sup β ( ) α Probability of Type II error: ( X ) ( X ), P R P R Power futio: β ( ) P( X R) Example 8.3.3 (ormal power futio) a test with power futio β ( ) is a level α test if sup β ( ) α Example 8.3.7 (size of ormal LRT, modified) Let X, X,..., X be iid σ (, ) with σ kow We will test : versus : > Let X, X,..., X be iid σ (, ) with σ kow We will test : versus : > A test with power futio β ( ) is ubiased if β ( ) β ( ) for all ad
Most powerful tests Defiitio 8.3. Let C be a lass of tests for testig : versus :. A test i the lass C, with power futio β ( ), is a uiformly most powerful (UMP) lass C test if β ( ) β ( ) for every ad every β ( ) that is a power futio of a test i lass C We will use this defiitio whe C is the lass of all level α tests 3 Theorem 8.3. (Neyma-Pearso Lemma) Cosider testig versus, : : where the pdf or pmf orrespodig to i is f ( x i ); i,, usig a test with rejetio regio R that satisfies x R if f ( x ) > k f ( x ) x R if f ( x ) < k f ( x ) for some k, ad The (8.3.) α P ( R) (8.3.) X a) Ay test that satisfies (8.3.) ad (8.3.) is a UMP level α test 4 b) If there exists a test satisfyig (8.3.) ad (8.3.) with k>, the every UMP level α test is a size α test [i.e. satisfies (8.3.)] ad every UMP level α test satisfies (8.3.) exept perhaps o a set A satisfyig P ( X A) P ( X A) Corollary 8.3.3 Cosider the hypothesis testig problem of Theorem 8.3.. Suppose that T T ( X) is a suffiiet statisti for ad let g( t i ) be the pdf or pmf of T orrespodig to. The ay test i; i, based o T with rejetio regio S is a UMP level α test if it satisfies 5 t S if g( t ) > k g( t ) t S if g( t ) < k g( t ) for some k, where α P ( T S) 6
Example 8.3.5 (UMP ormal test) Let X, X,..., X be iid σ (, ) with σ kow We will fid the UMP test for testig test : versus : where > 7