Hypothesis Testing

Click here to load reader

  • date post

    04-Feb-2016
  • Category

    Documents

  • view

    21
  • download

    0

Embed Size (px)

description

Hypothesis Testing. Hypothesis Testing. Greene: App. C:892-897 Statistical Test: Divide parameter space ( Ω ) into two disjoint sets: Ω 0 , Ω 1 Ω 0 ∩ Ω 1 =  and Ω 0  Ω 1 = Ω - PowerPoint PPT Presentation

Transcript of Hypothesis Testing

  • Hypothesis Testing

  • Hypothesis TestingGreene: App. C:892-897

    Statistical Test: Divide parameter space () into two disjoint sets: 0, 1 0 1= and 0 1=

    Based on sample evidence does estimated parameter (*) and therefore the true parameter fall into one of these sets? We answer this question using a statistical test.

  • Hypothesis Testing{y1,y2,,yT} is a random sample providing information on the (K x 1) parameter vector, where

    R()=[R1(), R2(),RJ()] is a (J x 1) vector of restrictions (e.g., hypotheses) on K parameters, .

    For this class: R()=0, 0 = {| , R()=0} 1 = {| , R()0}

  • Hypothesis TestingNull Hypothesis: 0 (H0)

    Alternate Hypothesis: 1 (H1)

    Hypothesis Testing: Divide sample space into two portions pertaining to H0 and H1 The region where we reject H0 referred to as critical region of the test

  • Hypothesis TestingTest of whether * 0 or 1 (* an est. of ) based on a test statistic w/known dist. under H0 and some other dist. if H1 true Transform * into test statistic Critical region of hyp. test is the set of values for which H0 would be rejected (e.g., values of test statistic unlikely to occur if H0 is true) If test statistic falls into the critical regionevidence that H0 not true

  • Hypothesis Testing General Test ProcedureDevelop a null hypothesis (Ho) that will be maintained until evidence to the contraryDevelop an alternate hypothesis (H1) that will be adopted if H0 not acceptedEstimate appropriate test statistic Identify desired critical regionCompare calculated test statistic to critical regionReject H0 if test statistic in critical region

  • Hypothesis TestingDefinition of Rejection Region P(cvL cvU)=1-Pr(Type I Error) cvLcvUDo Not Reject H0Reject H0Reject H0f(|H0)Prob. rejecting H0 even though true

    Chart1

    0.0044318

    0.0059525

    0.0079154

    0.0104209

    0.0135829

    0.0175283

    0.0223945

    0.028327

    0.0354745

    0.0439836

    0.0539909

    0.0656158

    0.0789501

    0.094049

    0.1109208

    0.1295176

    0.1497275

    0.1713686

    0.1941861

    0.2178522

    0.2419707

    0.2660853

    0.2896916

    0.3122539

    0.3332246

    0.3520653

    0.3682701

    0.3813878

    0.3910427

    0.3969525

    0.3989423

    0.3969525

    0.3910427

    0.3813878

    0.3682701

    0.3520653

    0.3332246

    0.3122539

    0.2896916

    0.2660853

    0.2419707

    0.2178522

    0.1941861

    0.1713686

    0.1497275

    0.1295176

    0.1109208

    0.094049

    0.0789501

    0.0656158

    0.0539909

    0.0439836

    0.0354745

    0.028327

    0.0223945

    0.0175283

    0.0135829

    0.0104209

    0.0079154

    0.0059525

    0.0044318

    Sheet1

    Plus 1

    -3-20.0044318

    -2.9-1.90.0059525

    -2.8-1.80.0079154

    -2.7-1.70.0104209

    -2.6-1.60.0135829

    -2.5-1.50.0175283

    -2.4-1.40.0223945

    -2.3-1.30.028327

    -2.2-1.20.0354745

    -2.1-1.10.0439836

    -2-10.0539909

    -1.9-0.90.0656158

    -1.8-0.80.0789501

    -1.7-0.70.094049

    -1.6-0.60.1109208

    -1.5-0.50.1295176

    -1.4-0.40.1497275

    -1.3-0.30.1713686

    -1.2-0.20.1941861

    -1.1-0.10.2178522

    -100.2419707

    -0.90.10.2660853

    -0.80.20.2896916

    -0.70.30.3122539

    -0.60.40.3332246

    -0.50.50.3520653

    -0.40.60.3682701

    -0.30.70.3813878

    -0.20.80.3910427

    -0.10.90.3969525

    010.3989423

    0.11.10.3969525

    0.21.20.3910427

    0.31.30.3813878

    0.41.40.3682701

    0.51.50.3520653

    0.61.60.3332246

    0.71.70.3122539

    0.81.80.2896916

    0.91.90.2660853

    120.2419707

    1.12.10.2178522

    1.22.20.1941861

    1.32.30.1713686

    1.42.40.1497275

    1.52.50.1295176

    1.62.60.1109208

    1.72.70.094049

    1.82.80.0789501

    1.92.90.0656158

    230.0539909

    2.13.10.0439836

    2.23.20.0354745

    2.33.30.028327

    2.43.40.0223945

    2.53.50.0175283

    2.63.60.0135829

    2.73.70.0104209

    2.83.80.0079154

    2.93.90.0059525

    340.0044318

    Sheet1

    0.0044318

    0.0059525

    0.0079154

    0.0104209

    0.0135829

    0.0175283

    0.0223945

    0.028327

    0.0354745

    0.0439836

    0.0539909

    0.0656158

    0.0789501

    0.094049

    0.1109208

    0.1295176

    0.1497275

    0.1713686

    0.1941861

    0.2178522

    0.2419707

    0.2660853

    0.2896916

    0.3122539

    0.3332246

    0.3520653

    0.3682701

    0.3813878

    0.3910427

    0.3969525

    0.3989423

    0.3969525

    0.3910427

    0.3813878

    0.3682701

    0.3520653

    0.3332246

    0.3122539

    0.2896916

    0.2660853

    0.2419707

    0.2178522

    0.1941861

    0.1713686

    0.1497275

    0.1295176

    0.1109208

    0.094049

    0.0789501

    0.0656158

    0.0539909

    0.0439836

    0.0354745

    0.028327

    0.0223945

    0.0175283

    0.0135829

    0.0104209

    0.0079154

    0.0059525

    0.0044318

    Sheet2

    Sheet3

  • Hypothesis Testing Defining the Critical RegionSelect a region that identifies parameter values that are unlikely to occur if the null hypothesis is trueValue of Type I ErrorPr (Type I Error) = Pr{Rejecting H0|H0 true}Pr (Type II Error) = Pr{Accepting H0|H1 true}Never know with certainty whether you are correctpos. Pr(Type I Error) Example of Standard Normal

  • Hypothesis TestingStandard Normal Distribution P(-1.96 z 1.96)=0.95 = 0.05= P(Type I Error)0.0250.025

    Chart1

    0.0044318

    0.0059525

    0.0079154

    0.0104209

    0.0135829

    0.0175283

    0.0223945

    0.028327

    0.0354745

    0.0439836

    0.0539909

    0.0656158

    0.0789501

    0.094049

    0.1109208

    0.1295176

    0.1497275

    0.1713686

    0.1941861

    0.2178522

    0.2419707

    0.2660853

    0.2896916

    0.3122539

    0.3332246

    0.3520653

    0.3682701

    0.3813878

    0.3910427

    0.3969525

    0.3989423

    0.3969525

    0.3910427

    0.3813878

    0.3682701

    0.3520653

    0.3332246

    0.3122539

    0.2896916

    0.2660853

    0.2419707

    0.2178522

    0.1941861

    0.1713686

    0.1497275

    0.1295176

    0.1109208

    0.094049

    0.0789501

    0.0656158

    0.0539909

    0.0439836

    0.0354745

    0.028327

    0.0223945

    0.0175283

    0.0135829

    0.0104209

    0.0079154

    0.0059525

    0.0044318

    Sheet1

    Plus 1

    -3-20.0044318

    -2.9-1.90.0059525

    -2.8-1.80.0079154

    -2.7-1.70.0104209

    -2.6-1.60.0135829

    -2.5-1.50.0175283

    -2.4-1.40.0223945

    -2.3-1.30.028327

    -2.2-1.20.0354745

    -2.1-1.10.0439836

    -2-10.0539909

    -1.9-0.90.0656158

    -1.8-0.80.0789501

    -1.7-0.70.094049

    -1.6-0.60.1109208

    -1.5-0.50.1295176

    -1.4-0.40.1497275

    -1.3-0.30.1713686

    -1.2-0.20.1941861

    -1.1-0.10.2178522

    -100.2419707

    -0.90.10.2660853

    -0.80.20.2896916

    -0.70.30.3122539

    -0.60.40.3332246

    -0.50.50.3520653

    -0.40.60.3682701

    -0.30.70.3813878

    -0.20.80.3910427

    -0.10.90.3969525

    010.3989423

    0.11.10.3969525

    0.21.20.3910427

    0.31.30.3813878

    0.41.40.3682701

    0.51.50.3520653

    0.61.60.3332246

    0.71.70.3122539

    0.81.80.2896916

    0.91.90.2660853

    120.2419707

    1.12.10.2178522

    1.22.20.1941861

    1.32.30.1713686

    1.42.40.1497275

    1.52.50.1295176

    1.62.60.1109208

    1.72.70.094049

    1.82.80.0789501

    1.92.90.0656158

    230.0539909

    2.13.10.0439836

    2.23.20.0354745

    2.33.30.028327

    2.43.40.0223945

    2.53.50.0175283

    2.63.60.0135829

    2.73.70.0104209

    2.83.80.0079154

    2.93.90.0059525

    340.0044318

    Sheet1

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    Sheet2

    Sheet3

  • Hypothesis Testing Example of mean testingAssume RV is normally distributed: yt~N(b,s2)H0: b = 1 H1: b 1What is distribution of mean under H0?

    Assume s2=10, T=10

  • Hypothesis Testing~N(1,1) if H0 True P(-0.96 2.96)=0.95 P(-1.96 z 1.96)=0.95 (e.g, transform dist. of into RV with std. normal dist. = 0.050.0250.025

    Chart1

    0.0044318

    0.0059525

    0.0079154

    0.0104209

    0.0135829

    0.0175283

    0.0223945

    0.028327

    0.0354745

    0.0439836

    0.0539909

    0.0656158

    0.0789501

    0.094049

    0.1109208

    0.1295176

    0.1497275

    0.1713686

    0.1941861

    0.2178522

    0.2419707

    0.2660853

    0.2896916

    0.3122539

    0.3332246

    0.3520653

    0.3682701

    0.3813878

    0.3910427

    0.3969525

    0.3989423

    0.3969525

    0.3910427

    0.3813878

    0.3682701

    0.3520653

    0.3332246

    0.3122539

    0.2896916

    0.2660853

    0.2419707

    0.2178522

    0.1941861

    0.1713686

    0.1497275

    0.1295176

    0.1109208

    0.094049

    0.0789501

    0.0656158

    0.0539909

    0.0439836

    0.0354745

    0.028327

    0.0223945

    0.0175283

    0.0135829

    0.0104209

    0.0079154

    0.0059525

    0.0044318

    Sheet1

    Plus 1

    -3-20.0044318

    -2.9-1.90.0059525

    -2.8-1.80.0079154

    -2.7-1.70.0104209

    -2.6-1.60.0135829

    -2.5-1.50.0175283

    -2.4-1.40.0223945

    -2.3-1.30.028327

    -2.2-1.20.0354745

    -2.1-1.10.0439836

    -2-10.0539909

    -1.9-0.90.0656158

    -1.8-0.80.0789501

    -1.7-0.70.094049

    -1.6-0.60.1109208

    -1.5-0.50.1295176

    -1.4-0.40.1497275

    -1.3-0.30.1713686

    -1.2-0.20.1941861

    -1.1-0.10.2178522

    -100.2419707

    -0.90.10.2660853

    -0.80.20.2896916

    -0.70.30.3122539

    -0.60.40.3332246

    -0.50.50.3520653

    -0.40.60.3682701

    -0.30.70.3813878

    -0.20.80.3910427

    -0.10.90.3969525

    010.3989423

    0.11.10.3969525

    0.21.20.3910427

    0.31.30.3813878

    0.41.40.3682701

    0.51.50.3520653

    0.61.60.3332246

    0.71.70.3122539

    0.81.80.2896916

    0.91.90.2660853

    120.2419707

    1.12.10.2178522

    1.22.20.1941861

    1.32.30.1713686

    1.42.40.1497275

    1.52.50.1295176

    1.62.60.1109208

    1.72.70.094049

    1.82.80.0789501

    1.92.90.0656158

    230.0539909

    2.13.10.0439836

    2.23.20.0354745

    2.33.30.028327

    2.43.40.0223945

    2.53.50.0175283

    2.63.60.0135829

    2.73.70.0104209

    2.83.80.0079154

    2.93.90.0059525

    340.0044318

    Sheet1

    Sheet2

    Sheet3

  • Hypothesis TestingStandard Normal Distribution

    P(-1.96 z 1.96)=0.95

    = 0.05= P(Type I Error)0.0250.025

    Chart1

    0.0044318

    0.0059525

    0.0079154

    0.0104209

    0.0135829

    0.0175283

    0.0223945

    0.028327

    0.0354745

    0.0439836

    0.0539909

    0.0656158

    0.0789501

    0.094049

    0.1109208

    0.1295176

    0.1497275

    0.1713686

    0.1941861

    0.2178522

    0.2419707

    0.2660853

    0.2896916

    0.3122539

    0.3332246

    0.3520653

    0.3682701

    0.3813878

    0.3910427

    0.3969525

    0.3989423

    0.3969525

    0.3910427

    0.3813878

    0.3682701

    0.3520653

    0.3332246

    0.3122539

    0.2896916

    0.2660853

    0.2419707

    0.2178522

    0.1941861

    0.1713686

    0.1497275

    0.1295176

    0.1109208

    0.094049

    0.0789501

    0.0656158

    0.0539909

    0.0439836

    0.0354745

    0.028327

    0.0223945

    0.0175283

    0.0135829

    0.0104209

    0.0079154

    0.0059525

    0.0044318

    Sheet1

    Plus 1

    -3-20.0044318

    -2.9-1.90.0059525

    -2.8-1.80.0079154

    -2.7-1.70.0104209

    -2.6-1.60.0135829

    -2.5-1.50.0175283

    -2.4-1.40.0223945

    -2.3-1.30.028327

    -2.2-1.20.0354745

    -2.1-1.10.0439836

    -2-10.0539909

    -1.9-0.90.0656158

    -1.8-0.80.0789501

    -1.7-0.70.094049

    -1.6-0.60.1109208

    -1.5-0.50.1295176

    -1.4-0.40.1497275

    -1.3-0.30.1713686

    -1.2-0.20.1941861

    -1.1-0.10.2178522

    -100.2419707

    -0.90.10.2660853

    -0.80.20.2896916

    -0.70.30.3122539

    -0.60.40.3332246

    -0.50.50.3520653

    -0.40.60.3682701

    -0.30.70.3813878

    -0.20.80.3910427

    -0.10.90.3969525

    010.3989423

    0.11.10.3969525

    0.21.20.3910427

    0.31.30.3813878

    0.41.40.3682701

    0.51.50.3520653

    0.61.60.3332246

    0.71.70.3122539

    0.81.80.2896916

    0.91.90.2660853

    120.2419707

    1.12.10.2178522

    1.22.20.1941861

    1.32.30.1713686

    1.42.40.1497275

    1.52.50.1295176

    1.62.60.1109208

    1.72.70.094049

    1.82.80.0789501

    1.92.90.0656158

    230.0539909

    2.13.10.0439836

    2.23.20.0354745

    2.33.30.028327

    2.43.40.0223945

    2.53.50.0175283

    2.63.60.0135829

    2.73.70.0104209

    2.83.80.0079154

    2.93.90.0059525

    340.0044318

    Sheet1

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    Sheet2

    Sheet3

  • Hypothesis Testing

  • Hypothesis Testing Again, this assumes we know

    P(-t(T-1),/2 t t(T-1),/2)=1-

  • Hypothesis Testing

  • Hypothesis TestingLikelihood Ratio Test:

  • Hypothesis TestingLikelihood Ratio Test: Compare value of likelihood function, l(), under the null hypothesis, l(0)] vs. value with unrestricted parameter choice [l*()] Null hyp. could reduce set of parameter values. What does this do to the max. likelihood function value? If the two resulting max. LF values are close enoughcan not reject H0

  • Hypothesis TestingIs this difference in likelihood function values large?

    Likelihood ratio ():

    is a random variable since it depends on yis What are possible values of ?

  • Hypothesis TestingLikelihood Ratio Principle Null hypo. defining 0 is rejected if > 1 (Why 1?) Need to establish critical level of , C that is unlikely to occur under H0 (e.g., is 1.1 far enough away from 1.0)? Reject H0 if estimated value of is greater than C = 1Null hypo. does not sign. reduce parameter space H0 not rejected Result conditional on sample

  • Hypothesis TestingGeneral Likelihood Ratio Test ProcedureChoose probability of Type I error, a (e.g., test sign. level) Given a, find value of lC that satisfies: P(l > lC | H0 is true)Evaluate test statistic based on sample information

    Reject (fail to reject) null hypothesis if l > lC (

  • Hypothesis TestingLR test of mean of Normal Distribution () with s2 not known

    This implies the following test procedures:F-Testt-Test

    LR test of hypothesized value of s2 (on class website)

  • Asymptotic Tests Previous tests based on finite samples Use asymptotic tests when appropriate finite sample test statistic is unavailable Three tests commonly used:Asymptotic Likelihood RatioWald TestLagrangian Multiplier (Score) Test Greene p.484-492 Buse article (on website)

  • Asymptotic Tests Asymptotic Likelihood Ratio Test y1,,yt are iid, E(yt)=, var(yt)= (*-)T1/2 converge in dist to N(0,) As T, use normal pdf to generate LF

    l*()/l(0) or l(l)/l(0) l*() = Max[l(|y1,,yT):] l(0) = Max[l(|y1,,yT):0]Restricted LF given H0

  • Asymptotic Tests Asymptotic Likelihood Ratio (LR) LR 2ln() = 2[L*()-L(0)] L() = lnl() LR~J asymptotically where J is the number of joint null hypothesis (restrictions)

  • Asymptotic TestsAsymptotic Likelihood Ratio Test0lL(0)L(l)L().5LRLR 2ln(l)=2[L(1)-L(0)]LR~c2J asymptotically (p.851 Greene)Evaluated L() at both 1 and 0L Log-LikelihoodFunctionl generates unrestricted L() max L(0) value obtained under H0

  • Greene defines as: -2[L(0)-L(1)] Result is the same Buse, p.153, Greene p.484-486

    Given H0 true, LR has an approximate2 dist. with J DF (the number of joint hypotheses)Reject H0when LR > c where c is the predefined critical value of the dist. given J DF.Asymptotic TestsAsymptotic Likelihood Ratio Test

  • Suppose consists of 1 element Have 2 samples generating different estimates of the LF with same value of that max. the LF

    0.5LR will depend on Distance between l and 0(+) The curvature of the LF (+) C() represents LF curvatureDont forget the signAsymptotic TestsImpact of Curvature on LRShows Need For Wald TestInformationMatrix

  • Asymptotic TestsImpact of Curvature on LRShows Need For Wald Test0lL(0)L(l)L().5LR0L1(0).5LR1L1()H0: =0 W=(l-0)2 C(|=l)W=(l-0)2 I(|=l) W~c2J asymptoticallyNote: Evaluated at lMax at same pointTwo samplesL

  • Asymptotic TestsImpact of Curvature on LRShows Need For Wald TestThe above weights the squared distance, (l - 0)2 by the curvature of the LF instead of using the differences as in LR test Two sets of data may produce the same (l - 0)2 value but give diff. LR values because of curvature The more curvature, the more likely H0 not true (e.g., test statistic is larger)Greene, p. 486-487 gives alternative motivation (careful of notation)Buse, 153-154

  • Asymptotic TestsImpact of Curvature on LRShows Need For Wald TestExtending this to J simultaneous hypotheses and k parametersNote that R(), d() and I() evaluated at lWhen Rj(q) of the form: j=j0,j=1,k d()=Ik, W=(l-0)2 I(|=l)

  • Asymptotic TestsBased on the curvature of the log-likelihood function (L) At unrestricted max:Summary of Lagrange Multiplier (Score) TestScore of LikelihoodFunction

  • Asymptotic TestsSummary of Lagrange Multiplier (Score) Test How much does S() depart from 0 when evaluated at the hypothesized value? Weight squared slope by curvature The greater the curvature, the closer 0will be to the max. value Weight by C()-1smaller test statistic the more curvature Small values of test statistic, LM, will be generated if the value of L(0) is close to the max. value, L(l), e.g. slope closer to 0

  • Asymptotic TestsSummary of Lagrange Multiplier (Score) Test0L(0)LM~c2J asympt.S(0)LBLAS(0)=dL/d|=0LM= S(0)2 I(0)-1I(0) = -d2L/d2|=0S()=0S() dL/dTwo samplesL

  • Asymptotic TestsSummary of Lagrange Multiplier (Score) Test Small values of test statistic, LM, should be generated when L() has greater curvature when evaluated at 0 The test statistic is smaller when 0 nearer the value that generates maximum LF value (e.g. S(0) is closer to zero)

  • Asymptotic TestsSummary of Lagrange Multiplier (Score) TestExtending this to multiple parameters

    Buse, pp. 154-155

    Greene, pp.489-490

  • Asymptotic Tests Summary LR, W, LM differ in type of information required LR requires both restricted and unrestricted parameter estimates W requires only unrestricted estimates LM requires only restricted estimates If log-likelihood quadratic with respect to q, the 3 tests result in same numerical values for large samples

  • Asymptotic Tests SummaryAll test statistics distributed asym. c2 with J d.f. (number of joint hypotheses) In finite samples W > LR > LMThis implies W more conservativeExample: With s2 known, a test of parameter value (e.g., b = b0) results in:One case where LR=W=LM in finite samples

  • Asymptotic Tests SummaryExample of asymptotic tests

    Buse (pp.155-156) same example but assumes =1