Composite Hypotheses March 25-27, 28 For a composite hypothesis, the parameter space Θ is divided ito two disjoit regios, Θ ad Θ 1. The test is writte H : Θ versus H 1 : Θ 1 with H is called the ull hypothesis ad H 1 the alterative hypothesis. Cosequetly, the actio space A has two poits ad 1 ad the decisio or test fuctio d : data {, 1}. Type I ad type II errors have the same meaig for a composite hypotheses as it does with a simple hypothesis. 1 Power Power is ow a fuctio π d () = P {d(x) = 1}. that gives the probability of rejectig the ull hypothesis for a give value of the parameter. Cosequetly, the ideal test fuctio has π d () = for all Θ ad π d () = 1 for all Θ 1 ad the test fuctio yields the correct decisio with probability 1. I reality, icorrect decisios are made. For Θ, ad for Θ 1, π d () is the probability of makig a type I error 1 π d () is the probability of makig a type II error. The goal is to make the chace for error small. The traditioal method is the same as that employed i the Neyma-Pearso lemma. Fix a level α, defied to be α = sup{π d (); Θ } ad look for a decisio fuctio that make the power fuctio large for Θ 1 1
Example 1. For X 1, X 2,..., X idepedet U(, ) radom variables, Θ [, ). Take H : L R versus H 1 : < L or > R. We will try to base a test based o the sufficiet statistic X () = max 1 i X i ad reject H if X () > R ad too much smaller that L, say. The, the power fuctio We compute the power fuctio i three cases. Case 1.. ad therefore π d () = 1. Case 2. < R. ad therefore π d () = (/). Case 3. > R. π d () = P {X () } + P {X () R } P {X () } = 1 ad P {X () R } = P {X () } = P {X () } = ad therefore π d () = (/) + 1 ( R /). ( ) ad P {X () R } = ( ) ad P {X () R } = 1 ( ) R The size of the test α = sup {( ) } ( ) ; L R =. L To achieve this level, choose = L α. Example 2. Let X 1, X 2,..., X be idepedet N(µ, σ 2 ) radom variables with σ 2 ad µ ukow. For the composite hypothesis for the oe-sided test H : µ µ versus H 1 : µ > µ. We use the test statistic from the likelihood ratio test ad reject H if X is too large. The power fuctio To obtai level α, we wat α = π d (µ ) the π d (µ) = P { X k(µ )}. Z = X µ σ/ = z α. 2
pi.2.4.6.8 1...5 1. 1.5 2. Figure 1: Power fuctio for the oe-sided test above mu where Φ(z α ) = 1 α ad Φ is the distributio fuctio for the stadard ormal, thus k(µ ) = µ +(σ/ )z α. The power fuctio for this test π d (µ) = P µ { X σ z α + µ } = P µ { X µ σ z α (µ µ )} { X µ = P µ σ/ z α µ µ } ( σ/ = 1 Φ z α µ µ ) σ/ We plot the power fuctio with µ =, σ = 1, ad = 25, > zalpha=qorm(.95) > mu=(:2)/1 > z=zalpha-5*mu > pi=1-porm(z) > plot(mu,pi,type="l") For a two-sided test H : µ = µ versus H 1 : µ µ. We reject H if X µ is too large. Agai, to obtai level α, Z = X µ σ/ = z α/2. 3
pi.2.4.6.8 1. 2 1 1 2 mu Figure 2: Power fuctio for the two-sided test above The power fuctio for the test π d (µ) = 1 P µ { z α/2 X µ ( = 1 Φ z α/2 µ µ σ/ σ/ z α/2 ) + Φ } = 1 P µ { z α/2 µ µ ( z α/2 µ µ σ/ > zalpha = qorm(.975) > mu=(-2:2)/1 > pi = 1 - porm(zalpha-5*mu)+porm(-zalpha-5*mu) > plot(mu,pi,type="l") ) σ/ X µ σ/ z α/2 µ µ } σ/ 2 The p-value The report of reject the ull hypothesis does ot describe the stregth of the evidece because it fails to give us the sese of whether or ot a small chage i the values i the data could have resulted i a differet decisio. Cosequetly, the commo method is ot to choose, i advace, a level α of the test ad the report reject or fail to reject, but rather to report the value of the test statistic ad to give all the values for α that would lead to the rejectio of H. For example, if the test is based o havig a test statistic S(X) exceed a level k, i.e., we have decisio 4
fuctio d k (X) = 1 if ad oly if S(X) k. ad if the value S(X) = k is observed, the the p-value equals I the oe-sided test above, if X = 1, the > pvalue = 1 - porm(5) > pvalue [1] 2.866516e-7 I this case, the p-value is 2.87 1 7. 3 Cofidece Sets sup{π dt (); Θ } = sup{p {S(X) k }; Θ }. Z = X µ σ/ = 1 1/ 25 = 5. Choose a umber γ betwee ad 1. From data X, suppose that we compute two statistics L(X) ad R(X) so that irrespective of the value of the parameter, P {L(X) < < R(X)} γ. If l = L(X) ad r = R(X) are the observed values based o the data X, the the iterval (l, r) is called a cofidece iterval for with cofidece coefficiet γ. This otio exteds the idea of a poit estimator ˆ by addig a otio cocerig how closely we ca estimate. We will show how a α test for the hypothesis H : = versus H 1 : geerates a γ = 1 α cofidece iterval. Let d deote the decisio fuctio for this test. Give the data X, let ω(x) deote those parameter values for which the test fails to reject this hypothesis. Thus, ad ω(x) if ad oly if d(x) =. P { ω(x)} = P {d(x) = } = 1 P {d(x) = 1} = 1 α = γ. Now let L(X) ad R(X) be the ed poits of the iterval ω(x). Example 3. I the example above, for the two-sided test based o ormal data H : µ = µ versus H 1 : µ µ d(x) = if ad oly if X µ σ/ < z α/2. X σ z α/2 µ X + σ ( z α/2 X ad ω(x) = X σ z α/2, X + σ ) z α/2. 5