Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Confidence Intervals and Likelihood Ratio Tests, Study notes of Economics

An explanation of confidence intervals and likelihood ratio tests using normal and chi-square distributions, with examples and formulas. It includes confidence intervals for the mean with known and unknown variance, as well as the variance, and likelihood ratio tests for the mean. It also covers two-sample confidence intervals for the variances.

Typology: Study notes

Pre 2010

Uploaded on 09/02/2009

koofers-user-s1c
koofers-user-s1c 🇺🇸

10 documents

1 / 65

Toggle sidebar

Related documents


Partial preview of the text

Download Confidence Intervals and Likelihood Ratio Tests and more Study notes Economics in PDF only on Docsity! Hypothesis Testing, Econ 500 Helle Bunzel Fall 2006 Helle Bunzel () Hypothesis Testing Fall 2006 1 / 66 The Basic Idea of Interval Estimates An interval rather than a point estimate is often of interest. Suppose we have an estimator β̂ and we have determined the distribution, …nite sample or asymptotic. We can use our knowledge about the distribution of β̂ for testing. General principle: I want to know (have a hypothesis): Is βi = 1? Suppose we know β̂i  N βi , σ 2 . Helle Bunzel () Hypothesis Testing Fall 2006 2 / 66 The Basic Idea of Interval Estimates Con…dence intervals: Shade 2.5% of the area under the density function on each side of the mean: (We’re de…ning ”close to”and ”far away from”) Now, there is a 95% chance of getting a draw in-between βLOWER and βUPPER . (Repeated data set) Helle Bunzel () Hypothesis Testing Fall 2006 5 / 66 The Basic Idea of Interval Estimates We’d like to be able to calculate this interval. Why can’t we? We don’t know β and we don’t know σ2. Assume for now that we know σ2. Then: Estimate βi with β̂i . Assuming that β̂i is the mean of the distribution, we can calculate the intervals. It is simply the 2.5 and the 97.5 percentiles of the distribution N  β̂i , σ 2  This interval we call the con…dence interval. The problem is that if β̂i is very di¤erent from βi , it doesn’t say much, but it is the best we can do Helle Bunzel () Hypothesis Testing Fall 2006 6 / 66 The Basic Idea of Interval Estimates Here the true value is not even in the con…dence interval. Helle Bunzel () Hypothesis Testing Fall 2006 7 / 66 Hypothesis Testing This does not hold water in a strict mathematical sense. Same problem as with the con…dence intervals. Note: An N 1, σ2  COULD generate β̂i = 9825 So: we reject the hypothesis if β̂i /2 [βLOWER , βUPPER ] . Helle Bunzel () Hypothesis Testing Fall 2006 10 / 66 Standardized Normal Variables and Con…dence Intervals for the Mean with Known Variance If X is a normal random variable with mean µ and variance σ2 then Z =  X µ σ   N 0, σ2  We estimate µ by µ̂ = X̄ . This then implies µ̂ = X̄ = 1 n n ∑ i=1 Xi = X̄  N  µ, σ2 n  (1) z = X̄ µh σp n i  N(0, 1) Helle Bunzel () Hypothesis Testing Fall 2006 11 / 66 Standardized Normal Variables and Con…dence Intervals for the Mean with Known Variance De…ne γ1 as the upper α/2 percent critical value of a standard normal variable. then 1 α = Z γ1 γ1 1p 2π e 1 2 z 2 dz = F (γ1) F (γ1) = Pr " γ1  x̄ µ σp n  γ1 # = Pr  γ1 σp n  x̄ µ  γ1 σp n  = Pr  γ1 σp n  x̄ + µ  γ1 σp n  = Pr  x̄ γ1 σp n  µ  x̄ + γ1 σp n  Helle Bunzel () Hypothesis Testing Fall 2006 12 / 66 Con…dence Intervals for the Mean with Known Variance Example Then 1 α = Pr " 6000 p 600 000p 12 (1.96)  µc  6000+ p 600 000p 12 (1.96) # = Pr [6000 (223.607)(1.96)  µc  6000+ (223.607)(1.96)] = Pr [5561.73  µc  6438.27] Helle Bunzel () Hypothesis Testing Fall 2006 15 / 66 Con…dence Intervals for the Mean with Unknown Variance Recall that the t random variable is de…ned as t = zq χ2(ν) ν where: z is a standard normal χ2(ν) is a χ2 random variable with ν degrees of freedom z and χ2(ν) are independent. Also recall that if Xi  N(µ, σ2) then n ∑ i=1  Xi µ σ 2  χ2(n) and n ∑ i=1  Xi X̄ σ 2  χ2(n 1) Helle Bunzel () Hypothesis Testing Fall 2006 16 / 66 Con…dence Intervals for the Mean with Unknown Variance If X  N(β, σ2) and X̄ = µ̂, then we would have n ∑ i=1  Xi µ̂ σ 2  χ2(n 1) Now …nd the distribution of S2: S2 = 1 n 1 n ∑ i=1 (Xi X̄ )2 = σ2 n 1 n ∑ i=1  Xi X̄ σ 2 So (n 1)S2 σ2 = n ∑ i=1  Xi X̄ σ 2  χ2(n 1) Helle Bunzel () Hypothesis Testing Fall 2006 17 / 66 Con…dence Intervals for the Mean with Unknown Variance This is the (1 α)(100%) con…dence interval for µ: Helle Bunzel () Hypothesis Testing Fall 2006 20 / 66 Con…dence Intervals for the Mean with Unknown Variance Example Consider the income data for carpenters and house painters. We can construct the 95% con…dence interval as follows: 1 α = Pr " 6000 p 565 000p 12 (2.201)  µc  6000+ p 565 000p 12 (2.201) # = Pr [6000 (216.99)(2.201)  µx  6000+ (216.99)(2.201)] = Pr [5522.4  µc  6477.6] So, for example, 7000 is not in the 95% con…dence interval for the mean. Helle Bunzel () Hypothesis Testing Fall 2006 21 / 66 Con…dence Intervals for the Variance Recall that (n 1)S2 σ2  χ2(n 1) Now if γ1 and γ2 are such that Pr χ2(ν)  γ1  = α 2 Pr χ2(ν)  γ2  = α 2 Helle Bunzel () Hypothesis Testing Fall 2006 22 / 66 Con…dence Intervals for the Variance Example Consider the income data for carpenters and house painters We can construct the 95% con…dence interval for the variance of the income of the painters as follows: 1 α = Pr " (np 1)S2p γ2  σ2p  (np 1)S2p γ1 # Recall the data: carpenters painters sample size nc = 12 np = 15 mean income c̄ = $6000 p̄ = $5400 estimated variance s2c = $565 000 s2p = $362 500 For a χ2 distribution with 14 degrees of freedom we obtain γ1 = 5.63 and γ2 = 26.12. Helle Bunzel () Hypothesis Testing Fall 2006 25 / 66 Con…dence Intervals for the Variance Example We then get 1 α = Pr  (14)(362 500) 26.12  σ2p  (14)(362 500) 5.63  = Pr  195 042  σ2p  901 421  Helle Bunzel () Hypothesis Testing Fall 2006 26 / 66 Two Samples and a Con…dence Interval for the Variances Suppose that: x11 , x 1 2 , . . . , x 1 n is a random sample from a distribution X1  N(µ1, σ21) x21 , x 2 2 , . . . , x 2 n is a random sample from a distribution X2  N(µ2, σ22) Helle Bunzel () Hypothesis Testing Fall 2006 27 / 66 Two Samples and a Con…dence Interval for the Variances We can now construct a con…dence interval as follows: 1 α = Pr  γ1  S21 σ 2 2 S22 σ 2 1  γ2  = Pr  S22 S21 γ1  σ22 σ21  S 2 2 S21 γ2  = Pr  S21 S22 1 γ1  σ 2 1 σ22  S 2 1 S22 1 γ2  = Pr  S21 S22 1 γ2  σ 2 1 σ22  S 2 1 S22 1 γ1   S21 S22 1 γ2  σ 2 1 σ22  S 2 1 S22 1 γ1  is then the (1 α) 100% con…dence interval for ratio of the variances. Helle Bunzel () Hypothesis Testing Fall 2006 30 / 66 Two Samples and a Con…dence Interval for the Variances Example Consider the income data for carpenters and house painters Write 1 α = Pr  S2c S2p 1 γ2  σ 2 c σ2p  S 2 c S2p 1 γ1  The upper critical level is F (11, 14, : 0.025) = 3.10. Since the tables don’t contain the lower tail, we obtain the critical value γ1(11, 14) as (1/γ1(14, 11). This critical value is given by 1 F (14, 11 : 0.025) = 1 3.36 = 0.297 Helle Bunzel () Hypothesis Testing Fall 2006 31 / 66 Two Samples and a Con…dence Interval for the Variances Example The con…dence interval is then given by 1 α = Pr  565 000 362 500 1 3.1  σ 2 c σ2p  565 000 362 500 1 .297  = Pr  .502 78  σ 2 c σ2p  5.248  Helle Bunzel () Hypothesis Testing Fall 2006 32 / 66 Hypothesis Testing De…nition A statistical hypothesis is a conjecture about the distribution of one or more random variables. De…nitions If a statistical hypothesis completely speci…es the distribution, it is referred to as a simple hypothesis; if not, it is referred to as a composite hypothesis. A simple hypothesis must specify not only the functional form of the underlying distribution, but also the values of all parameters. A statement regarding a parameter θ, such as θ 2 ω  Ω, is called a statistical hypothesis about θ and is usually referred to by H0. The decision on accepting or rejecting the hypothesis is based on the value of a test statistic, the distribution Pθ of which is known to belong to a class P = fPθ, , θ 2 Ωg. Helle Bunzel () Hypothesis Testing Fall 2006 35 / 66 Hypothesis Testing The distributions of P can then be classi…ed into those for which the hypothesis is true and those for which it is false. The resulting two mutually exclusive classes are denoted H and K (or H0 and H1), and the corresponding subsets of Ω by ΩH and ΩK Mathematically the hypothesis is equivalent to the statement that Pθ is an element of H. Helle Bunzel () Hypothesis Testing Fall 2006 36 / 66 Hypothesis Testing Alternative hypotheses To test statistical hypotheses it is necessary to formulate alternative hypotheses. The statement that θ 2 ωc is also a statistical hypothesis about θ, which is called the alternative to H0 This is usually denoted H1 or HA. Thus we have H0 : θ 2 ω H1 : θ 2 ωc If ω contains only one point, that is, ω = fθ0g, then H0 is called a simple hypothesis Otherwise it is called a composite hypothesis. Helle Bunzel () Hypothesis Testing Fall 2006 37 / 66 Hypothesis Testing Type I and Type II errors Suppose H0 : θ = θ0 HA : θ = θ1 The statistician can make two possible types of errors: If θ = θ0 and the test rejects θ = θ0 and concludes θ = θ1 then the error is of type I: Rejection of the null hypothesis when it is true is a type I error. If θ = θ1 and the test does not reject θ = θ0 but then the error is of type II. Non rejection of the null hypothesis when it is false is a type II error. Helle Bunzel () Hypothesis Testing Fall 2006 40 / 66 Hypothesis Testing Type I and Type II errors Example Suppose that the null hypothesis is that a person tested for HIV does not have the disease. Then a false positive is a Type I error while a false negative is a Type II error. We can summarize as follows where S1 is the region of rejection or critical region. Pθ fX 2 S1g = Probability of a Type I error if θ 2 ΩH Pθ fX 2 S1g = (1 - Probability of a Type II error) if θ 2 ΩK Pθ fX 2 S0g = Probability of a Type II error if θ 2 ΩK Helle Bunzel () Hypothesis Testing Fall 2006 41 / 66 Size, Power and Signi…cance Level Typically we bound to the probability of incorrectly rejecting H0 when it is true. Taking this bound as given, we minimize the probability of accepting H0 when it is false. In practice we select a number α between 0 and 1 such that: PθfX 2 S1g  α, for all θ 2 ΩH α is called the level of signi…cance. This says that the probability that X 2 S1 is less than α when θ is in the hypothesized part of its domain. Subject to the constraint, it is desired to either min θ2ΩK PθfX 2 S0g or max θ2ΩK PθfX 2 S1g Helle Bunzel () Hypothesis Testing Fall 2006 42 / 66 Size, Power and Signi…cance Level Helle Bunzel () Hypothesis Testing Fall 2006 45 / 66 Size, Power and Signi…cance Level So: α = PfType I errorg = PfReject H0 when H0 is trueg = PfReject H0jH0} and 1 β = PfType II errorg = PfFail to reject H0 when H1 is trueg = PfFail to reject H0jH1} and the power of the test is β(θjθ 2 ΩK ) = PfReject H0 j H1g The power of the test, is the probability that the test correctly rejects H0. A test with high power is preferred. Helle Bunzel () Hypothesis Testing Fall 2006 46 / 66 Size, Power and Signi…cance Level De…nition The p-value associated with a statistical test is the probability that we obtain the observed value of the test statistic or a value that is more extreme in the direction of the alternative hypothesis calculated when H0 is true. The p-value of a test can be reported instead of reject or not reject. If T is a test statistic, the p-value, or attained signi…cance level, is the smallest level of signi…cance α for which the observed data indicate that the null hypothesis should be rejected. To compute a p-value: compute the realized value of the test statistic …nd the probability that the random variable represented by the test statistic is larger than this realized value in the given sample. Helle Bunzel () Hypothesis Testing Fall 2006 47 / 66 Likelihood ratio tests Then the critical region becomes log [λ(x)] = log  L(θ̂0jx)  log  L(θ̂jx)  < log k ) log [λ(x)] = log  L(θ̂jx)  log  L(θ̂0jx)  > log k ) log [λ(x)] > c , c = log k > 0 because k  1 Asymptotically, 2 log [λ(x)] is distributed as a χ2 (υ) . υ is equal to the di¤erence in the dimension of Ω and ΩH This is often equal to the number of restrictions imposed by the null hypothesis. Helle Bunzel () Hypothesis Testing Fall 2006 50 / 66 Likelihood ratio tests Example Consider a random sample X1,X2, . . . ,X n from a N(µ, σ2) population. Consider testing H0 : µ = µ0 versus H1 : µ 6= µ0 . Assume that σ2 is known. We know that the MLE estimator of µ is X̄ . Thus the denominator of λ(x) is L(x̄ jx1, x2, . . . , xn). So the LRT statistic is λ(x) =  1p 2πσ n e 1 2σ2 ∑ni=1(xi µ0)2 1p 2πσ n e 1 2σ2 ∑ni=1(xi x̄ )2 = e 1 2σ2 ∑ni=1(xi µ0)2 e 1 2σ2 ∑ni=1(xi x̄ )2 = e 1 2σ2 (∑ n i=1(xi µ0)2 ∑ni=1(xi x̄ )2) Helle Bunzel () Hypothesis Testing Fall 2006 51 / 66 Likelihood ratio tests Example Rewrite ∑ni=1(xi µ0)2 as follows n ∑ i=1 (xi µ0)2 = n ∑ i=1 (xi x̄ + x̄ µ0)2 = n ∑ i=1 (xi x̄)2 + 2(x̄ µ0) n ∑ i=1 (xi x̄) + n(x̄ µ0)2 = n ∑ i=1 (xi x̄)2 + 2(x̄ µ0) (nx̄ nx̄) + n(x̄ µ0)2 = n ∑ i=1 (xi x̄)2 + n(x̄ µ0)2 Helle Bunzel () Hypothesis Testing Fall 2006 52 / 66 Likelihood ratio tests Example Consider a random sample X1,X2, . . . ,X n from a N(µ, σ2) population. Consider testing H0 : µ = µ0 versus H1 : µ 6= µ0 . Assume that σ2 is NOT known. Recall that the MLE estimator of µ is X̄ and the MLE estimator of σ2 is σ̂2 = 1 n n ∑ i=1 (xi x̄)2. The restricted estimators are µ̂0 = µ0 and σ̂20 = 1 n n ∑ i=1 (xi µ0)2. Helle Bunzel () Hypothesis Testing Fall 2006 56 / 66 Likelihood ratio tests Example So the LRT statistic is λ(x) =  1p 2πσ̂0 n e 1 2σ̂20 ∑ni=1(xi µ0)2 1p 2πσ̂ n e 1 2σ̂2 ∑ni=1(xi x̄ )2 Now rewrite the numerator as follows 1p 2πσ̂0 n e 1 2σ̂20 ∑ni=1(xi µ0)2 =  1p 2πσ̂0 n e nσ̂20 2σ̂20 =  1p 2πσ̂0 n e n 2 Helle Bunzel () Hypothesis Testing Fall 2006 57 / 66 Likelihood ratio tests Example Then rewrite the denominator as follows 1p 2πσ̂ n e 1 2σ̂2 ∑ni=1(xi x̄ )2 =  1p 2πσ̂ n e nσ̂2 2σ̂2 =  1p 2πσ̂ n e n 2 Now rewrite the LR test using these: λ(x) =  1p 2πσ̂0 n e 1 2σ̂20 ∑ni=1(xi µ0)2 1p 2πσ̂ n e 1 2σ̂2 ∑ni=1(xi x̄ )2 =  1p 2πσ̂0 n  1p 2πσ̂ n = 1 σ̂0 1 σ̂ !n =  σ̂0 σ̂ n Helle Bunzel () Hypothesis Testing Fall 2006 58 / 66 Likelihood ratio tests Example Continuing: 0@ pn (x̄ µ0)q ∑ni=1 (xi x̄) 2 1A2  c 2n 1 ) 1 n 1 0@ pn(x̄ µ0)q ∑ni=1(xi x̄ )2 n1 1A2  c 2n 1 ) 1 n 1 p n(x̄ µ0) s 2  c 2n 1 ) p n(x̄ µ0) s 2  (n 1)  c 2 n 1  Helle Bunzel () Hypothesis Testing Fall 2006 61 / 66 Likelihood ratio tests Example And …nally: p n(x̄ µ0) s 2  (n 1)  c 2 n 1  ) p n(x̄ µ0) s   r (n 1)  c 2 n 1  = γ γ will be determined so that the critical region is of the appropriate size. Note that the left hand side is distributed as a t random variable. Speci…cally, we reject H0 : µ = µ0 if x̄ µ0sp n  tα/2(n 1) Helle Bunzel () Hypothesis Testing Fall 2006 62 / 66 Likelihood ratio tests Example Recall the following example: Consider the following 18 exam scores: 46 58 87 97.5 82.5 68 83.25 99.5 66.5 75.5 62.5 67 78 32 74.5 47 99.5 26 The mean of the data is 69.4583. The variance is 466.899 The standard deviation is 21.6078. We are interested in the null hypothesis µ = 80. We can compute the t-statistic as follows. t = x̄ µ Sp n = 69.4583 80 21.6078p 18 = 2.069 83 Helle Bunzel () Hypothesis Testing Fall 2006 63 / 66
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved