Last Lecture Biostatistics 602 - Statistical Iferece Lecture 23 Hyu Mi Kag April 11th, 2013 What is p-value? What is the advatage of p-value compared to hypothesis testig procedure with size α? How ca oe costruct a valid p-value? What is Fisher s exact p-value? Is Fisher s exact p-value uiformly distributed uder ull hypothesis? Hyu Mi Kag Biostatistics 602 - Lecture 23 April 11th, 2013 1 / 29 Hyu Mi Kag Biostatistics 602 - Lecture 23 April 11th, 2013 2 / 29 p-values Costructig a valid p-value Coclusios from Hypothesis Testig Reject H 0 or accept H 0 If size of the test is α) small, the decisio to reject H 0 is covicig If α is large, the decisio may ot be very covicig Defiitio: p-value A p-value p) is a test statistic satisfyig 0 px) 1 for every sample poit x Small values of p) give evidece that H 1 is true A p-value is valid if, for every θ Ω 0 ad every 0 α 1, Prp) α θ) α Theorem 8327 Let W) be a test statistic such that large values of W give evidece that H 1 is true For each sample poit x, defie px) sup PrW) Wx) θ) θ Ω 0 The p) is a valid p-value Hyu Mi Kag Biostatistics 602 - Lecture 23 April 11th, 2013 3 / 29 Hyu Mi Kag Biostatistics 602 - Lecture 23 April 11th, 2013 4 / 29
p-values by coditioig o o sufficiet statistic - Fisher s Exact Test Suppose S) is a sufficiet statistic for the model fx θ) : θ Ω 0 } ot ecessarily icludig alterative hypothesis) If the ull hypothesis is true, the coditioal distributio of give S s does ot deped o θ Agai, let W) deote a test statistic where large value give evidece that H 1 is true Defie px) PrW) Wx) S Sx)) If we cosider oly the coditioal distributio, by Theorem 8327, this is a valid p-value, meaig that Prp) α S s) α Problem Let 1 ad 2 be idepedet observatios with 1 Biomial 1, p 1 ), ad 2 Biomial 2, p 2 ) Cosider testig H 0 : p 1 p 2 versus H 1 : p 1 > p 2 Fid a valid p-value fuctio Solutio Uder H 0, if we let p deote the commo value of p 1 p 2 The the joi pmf of 1, 2 ) is ) ) 1 fx 1, x 2 p) p x 1 1 p) 1 x 1 2 p x 2 1 p) 2 x 2 x 1 x 2 ) ) 1 2 p x 1+x 2 1 p) 1+ 2 x 1 x 2 x 1 x 2 Therefore S 1 + 2 is a sufficiet statistic uder H 0 Hyu Mi Kag Biostatistics 602 - Lecture 23 April 11th, 2013 5 / 29 Hyu Mi Kag Biostatistics 602 - Lecture 23 April 11th, 2013 6 / 29 Solutio - Fisher s Exact Test cot d) Give the value of S s, it is reasoable to use 1 as a test statistic ad reject H 0 i favor of H 1 for large values of 1,because large values of 1 correspod to small values of 2 s 1 The coditioal distributio of 1 give S s is a hypergeometric distributio f 1 x 1 s) 1 ) 2 x 1 ) 1 + 2 s s x 1 ) Thus, the p-value coditioal o the sufficiet statistic s x 1 + x 2 is px 1, x 2 ) mi 1,s) jx 1 fj s) ˆθ) is usually represeted as a poit estimator Iterval Estimator Let [L), U)], where L) ad U) are fuctios of sample ad L) U) Based o the observed sample x, we ca make a iferece that θ [L), U)] The we call [L), U)] a iterval estimator of θ Three types of itervals Two-sided iterval [L), U)] Oe-sided with lower-boud) iterval [L), ) Oe-sided with upper-boud) iterval, U)] Hyu Mi Kag Biostatistics 602 - Lecture 23 April 11th, 2013 7 / 29 Hyu Mi Kag Biostatistics 602 - Lecture 23 April 11th, 2013 8 / 29
Defiitios Let i iid N µ, 1) Defie 1 A poit estimator of µ : Pr µ) 0 2 A iterval estimator of µ : [ 1, + 1] Prµ [ 1, + 1]) Pr 1 µ + 1) as, where Z N 0, 1) Prµ 1 µ + 1) Pr µ) ) Pr Z ) P 1 Defiitio : Coverage Probability Give a iterval estimator [L), U)] of θ, its coverage probability is defied as Prθ [L), U)]) I other words, the probability of a radom variable i iterval [L), U)] covers the parameter θ Defiitio: Cofidece Coefficiet Cofidece coefficiet is defied as if Prθ [L), U)]) θ Ω Hyu Mi Kag Biostatistics 602 - Lecture 23 April 11th, 2013 9 / 29 Hyu Mi Kag Biostatistics 602 - Lecture 23 April 11th, 2013 10 / 29 Defiitios How to costruct cofidece iterval? Defiitio : Give a iterval estimator [L), U)] of θ, if its cofidece coefficiet is 1 α, we call it a 1 α) cofidece iterval Defiitio: Expected Legth Give a iterval estimator [L), U)] of θ, its expected legth is defied as E[U) L)] A cofidece iterval ca be obtaied by ivertig the acceptace regio of a test There is a oe-to-oe correspodece betwee tests ad cofidece itervals or cofidece sets) where are radom samples from f x θ) I other words, it is the average legth of the iterval estimator Hyu Mi Kag Biostatistics 602 - Lecture 23 April 11th, 2013 11 / 29 Hyu Mi Kag Biostatistics 602 - Lecture 23 April 11th, 2013 12 / 29
iid i N θ, σ 2 ) where σ 2 is kow Cosider H 0 : θ θ 0 vs H 1 : θ θ 0 As previously show, level α LRT test reject H 0 if ad oly if θ 0 σ/ > Equivaletly, we accept H 0 if θ 0 σ/ Acceptig H 0 : θ θ 0 because we believe our data agrees with the hypothesis θ θ 0 θ 0 σ/ cot d) As this is size α test, the probability of acceptig H 0 is 1 α 1 α Pr θ 0 σ θ 0 + σ ) Pr σ θ 0 + σ ) Sice θ 0 is arbitrary, 1 α Pr σ θ + σ ) θ 0 σ z α/2 θ 0 + σ z α/2 } Acceptace regio is x : θ 0 σ x θ 0 + σ Hyu Mi Kag Biostatistics 602 - Lecture 23 April 11th, 2013 13 / 29 Therefore, [ σ, + σ ] is 1 α) cofidece iterval CI) Hyu Mi Kag Biostatistics 602 - Lecture 23 April 11th, 2013 14 / 29 Cofidece itervals ad level α test Theorem 922 1 For each θ 0 Ω, let Aθ 0 ) be the acceptace regio of a level α test of H 0 : θ θ 0 vs H 1 : θ θ 0 Defie a set C) θ : x Aθ)}, the the radom set C) is a 1 α cofidece set 2 Coversely, if C) is a 1 α) cofidece set for θ, for ay θ 0, defie the acceptace regio of a test for the hypothesis H 0 : θ θ 0 by Aθ 0 ) x : θ 0 Cx)} The the test has level α iid For i N θ, σ 2 ), the acceptace regio Aθ 0 ) is a subset of the sample space Aθ 0 ) x : θ 0 σ θ 0 + σ } The cofidece set C) is a subset of the parameter space C) θ : θ σ θ + σ } θ : σ θ + σ } Hyu Mi Kag Biostatistics 602 - Lecture 23 April 11th, 2013 15 / 29 Hyu Mi Kag Biostatistics 602 - Lecture 23 April 11th, 2013 16 / 29
Cofidece set ad cofidece iterval There is o guaratee that the cofidece set obtaied from Theorem 922 is a iterval, but quite ofte 1 To obtai 1 α) two-sided CI [L), U)], we ivert the acceptace regio of a level α test for H 0 : θ θ 0 vs H 1 : θ θ 0 2 To obtai a lower-bouded CI [L), ), the we ivert the acceptace regio of a test for H 0 : θ θ 0 vs H 1 : θ > θ 0, where Ω θ : θ θ 0 } 3 To obtai a upper-bouded CI, U)], the we ivert the acceptace regio of a test for H 0 : θ θ 0 vs H 1 : θ < θ 0, where Ω θ : θ θ 0 } Problem iid i N µ, σ 2 ) where both parameters are ukow 1 Fid 1 α two-sided CI for µ 2 Fid 1 α upper boud for µ Hyu Mi Kag Biostatistics 602 - Lecture 23 April 11th, 2013 17 / 29 Hyu Mi Kag Biostatistics 602 - Lecture 23 April 11th, 2013 18 / 29 - two-sided CI - Solutio - upper-bouded CI - Solutio H 0 : µ µ 0 vs H 1 : µ µ 0 The LRT test rejects if ad oly if µ 0 s / > t 1,α/2 The acceptace regio is Aµ 0 ) x : } x µ 0 s x / t 1,α/2 The cofidece set is } Cx) µ : x µ s x / t 1,α/2 µ : t 1,α/2 x µ } s x / t 1,α/2 µ : x s x t 1,α/2 µ x + s } x t 1,α/2 The CI is, U)] We eed to ivert a testig procedure for H 0 : µ µ 0 vs H 1 : µ < µ 0 LRT statistic is Ω 0 µ, σ 2 ) : µ µ 0, σ 2 > 0} Ω µ, σ 2 ) : µ µ 0, σ 2 > 0} λx) Lˆµ 0, ˆσ 2 0 x) Lˆµ, ˆσ 2 x) where ˆµ 0, ˆσ 2 0 ) is the MLE restricted to Ω 0, adˆµ, ˆσ 2 ) is the MLE restricted to Ω, ad Withi Ω 0, ˆµ 0 µ 0, ad ˆσ 2 0 i1 i µ 0 ) 2 Hyu Mi Kag Biostatistics 602 - Lecture 23 April 11th, 2013 19 / 29 Hyu Mi Kag Biostatistics 602 - Lecture 23 April 11th, 2013 20 / 29
- upper bouded CI - Solutio cot d) - upper bouded CI - Solutio cot d) Withi Ω, the MLE is ˆµ ˆσ 2 i1 i ) 2 if µ 0 ˆµ µ 0 ˆσ 2 i1 i µ 0 ) 2 if > µ 0 λx) 1 if > µ 0 1 2πσ 2 1 2πσ 2 ) exp ) exp i1 i µ 0 ) 2 2ˆσ 0 2 i1 i ) 2 2ˆσ 2 0 1 if > µ 0 ) 1 s2 2 if µ 0 1 s2 + µ 0) 2 } } if µ 0 For 0 < c < 1, LRT test rejects H 0 if µ 0 ad 1 1 s2 ) 2 s2 + µ 0) 2 1 1 + µ 0) 2 s 2 x 2 µ 0 ) 2 s 2 < c < c > c µ 0 s / > c Hyu Mi Kag Biostatistics 602 - Lecture 23 April 11th, 2013 21 / 29 Hyu Mi Kag Biostatistics 602 - Lecture 23 April 11th, 2013 22 / 29 - upper bouded CI - Solutio cot d) - upper bouded CI - Solutio cot d) c is chose to satisfy α Prreject H 0 µ 0 ) ) µ0 Pr s / > c ) µ0 Pr s / < c PrT 1 < c ) 1 α PrT 1 > c ) c t 1,1 α t 1,α Therefore, LRT level α test reject H 0 if µ 0 s / < t 1,α Acceptace regio is Aµ 0 ) Ivertig the above to get CI x : µ } 0 s / t 1,α C) µ : Aµ)} µ : µ } s / t 1,α µ : µ s } t 1,α µ : µ + s } t 1,α, + s ] t 1,α Hyu Mi Kag Biostatistics 602 - Lecture 23 April 11th, 2013 23 / 29 Hyu Mi Kag Biostatistics 602 - Lecture 23 April 11th, 2013 24 / 29
- lower bouded CI - solutio LRT level α test reject H 0 if ad oly if Acceptace regio is Aµ 0 ) µ 0 s / > t 1,α x : µ } 0 s / t 1,α Cofidece iterval is C) µ : Aµ)} µ : µ } s / t 1,α µ : µ s } t 1,α [ s ) t 1,α, Problem 1,, are iid samples from a distributio with mea µ ad fiite variace σ 2 Costruct asymptotic 1 α) two-sided iterval for µ Solutio Let be a method of momet estimator for µ By law of large umber, is cosistet for ) µ, ad by cetral limit theorem, AN µ, σ2 Hyu Mi Kag Biostatistics 602 - Lecture 23 April 11th, 2013 25 / 29 Hyu Mi Kag Biostatistics 602 - Lecture 23 April 11th, 2013 26 / 29 cot d) cot d) Cosider testig H 0 : µ µ 0 vs H 1 : µ µ 0 The Wald statistic Z µ 0 S for a cosistet estimator of σ/ From previous lectures, we kow that 1 i ) 2 P σ 2 1 i1 i1 i ) 2 P σ 1) The Wald level α test µ 0 ) i1 i ) 2 1 > Hyu Mi Kag Biostatistics 602 - Lecture 23 April 11th, 2013 27 / 29 The acceptace regio is 1 α) CI is Aµ 0 ) x : x µ 0 ) i1 x i x) 2 1 Cx) µ : x Aµ)} µ : x µ) i1 x i x) 2 1 [ ] x 1 i1 x i x) 2 1, x + 1 i1 x i x) 2 1 Hyu Mi Kag Biostatistics 602 - Lecture 23 April 11th, 2013 28 / 29
Today Next Lectures Reviews ad Problems every lecture) E-M algorithm No-iformative priors Bayesia Tests Hyu Mi Kag Biostatistics 602 - Lecture 23 April 11th, 2013 29 / 29