lecture 11 preview: hypothesis testing and the wald test wald test let statistical software do the...
TRANSCRIPT
Lecture 11 Preview: Hypothesis Testing and the Wald Test
Wald Test
Let Statistical Software Do the Work
Testing the Significance of the “Entire” Model
No Money Illusion Theory: Calculating Prob[Results IF H0 True]
Clever Algebraic Manipulation
Equivalence of Two-Tailed Student-t Tests and Wald Tests (F-Tests)
Three Important Distributions: Normal, Student-t, and F
Restricted Regression Reflects H0
Unrestricted Regression Reflects H1
Comparing the Restricted Sum of Squared Residuals and the Unrestricted Sum of Squared Residuals: The F-statistic
Two-Tailed t-Test
Wald Test
Dependent Variable: LogQExplanatory Variable(s):
Estimate SE t-Statistic Prob
LogP 0.411812 0.093532 -4.402905 0.0003LogI 0.508061 0.266583 1.905829 0.0711LogChickP 0.124724 0.071415 1.746465 0.0961Const 9.499258 2.348619 4.044615 0.0006
Number of Observations 24 Degrees of Freedom 20
Step 1: Collect data, run the regression, and interpret the estimates
Model: No Money Illusion Theory: P + I + CP = 0
Taking logs: log(Qt) = log(Const) + Plog(Pt) + Ilog(It) + CPlog(ChickPt) + et
Interpreting the coefficient estimates: bI = Income Elasticity of Demand = .51
bP = (Own) Price Elasticity of Demand = .41 bCP = Cross Price Elasticity of Demand = .12
What does the sum of the elasticity estimates equal? bP + bI + bCP = .41 + .51 + .12
Critical Regression Result: The sum of the elasticity estimates is .22; the sum is .22 from 0.A 1 percent increase in all prices and income increases the quantity demanded by .22 percent
Step 2: Play the cynic and challenge the results; construct the null and alternative hypotheses:
H0: P + I + CP = 0 Cynic’s view is correct: No money illusion
H1: P + I + CP 0 Cynic’s view is incorrect: Money illusion present
Cynic’s view: Despite the results, money illusion is not present.
Step 0: Construct a model reflecting the theory to be tested.
No Money Illusion Theory: Increasing all prices and income by the same proportion does not affect the quantity of goods demanded.
=.22
EViews
The evidence suggests that the no money illusion theory is incorrect.
Step 3: Formulate the question to assess the cynic’s view.
Specific Question: Critical regression result: The sum of elasticity estimates equals .22, the sum is .22 from 0. What is the probability that the sum of elasticity estimates in one regression would be at least .22 from 0, if H0 were true (if the sum of the actual elasticities equaled 0)?
Question: How can we calculate Prob[Results IF H0 True]?
H0: P + I + CP = 0 Cynic is correct: No money illusionH1: P + I + CP ≠ 0 Cynic is incorrect: Money illusion present
Generic Question: What is the probability that the results would be like those we actually obtained (or even stronger), if the cynic were correct and H0 actually true?
Answer: There are three ways:Clever Algebraic Manipulation:
Wald Test
Let Statistical Software Do the Work
Step 4: Use the properties of the estimation procedure to calculate Prob[Results IF H0 True].
Prob[Results IF H0 True] =.43
Dependent Variable: LogQExplanatory Variable(s): Estimate SE t-Statistic Prob
LogPLessLogChickP 0.467358 0.062229 -7.510284 0.0000LogILessLogChickP 0.301906 0.068903 4.381606 0.0003Const 11.36876 0.260482 43.64516 0.0000
Number of Observations 24 Degrees of Freedom 21Sum of Squared Residuals .004825
Calculating Prob[Results IF H0 True] – Method 2: Wald Test
log(Qt) = log(Const) + Plog(Pt) + Ilog(It) + CPlog(ChickPt) + et
Model and Hypotheses:
H0: P + I + CP = 0 No money illusion.H1: P + I + CP 0 Money illusion present
First, consider the restricted model, the model that is consistent with the null hypothesis:H0: P + I + CP = 0 log(Qt) = log(Const) + Plog(Pt) + Ilog(It) + CPlog(ChickPt) + et CP = (P + I) = log(Const) + Plog(Pt) + Ilog(It) (P + I) log(ChickPt) + et
= log(Const) + Plog(Pt) + Ilog(It) Plog(ChickPt) Ilog(ChickPt) + et = log(Const) + Plog(Pt) Plog(ChickPt) + Ilog(It) Ilog(ChickPt) + et
= log(Const) + P[log(Pt) log(ChickPt)] + I[log(It) log(ChickPt)] + et
SSRR = .004825 DFR = 24 3 = 21
Restricted Regression:
EViews
log(Qt)= log(Const) + PLogPLessLogChickPt + ILogILessLogChickPt + et
Two Regressions: A Restricted Regression and an Unrestricted
Regression
Dependent Variable: LogQExplanatory Variable(s): Estimate SE t-Statistic Prob
LogP 0.411812 0.093532 -4.402905 0.0003LogI 0.508061 0.266583 1.905829 0.0711LogChickP 0.124724 0.071415 1.746465 0.0961Const 9.499258 2.348619 4.044615 0.0006
Number of Observations 24 Degrees of Freedom 20Sum of Squared Residuals .004675
log(Qt) = log(Const) + Plog(Pt) + Ilog(It) + CPlog(ChickPt) + et
Model and Hypotheses:
H0: P + I + CP = 0 H1: P + I + CP 0
Next, consider the unrestricted model, the model that is consistent with the alternative hypothesis. Here we allow the estimates to take on any values; their values are unrestricted:
Unrestricted Regression:
SSRU = .004675 DFU = 24 4 = 20
Compare the sum of squared residuals from the restricted and unrestricted regressions:
SSRR = .004825
In general, SSRR SSRU
Is this a coincidence? No.
The OLS estimation procedure chooses the estimates of the constant and coefficients so as to minimize the sum of squared residuals.The unrestricted regression places no restrictions on the estimates. Imposing a restriction limits the ability to make the sum of squared residuals as small as possible.
Note that SSRR > SSRU
A restriction can never decrease the sum of squared residuals; a restriction can only increase the sum.
No money illusion.Money illusion present
EViews
Lab 11.1
SSRR will be larger than SSRU.
Restriction not actually true
Restriction should cost much in terms of SSR
Expect SSRR to be
much larger than SSRU
Expect F-statistic to be large
Depends on whether or not H0 is actually true.
If H0 is not actually true
Restriction actually true
Restriction should cost little in terms of SSR
Expect SSRR to be
only a little larger than SSRU
Expect F-statistic to be small
If H0 is actually true
But, by how much?
Restricted regressionUnrestricted regression
How do we decide if the SSRR is much or just a little larger than SSRU?
Question: Can the F-statistic be negative? No. Because SSRR SSRU
H0: P + I + CP = 0 H1: P + I + CP 0
No money illusion.Money illusion present
Calculating the F-Statistic:
SSRR = .004875 DFR = 21
SSRU = .004625 DFU = 20SSRR SSRU = .000150 DFR DFU = 1
H0: P + I + CP = 0 No money illusion
H1: P + I + CP 0 Money illusion present
SSRR = .004875 DFR = 21 SSRU = .004625 DFU = 20
Restricted regression Unrestricted regression
=.000150/1
.004675/20=
.000150
.000234= .64
Cynic’s ViewSure, SSRR is larger than SSRU and the F-statistic is not 0, but this is just the “luck of the draw.” In fact, H0 is true, money illusion is not present, the restriction is true.
H0: P + I + CP = 0 No money illusion Restriction actually true
H1: P + I + CP 0 Money illusion present Restriction actually not trueQuestion Assess the Cynic’s View
Generic Question: What is the probability that the results would be like those we actually obtained (or even stronger), if the cynic were correct and H0 actually true?Specific Question: Regression results: F-statistic equals .64. What is the probability that the F-statistic from one pair of regressions would be .64 or more, if H0 were true (if no money illusion were present or equivalently if the restriction were true)?Answer: Prob[Results IF Cynic Correct] or equivalently Prob[Results IF H0 True]
H0: P + I + CP = 0 No money illusion Restriction actually trueH1: P + I + CP 0 Money illusion present Restriction actually not true
= .64.000150
.004675=
/ 1
/ 20
Prob[Results IF H0 True]
Lab11.3
.43Calculating Prob[Results IF H0 True] Using a Simulation
Prob[Results IF H0 True] small
Unlikely that H0 is true
Prob[Results IF H0 True] large
Likely that H0 is true
Do not reject H0
Reject H0
Specific Question: Regression results: F-statistic equals .64. What is the probability that the F-statistic from one pair of regressions would be .64 or more, if H0 were true (if money illusion is not present or equivalently if the restriction is true)? Answer: Prob[Results IF H0 True]
SSRDem = .004675
SSRNum = .000150
DFDem = 20
DFNum = 1
Calculating Prob[Results IF H0 True] Using the F-Distribution
Prob[Results IF H0 True]
DFNum = 1
DFDem = 20
.64
.43The F-distribution is described by the degrees of freedom of the numerator and the degrees of freedom of the denominator:
Question: Using the “traditional” significance levels, would you reject H0?Answer: No.
Lab 11.4
But, what if we could not use a simulation?
= .43
Wald Test
Degrees of FreedomValue Num Dem Prob
F-statistic 0.641644 1 20 0.4325
Dependent Variable: LogQExplanatory Variable(s):
Estimate SE t-Statistic Prob
LogP 0.411812 0.093532 -4.402905 0.0003LogI 0.508061 0.266583 1.905829 0.0711LogChickP 0.124724 0.071415 1.746465 0.0961Const 9.499258 2.348619 4.044615 0.0006
Number of Observations 24 Degrees of Freedom 20
Method 1 – Clever Algebra Approach: Prob[Results IF H0 True]What is the probability that the coefficient estimate from one regression would be at least .22 from 0, if H0 were true (if there were no money illusion, if Clever actually equaled 0)?
= .43
Method 2 – Wald Approach: Prob[Results IF H0 True]What is the probability that the F-statistic from one pair of regressions would be .64 or more, if H0 were true (if there were no money illusion, if actual elasticity sum to 0)?
= .43
Conclusion: While the approaches differ, the two methods produce identical results.In fact, it can be shown rigorously that methods 1 and 2 are equivalent. Calculating Prob[Results IF H0 True] – Method 3: Let statistical software do the work
Coefficient restriction: C(1) + C(2) + C(3) = 0
The F-statistic equals .64. If the restriction we specified were actually true, the probability that the F-statistic from one repetition of the experiment would be .64 or more equals .43.
The probabilities in all three methods are identical.
Run the unrestricted regression:
Note: The F-statistics in the second and third methods are identical.
C(1)C(2)C(3)C(4)
EViews Numbering
Convention:
EViews
Comparing methods 1, 2, and 3:
Method 1 – Clever Algebra Approach: Prob[Results IF H0 True]What is the probability that the coefficient estimate from one regression would be at least .22 from 0, if H0 were true (if there were no money illusion, if Clever actually equaled 0)?
= .43
Method 2 – Wald Approach: Prob[Results IF H0 True]What is the probability that the F-statistic from one pair of regressions would be .64 or more, if H0 were true (if there were no money illusion, if actual elasticity sum to 0)?
= .43
Method 3 – Statistical Software Approach: Prob[Results IF H0 True] = .43
Conclusion: While the approaches differ, the methods produce identical results.
Dependent Variable: LogQExplanatory Variable(s): Estimate SE t-Statistic Prob
LogP 0.411812 0.093532 -4.402905 0.0003LogI 0.508061 0.266583 1.905829 0.0711LogChickP 0.124724 0.071415 1.746465 0.0961Const 9.499258 2.348619 4.044615 0.0006
Number of Observations 24 Degrees of Freedom 20Sum of Squared Residuals .004675
Dependent Variable: LogQExplanatory Variable(s): Estimate SE t-Statistic Prob
Const 12.30576 0.005752 2139.539 0.0000Number of Observations 24 Degrees of Freedom 23Sum of Squared Residuals .018261
Testing the “Entire” Model
Model: log(Qt) = log(Const) + Plog(Pt) + Ilog(It) + CPlog(ChickPt) + e
H0: P = 0 and I = 0 and CP = 0 The explanatory variables have no effect on the dependent variable.
H1: P 0 and/or I 0 and/or CP 0 At least one explanatory variable has an effect on the dependent variable.
Restricted Regression. H0: P = 0 and I = 0 and CP = 0
Unrestricted Regression. H1: P 0 and/or I 0 and/or CP 0
NB: If the null hypothesis is actually true, we have a good or bad model?log(Qt) = log(Const)
SSRU = .004675 DFU = 24 4 = 20
DFR = 24 1 = 23 SSRR = .018261
log(Qt) = log(Const) + Plog(Pt) + Ilog(It) + CPlog(ChickPt) + et
EViews
Very bad!
Prob[Results IF H0 True]: The F-statistic equals 19.4. What is the probability that the F-statistic from one pair of regressions would be 19.4 or more, if H0 were true (if prices and income actually had no effect on the quantity demanded, if P, I, and CP actually equaled 0)?
Prob[Results IF H0 True] small Prob[Results IF H0 True] large
H0: P = 0 and I = 0 and CP = 0 The explanatory variables have no effect on the dependent variable.
H1: P 0 and/or I 0 and/or CP 0 At least one explanatory variable has an effect on the dependent variable.
SSRR = . 018261 DFR = 24 1 = 23
SSRU = .004675 DFU = 24 – 4 = 20SSRR SSRU = . 013586 DFR DFU = 3
=. 013586 /3
.004675/20=
.004529
.000234= 19.4
Calculate the F-statistic:
Unlikely H0 is true
Reject H0
Likely H0 is true
Do not reject H0
SSRDem = .000234 DFDem
SSRNum = .013586 DFNum
= 20
= 3 Calculating
Prob[Results IF H0 True] Lab 11.5
Prob[Results IF H0 True] < .0001
Wald TestDegrees of Freedom
Value Num Dem ProbF-statistic 19.37223 3 20 0.0000
Ordinary Least Squares (OLS)Dependent Variable: LogQExplanatory Variable(s): Estimate SE t-Statistic Prob
LogP 0.411812 0.093532 -4.402905 0.0003LogI 0.508061 0.266583 1.905829 0.0711LogChickP 0.124724 0.071415 1.746465 0.0961Const 9.499258 2.348619 4.044615 0.0006
Number of Observations 24 Degrees of Freedom 20Sum of Squared Residuals .004675F-Statistic 19.3722 Prob[F-Statistic] .000004
Prob[Results IF H0 True]: What is the probability that the F-statistic from one pair of regressions would be 19.4 or more, if H0 were true (if prices and income actually have no effect on the quantity demanded, if P, I, and CP actually equaled 0)?
In fact, statistical software calculates this F-statistic and probability automatically:
Prob[Results IF H0 True] < .0001
Prob[Results IF H0 True] small
H0: P = 0 and I = 0 and CP = 0 The explanatory variables have no effect on the dependent variable.
H1: P 0 and/or I 0 and/or CP 0 At least one explanatory variable has an effect on the dependent variable.
Unlikely H0 is true
Reject H0
Coefficient restriction: C(1) = C(2) = C(3) = 0Using the “traditional” significance levels
would you reject H0? EViews
Could we let statistical software do the work?
C(1)C(2)C(3)C(4)
EViews Numbering
Convention:
Aside: Can a probability equal precisely 0? No.
EViews
Dependent Variable: LogQExplanatory Variable(s):
Estimate SE t-Statistic Prob
LogP 0.411812 0.093532 -4.402905 0.0003LogI 0.508061 0.266583 1.905829 0.0711LogChickP 0.124724 0.071415 1.746465 0.0961Const 9.499258 2.348619 4.044615 0.0006
Number of Observations 24 Degrees of Freedom 20
Equivalence of Two-Tailed t-Tests and Wald TestsClaim: A two-tailed t-test is a special case of a Wald Testlog(Qt) = log(Const) + Plog(Pt) + Ilog(It) + CPlog(ChickPt) + et We shall illustrate this by
considering the constant elasticity demand model.
H0: CP = 0H1: CP 0
Price of chicken does not affect the quantity of beef demandedPrice of chicken does affect the quantity of beef demanded
To justify the claim, focus attention on the coefficient of the price of chicken, CP, and consider the following “two-tail” hypotheses:
Prob[Results IF H0 True]: What is the probability that the coefficient estimate in one regression would be at least .12 from 0, if H0 were true (if the actual coefficient, CP, equaled 0; that is, if the price of chicken had no effect on the quantity demanded)? First, we shall calculate the probability using a Student t-test and then a Wald test.
Critical Regression Result: The LogChickP coefficient estimate equals .12. The estimate does not equal 0; the estimate is .12 from 0. This evidence suggests that the chicken price does affect the quantity of beef demanded.
EViews
Dependent Variable: LogQExplanatory Variable(s): Estimate SE t-Statistic Prob
LogP 0.411812 0.093532 -4.402905 0.0003LogI 0.508061 0.266583 1.905829 0.0711LogChickP 0.124724 0.071415 1.746465 0.0961Const 9.499258 2.348619 4.044615 0.0006
Number of Observations 24 Degrees of Freedom 20
Use the estimation procedure’s general properties to calculate Prob[Results IF H0 True].
H0: CP = 0 Price of chicken has no effect on the quantity of beef demandedH1: CP 0 Price of chicken has an effect on the quantity of beef demanded
bCP
t-distribution
OLS estimation procedure unbiased
Mean[bCP] = CP SE[bCP]
If H0 were true
Number of observations
Number of parameters
StandardError
DF = 24 4 = 20= 0 = .0714
Prob[Results IF H0 True]
Tails Probability: Probability that a coefficient estimate, bCP, resulting from one regression would will lie at least .12 from 0, if the coefficient, CP, actually equaled 0.
Estimate was .12: What is the probability that the coefficient estimate in one regression would be at least .12 from 0, if H0 were true (if the coefficient, CP actually equaled 0)?
.0961/2
Mean = 0SE = .0714DF = 20
.120
Tails Probability = .0961.0961/2
= .0961
.12.12
Dependent Variable: LogQExplanatory Variable(s): Estimate SE t-Statistic Prob
LogP 0.305725 0.074513 -4.102963 0.0005LogI 0.869706 0.175895 4.944466 0.0001Const 6.407302 1.616841 3.962852 0.0007
Number of Observations 24 Degrees of Freedom 21Sum of Squared Residuals .005388
Dependent Variable: LogQExplanatory Variable(s): Estimate SE t-Statistic Prob
LogP 0.411812 0.093532 -4.402905 0.0003LogI 0.508061 0.266583 1.905829 0.0711LogChickP 0.124724 0.071415 1.746465 0.0961Const 9.499258 2.348619 4.044615 0.0006
Number of Observations 24 Degrees of Freedom 20Sum of Squared Residuals .004675
Wald TestModel: log(Qt) = log(Const) + Plog(Pt) + Ilog(It) + CPlog(ChickPt) + et
“Two-tail” hypothesis:H0: CP = 0 Price of chicken does not affect the quantity of beef demanded H1: CP 0 Price of chicken does affect the quantity of beef demanded
Restricted Regression – the null hypothesis: CP = 0
Unrestricted Regression – the alternative hypothesis: CP 0
SSRR = .005388
SSRU = .004675
DFR = 24 3 = 21
DFU = 24 4 = 20
log(Qt) = log(Const) + Plog(Pt) + Ilog(It) + et
EViews
log(Qt) = log(Const) + Plog(Pt) + Ilog(It) + CPlog(ChickPt) + et
Wald Test
Degrees of FreedomValue Num Dem Prob
F-statistic 3.050139 1 20 .0961
SSRR = .005388 DFR = 24 3 = 21
SSRU = .004675 DFU = 24 – 4 = 20SSRR SSRU = .000713 DFR DFU = 1
=. 000713 /1
.004675/20= 3.05
H0: CP = 0 Price of chicken has no effect on the quantity demanded. Restricted regression H1: CP 0 Price of chicken has an effect on the quantity demanded. Unrestricted regression
Calculate the F-statistic:
DFNum = 1
DFDem = 20
3.05
.0961
Wald Test: Prob[Results IF H0 True] = .0961The two probabilities are identical.
It can be shown rigorously that the two-tailed Student-t test is a special case of the Wald test in which the restriction requires the coefficient to equal 0.
Let software calculate Prob[Results IF H0 True]:
Prob[Results IF H0 True]: The F-statistic equals 3.05. What is the probability that the F-statistic from one pair of regressions would be 3.05 or more, if the H0 were true (if the actual coefficient, CP, equaled 0; that is, if the price of chicken actually has no effect on the quantity demanded)?
Two-tailed Student-t Test: Prob[Results IF H0 True] = .0961Summary of Prob[Results IF H0 True] Calculations
Prob[Results IF H0 True] = .0961
EViews
Three Important Distributions: Normal, Student-t, and F
Theories Involving a Single Variable
Student-t distribution
Theories InvolvingTwo or More Variables
F distribution
which is described by the
Mean SE DF
DF of the Numerator
DF of the Denominator
If SD is known
Normal distribution
which is described
by the
If SD is not known
which is described
by the
Mean SD