You are on page 1of 50

HYPOTHESIS TESTING AND

STATISTICAL INFERENCE

β 5-1
What Is Hypothesis Testing?
• Hypothesis testing and statistical inference allow us to
answer questions about the real world from a sample.
• It is used in a variety of settings:
• FDA product testing
• Testing theories of Keynes and Friedman
• It’s almost impossible to prove a theory is “correct” with
hypothesis testing.
• All that can be done with hypothesis testing is to state
that a particular sample conforms to a particular
hypothesis.

β 5-2
What Is Hypothesis Testing? (continued)
• The first step in hypothesis testing is to state the
hypotheses to be tested.

• This should be done before equation is estimated.

• The hypothesis test is broken into two hypotheses:


null hypothesis, denoted “H0:”, typically is a
statement of the values not expected.
alternative hypothesis denoted “HA:”, typically is a
statement of the values expected.

β 5-3
What Is Hypothesis Testing? (continued)
Example: If you expect a positive coefficient
Null hypothesis: H0: β ≤ 0
(the values you do not expect)
Alternative hypothesis: HA: β > 0
(the values you expect)

Example: If you expect a negative coefficient


Null hypothesis: H0: β ≥ 0
Alternative hypothesis: HA: β < 0
• These are one-sided tests.
β 5-4
What Is Hypothesis Testing? (continued)
• A two-sided test (or a two-tailed test) tests an
alternative hypothesis with values on both sides of the
null hypothesis.

Example: Two-sided test around zero


Null hypothesis: H0: β = 0
Alternative hypothesis: HA: β ≠ 0

• Except in unusual cases, economists always put what


they expect in the alternative hypothesis.

β 5-5
What Is Hypothesis Testing? (continued)
• Typical testing technique in econometrics:
1. Hypothesize an expected sign (or value) for each
regression coefficient (except constant).
2. Determine whether to reject the null hypothesis.

• It is unrealistic to think conclusions from regression


analysis will always be right.

• There are two types of errors:


1. Type I: Reject a true null hypothesis.
2. Type II: Do not reject a false null hypothesis.
β 5-6
What Is Hypothesis Testing? (continued)
Example: Suppose the following null and alternative
H0: β ≤ 0
HA: β > 0

Case 1: Assume true β is NOT positive but researcher’s


estimate leads to the rejection of the null hypothesis:
This is a Type I Error

Case 2 Assume true β is positive but researcher’s


estimate leads to not rejecting the null hypothesis:
This is a Type II Error
β 5-7
What Is Hypothesis Testing? (continued)
• A decision rule is a method of deciding whether to
reject a null hypothesis.
• Typically a decision rule involves comparing a sample
statistic with a critical value.
• A decision rule should be formulated before regression
estimates are obtained.
• Divide the range of possible values of 𝛽 into two
regions:
1. “Acceptance” region
2. Rejection region

β 5-8
What Is Hypothesis Testing? (continued)
• A critical value divides “acceptance” and rejection
regions.
• For a two-tailed test, two critical values are selected.

• Rejection region measures probability of a Type I Error if


the null is true.
• Unfortunately, decreasing the chance of a Type I Error
means increasing the chance of a Type II Error.
• Figures 5.1 and 5.2 graph “acceptance” and rejection
regions for a one-sided test and two-sided tests,
respectively.
β 5-9
What Is Hypothesis Testing? (continued)

β 5-10
What Is Hypothesis Testing? (continued)

β 5-11
The t-Test

• The t-test is used to test hypotheses about individual


slope coefficients.

• It is the appropriate test when:


1. The stochastic error term is normally distributed.
2. Variance of the distribution must be estimated.

• Since these are usually the case, the use of the t-test for
hypothesis testing has become standard in
econometrics.

β 5-12
The t-Test (continued)
• We can calculate t-values for each estimated coefficient
of a typical multiple regression equation:
Yi = 𝛽 + 𝛽 𝑖 + 𝛽 𝑖 + 𝜀𝑖 (5.1)
• t-statistic for the
𝛽𝑘 −𝛽𝐻0
kth coefficient: 𝑡𝑘 = 𝑘 = , , . . 𝑘 (5.2)
𝐸 𝛽𝑘

Where:
𝛽𝑘 = the estimated regression coef. for the kth variable

𝛽𝐻0 = the border value coef. for the kth variable

𝑆 𝛽𝑘 = the estimated standard error of 𝛽𝑘


β 5-13
The t-Test (continued)
• Since most regression hypotheses test whether a
particular regression coefficient is significantly different
from 0, 𝛽𝐻0 is typically 0.

• Thus, the most-used form of the t-statistic becomes:


𝛽𝑘 −
𝑡𝑘 =
𝐸 𝛽𝑘
which simplifies to:
𝛽𝑘
𝑡𝑘 = 𝑘 = , ,..𝑘 (5.3)
𝐸 𝛽𝑘

β 5-14
The t-Test (continued)
Example: Consider Woody’s restaurant from Section 3.2

Testing H0: βP ≤ 0, the t-statistic is:

β 5-15
The t-Test (continued)
• Whether to reject or not to reject a null hypothesis is
based comparing calculated t-value to a critical t-value.

• Critical t-value is the value that distinguishes the


“acceptance” region from the rejection region.

• The critical t-value, tc, is selected from a t-table based


on:
1. Whether the test is one-sided or two-sided
2. Level of Type I Error specified
3. Degrees of freedom

β 5-16
The t-Test (continued)
• Once a critical t-value (tc) has been selected and
calculated t-value (tk) obtained, apply the following
decision rule:
Reject H0 if |tk| > tc
and
if tk has the sign implied by HA.

Do not reject H0 otherwise.

β 5-17
The t-Test (continued)
• This decision rule is used for:

1. One-sided hypotheses around zero:


H0: βk ≤ 0 H0: βk ≥ 0
HA: βk > 0 HA: βk < 0

2. Two-sided hypotheses around zero:


H0: βk = 0
HA: βk ≠ 0

β 5-18
The t-Test (continued)
• It is also used for:

1. One-sided hypotheses based on hypothesized


values other than zero:
H0: βk ≤ S H0: βk ≥ S
HA: βk > S HA: βk < S

2. Two-sided hypotheses based on hypothesized


values other than zero:
H0: βk = S
HA: βk ≠ S

β 5-19
The t-Test (continued)
Example: Woody’s restaurant: test βP to be positive.
• One-sided test: H0: βP ≤ 0
HA: βP > 0
• There are 29 degrees of freedom (N – K - 1, or 33 – 3
- 1) so appropriate tc at 5-percent significance: 1.699.
• Decision rule:
Reject H0 if |tP| > 1.699 and if tP is positive
• Recall tP = +4.88
• Since |4.88| > 1.699 and 4.88 is positive, reject H0.
β 5-20
The t-Test (continued)
• The level of significance indicates the probability of
observing an estimated t-value greater than the critical
value if the null hypothesis were correct.

• It measures probability of a Type I Error implied by a


particular critical t-value.

• How should you choose a level of significance?

• Most beginning econometricians assume the lower


the level of significance the better.

β 5-21
The t-Test (continued)
• Unfortunately, a low level of significance dramatically
increases the probability of a Type II Error.

• Using a 5-percent level of significance is recommended


unless you know something unusual about the relative
costs of making Type I or Type II Errors.

• If you can reject the null at the 5-percent level of


significance, it is common to summarize and say:
“The coefficient is statistically significant
at the 5-percent level.”
β 5-22
β 5-23
The t-Test (continued)
• The p-value, or marginal significance level, is an
alternative to the t-test.

• A p-value for a t-score is the probability of observing a t-


score that size or larger (in absolute terms) if the null
hypothesis were true.

• Standard regression software packages calculate p-


values automatically for every coefficient.

• Be careful! Virtually every package reports p-values for


two-sided hypotheses.
β 5-24
The t-Test (continued)
• How do you use a p-value to run a t-test?
• Apply p-value decision rule:

Reject H0 if p-value < level of significance


and
If b ˆk has the sign implied by HA.

Do not reject H0 otherwise.

β 5-25
Examples of t-Tests
• There are four steps to conducting a t-test:

1. Set up the null and alternative hypotheses


2. Choose a level of significance and therefore a
critical t-value.
3. Run the regression and obtain an estimated t-
value (or t-score).
4. Apply the decision rule by comparing the
calculated t-value with the critical t-value in order to
reject or not reject the null hypothesis.

β 5-26
Examples of t-Tests (continued)
Example: One-sided t-test: aggregate annual retail sales
of new cars

Step 1: Set up null and alternative hypotheses


H0: β1 ≤ 0 H 0: β2 ≥ 0 H0: β3 ≥ 0
HA: β1 > 0 H A: β 2 < 0 HA: β3 < 0

β 5-27
Examples of t-Tests (continued)
Step 2: Choose a level of significance and therefore a
critical t-value.
5-percent significance level
degrees of freedom = 6 𝑡𝑐 = .9

Step 3: Run regression and obtain an estimated t-


value.

β 5-28
Examples of t-Tests (continued)
Step 4: Apply the decision rule by comparing the
calculated t-value with the critical t-value in order to
reject or not reject the null hypothesis.

For β1: Reject H0 if |2.1| > 1.943 and if 2.1 is positive.

For β2: Reject H0 if |2.8| > 1.943 and if 2.8 is negative.

For β3: Reject H0 if |-0.1| > 1.943 and if -0.1 is negative.

• Figure 5.4 illustrates all three outcomes.

β 5-29
Examples of t-Tests (continued)

β 5-30
Examples of t-Tests (continued)

• Two-sided tests fall into two categories:

1. Two-sided tests of whether an estimate


coefficient is significantly different than zero, and

2. Two-sided tests of whether an estimated


coefficient is significantly different from a specific
value.

β 5-31
Examples of t-Tests (continued)
Example: Two-sided t-test whether an estimated
coefficient is statistically different than zero: Woody’s
restaurant location

Step 1: Set up null and alternative hypothesis


H0: βI = 0
HA: βI ≠ 0

β 5-32
Examples of t-Tests (continued)
Step 2: Choose a level of significance and therefore a
critical t-value.
5-percent significance level
degrees of freedom = 29 𝑡𝑐 = .9

Step 3: Run regression and obtain an estimated t-


value.

β 5-33
Examples of t-Tests (continued)
Step 4: Apply the decision rule by comparing the
calculated t-value with the critical t-value in order to
reject or not reject the null hypothesis.

For βI: Reject H0 if |2.37| > 2.045

• In this case, you reject the null hypothesis that βI equals


zero because 2.37 is greater than 2.045.

β 5-34
Examples of t-Tests (continued)
• For a two-sided t-test with a specific nonzero coefficient
value, the null and alternative hypotheses become:
𝐻 : 𝛽𝑘 = 𝛽𝐻0
𝐻 : 𝛽𝑘 ≠ 𝛽𝐻0

• The estimated t-value is:


𝛽𝑘 −𝛽𝐻0
𝑡𝑘 = 𝑘 = , , . . 𝑘 (5.2)
𝐸 𝛽𝑘

• The decision rule remains the same.

β 5-35
Limitations of the t-Tests
• One problem with the t-test is that it is easy to misuse.
• Three limitations:
1. The t-test does not test theoretical validity

• Coefficients are statistically significant.


• The catch is that P is the consumer price index and C is
the cumulative amount of rainfall in the United Kingdom!
β 5-36
Limitations of the t-Tests (continued)
2. The t-test does not test importance.

• With a t-score of 10.0, X1’s is more statistically


significant than X2.
• That means is there is more evidence X1’s coefficient is
positive—does not mean more important.

β 5-37
Limitations of the t-Tests (continued)
3. The t-test is not intended for tests of the entire
population.
• The t-test helps make inferences about the true value of
a parameter from a sample of the population.
• A unbiased coefficient calculated from entire population,
already measures the population value.
• A significant t-test adds nothing to this knowledge.
• If the sample size is large enough to approach the
population, then the standard error will approach zero
and the t-score will become:
𝛽
𝑡= =∞
β 5-38
Confidence Intervals
• Confidence intervals are a third way to do hypothesis
testing.
• A confidence interval is a range of values that will
contain the true value of β a certain percentage of the
time.
• The confidence interval formula:

confidence interval = 𝛽 ± 𝑡𝑐 ∗ 𝑆 𝛽

• tc is the two-sided critical value of the t-statistic for the


chose significance level.

β 5-39
Confidence Intervals (continued)
Example: Woody’s restaurant site location

• A 90 percent confidence interval for βI:

• There’s a 90 percent chance true βI falls between 0.365


and 2.211.
β 5-40
Confidence Intervals (continued)
• If testing: H0: βI = 0
HA: βI ≠ 0
• We can reject null hypothesis at the 10-percent level
because 0 is not in the confidence interval.

• If testing: H0: βI = 1
HA: βI ≠ 1
• We cannot reject null hypothesis at the 10-percent level
because 1 is in the confidence interval.
β 5-41
Confidence Intervals (continued)
• Confidence intervals are also very useful in telling how
precise a coefficient estimate is.
Example: Contractor Grace and value of a bathroom

β 5-42
The F-Test
• The F-test is a formal hypothesis test designed to deal
with a null hypothesis that contains multiple hypotheses
or a single hypothesis about a group of coefficients.
• The way an F-test works is fairly ingenious:
1. Translate the null hypothesis into constraints that
will be placed on the equation.
2. Estimate the constrained equation with OLS and
compare the fit of the constrained equation with the
fit of the unconstrained equation.

β 5-43
The F-Test (continued)
• The fits of the equations are compared with the general
F-statistic:
𝑀− /
= (5.10)
/ −𝐾−
where:
RSS = residual sum of squares from the
unconstrained equation
RSSM = residual sum of squares from the
constrained equation
M = number of constraints
(N-K-1) = degrees of freedom in the unconstrained
equation.
β 5-44
The F-Test (continued)
• Decision rule is reject the null hypothesis if calculated F-
value (F) is greater than the critical F-value (Fc)

F-test Decision Rule:


Reject H0 if F > Fc
Do not reject H0 if F ≤ Fc

The F-statistic has two types of degrees of freedom:


1. Degrees of freedom for numerator: M
2. Degrees of freedom for denominator: (N-K-1)

β 5-45
The F-Test (continued)
• F-test of overall significance provides a formal
hypothesis test of overall fit.
• It tests all slope coefficients equal to zero simultaneously.
H0: β1 = β1 = … = βK = 0
HA: H0 is not true
• The overall F-statistic is:

• The constrained equation is: 𝑖 = 𝛽 + 𝜀𝑖 (5.12)


β 5-46
The F-Test (continued)
• There are many uses of the F-test.
• One example is testing the significance of seasonal
dummies (dummy variables used to account for
seasonal variation in time-series models).
• For example, in a quarterly model, if:
X1t = 1 if quarter 1 and 0 otherwise
X2t = 1 if quarter 2 and 0 otherwise
X3t = 1 if quarter 3 and 0 otherwise
then:

β 5-47
The F-Test (continued)
• To test the hypothesis of significant seasonality in the
data, one must test the hypothesis that all dummies
equal zero simultaneously.
• In this case, the hypothesis statement would be:
H0: β1 = β2 = β3 = 0
HA: H0 is not true

The constrained equation is 𝑖 = 𝛽 + 𝛽4 4𝑡 + 𝜀𝑖

β 5-48
β 5-49
β

CHAPTER 5: the end

You might also like