Uploaded by studymaster

Assignment on Hypothesis Testing from ECON213

advertisement
University of Canterbury
ECON 213
Professor Bob Reed
First Semester 2023
WEEK #3 ASSIGNMENT - EMPIRICAL
DUE: Monday, March 6th
Do the following exercises:
1A.
Read pages 41-44 of Chapter 3 in the textbook.
1B.
Answer Questions #1-6.
2A.
You can think of hypothesis testing in the following way: The researcher
starts off with two hypotheses: (i) the null hypothesis, H0, and (ii) the
alternative hypothesis, HA. There are two possible outcomes to hypothesis
testing.
NOTE: There is a misleading statement in this chapter. On page 44, the
textbook states, “The null hypothesis states the opposite of what we want to
prove.” Later the textbook states, “The null hypothesis is set up so that it is
the opposite of the hypothesis to be tested. The alternative hypothesis
represents the hypothesis to be tested.” This is misleading because hypothesis
tests always test the null hypothesis. That is, the “Reject” or “Cannot Reject”
conclusion refers specifically to the null hypothesis.
Outcome #1 is the researcher “cannot reject” the null hypothesis. This
leaves both hypotheses as possibilities and is technically a “weak” result.
This is why the text says that one should think of “cannot reject” as an
“inconclusive” result (cf. page 44).
2B.
3A.
Outcome #2 is the researcher “rejects” the null hypothesis. This is a
“strong” result! It means that we can eliminate the null hypothesis as a
reasonable possibility, leaving the alternative hypothesis as the only
remaining hypothesis.
Answer Questions #7-8.
Skim pages 44-57 of the text.
NOTE #1: Section 3-2 on pages 48f. discusses how to conduct a t-test. Central
to this test is the calculation of the “t-statistic” described in Equation (3-2)
and the associated text. What is the “t-statistic?” Think of it like this: It is a
measure of “distance” between the estimated coefficient, B̂ , and its
hypothesized value, Bnull, where distance is measured in units of “standard
deviations” (odd as that might seem).
1
For example, look at TABLE 3-B on page 50 of the text. Note that the “tstatistic” for the PRICE variable is -2.43. What does that number mean? The
minus sign means that the estimated coefficient for PRICE lies below zero
(zero being the implied hypothesized value, Bnull). The number 2.43 means
that the estimated PRICE coefficient (= -83,543.88) lies 2.43 standard
deviation units below zero. In “Statistics Land”, a t-statistic larger than 2 is
a “large distance.” Thus, B̂ PRICE is “far away” from Bnull = 0: Because it is so
“far away,” it is unlikely that a researcher would estimate a value for BPRICE
of -83,543.88 when the true value of BPRICE was equal to zero.
Alternatively, consider the regression results for the variable SALE ITEMS in
TABLE 3-B. The estimated coefficient for SALE ITEMS is 530.87, and the
associated t-statistic is 0.76. What does the latter number mean? The fact
that the t-statistic is positive means that the estimated coefficient for SALE
ˆ
ITEMS lies above Bnull = 0. The number 0.76 means that B
SALE ITEMS (= 530.87)
lies 0.76 standard deviation units above zero. In “Statistics Land”, this is a
ˆ
“small distance.” Thus, B
SALE ITEMS is “close” to Bnull = 0: Because it is “close,”
there is a reasonable likelihood that a researcher would estimate a value for
BSALE ITEMS of 530.87 when the true value of BSALE ITEMS was equal to zero.
NOTE #2: What is the “p-value” (cf. page 53 of the text)? An accurate,
technical definition can be difficult to understand (see note at the end of this
assignment). Therefore, we will follow the text in interpreting the “p-value”
as the probability that the null hypothesis, H0, is true. But WARNING! This
interpretation is incorrect. However, it is a useful, incorrect interpretation
because it helps us to interpret the results of hypothesis tests. We will discuss
this further in the course.
3B.
Answer Questions #9-12.
4A.
(The Null Hypothesis: Two-Sided Tests.) The most important thing to
know about null hypotheses is that they must include an equals sign!
Consider the regression model given in Equation 3-1 on page 43 of the
text:
REVENUE = B0 + B1 PRICE + B2 SALE ITEMS + B3 ADVERTISING + e .
Suppose one wanted to test the hypothesis that advertising does not affect
store revenues. If advertising really has no effect on revenue, this would
imply that B3 = 0 (do you see why?). For the purpose of hypothesis testing,
the null hypothesis would then be quite straightforward:
H0: B3 = 0
(Advertising does not affect store revenues)
Suppose, instead, that one wanted to test the hypothesis that advertising
DOES affect store revenues. You might think that the appropriate null
hypothesis in this case would be H0: B 3 ≠ 0 (do you see why?). However,
this would be wrong! Note that this null hypothesis does not include the
2
equals sign. What should one do in this case?
converse/opposite hypothesis: H0: B3 = 0.
4B.
5A.
One tests the
Thus, one sets up the hypothesis test the same whether one wants to test
(i) advertising does not affect store revenues, or (ii) advertising does affect
store revenues. The trick is to always phrase the null hypothesis so that it
includes an equals sign.
Answer Questions #13-14.
(The Null Hypothesis: One-Sided Tests.) Consider again the regression
model given in Equation 3-1 on page 43 of the text:
REVENUE = B0 + B1 PRICE + B2 SALE ITEMS + B3 ADVERTISING + e .
Suppose one wanted to test the hypothesis that advertising does not
increase store revenues. If advertising really does not increase revenue,
then it must either not affect store revenues (B3 = 0); or decrease store
revenues (B3 < 0). Putting these together leads to the following,
straightforward statement of the null hypothesis:
H 0: B 3 ≤ 0
(Advertising does not increase store revenues)
Suppose, instead, that one wanted to test the hypothesis that advertising
DOES increase store revenues. Again, you might be tempted to write the
null hypothesis as H 0: B3 > 0 , but this would be wrong. Why? Because it
does not include an equals sign. Thus, you need to state the null hypothesis
so that it tests the converse/opposite hypothesis: H 0: B3 ≤ 0 .
5B.
6A.
6B.
Thus, one sets up the hypothesis test the same whether one wants to test
(i) advertising does not increase store revenues, or (ii) advertising does
increase store revenues.
Answer Questions #15-18.
Re-read pages 49-52 of the text.
(The Four Steps of Hypothesis Testing.) This section walks you through
the four steps of hypothesis testing. NOTE: I will make some slight changes
to the procedure presented in the text (trust me, this will make your life
easier!).
STEP ONE: State the hypothesis to be tested
STEP ONE should consist of a null hypothesis (H0) and alternative
hypothesis (HA) in both mathematical and written form. For example,
3
suppose we are interested in testing the following statement: The number
of sale items affects store revenues.
In the context of TABLE 3-B on page 50, this statement implies that
B SALE ITEMS ≠ 0 . However, since this does not include an equals sign, we
must state the null hypothesis in terms of the converse/opposite of this
statement: H 0: B SALE ITEMS = 0 . STEP ONE should thus take the following
form:
H 0: B SALE ITEMS = 0
H A: B SALE ITEMS ≠ 0
(The number of sale items does not affect store
revenues)
(The number of sale items affects store revenues)
STEP TWO: State the level of statistical significance
What does “statistical significance” mean in the context of hypothesis
testing? From a practical perspective, it defines what we are willing to
consider a “reasonable possibility.”
Consider the example on the bottom of page 46 in the text: A student does
not show up to work on an econometrics project. The next day he offers
the excuse that he was abducted by aliens! I can never know for certain
whether the student is telling the truth. But I can make a “statistical
judgment.”
Let’s set the “level of statistical significance” equal to 0.05 = 5%. This
means I am not willing to call the student a liar unless the probability that
the student is telling the truth is less than 5%. Since my common sense
tells me that the likelihood of being abducted by aliens is (far) less than 5%,
I reject the student’s story.
Suppose, however, the student told me that he intended to show up, but
when he got in his car, it would not start because the battery was dead.
Thus he couldn’t get to campus in time. Common sense tells me there is a
10% chance that this could happen. My best guess is that he is lying.
However, the student’s story is “reasonable;” i.e., the probability that he is
telling the truth is greater than 5%. It is a “reasonable possibility.”
Therefore, I do not reject the student’s story.
SUMMARY: Level of significance defines what we are willing to call a
“reasonable possibility.”
NOTE: Unless I tell you otherwise, always set the level of statistical
significance = 5%.
STEP TWO should thus take the following form:
4
LEVEL OF STATISTICAL SIGNIFICANCE = 0.05
STEP THREE: Report the statistics necessary for the hypothesis test
In this class, you will report two statistics: the t-statistic (or F-statistic -more on this later), and the p-value.
Referring to the regression results in TABLE 3-B on page 50, we see that
the following statistics are relevant for a study of the effect of number of
sale items on store revenues:
STATISTICS: t-statistic = 0.76; p-value = 0.45
STEP FOUR: Report your decision
Your decision consists of one of two conclusions: either (i) You reject the
null hypothesis; or (ii) You cannot reject the null hypothesis. You reach
your decision by applying the following decision rule:
FOR A TWO-SIDED HYPOTHESIS TEST: Compare the p-value from STEP
THREE with the level of statistical significance from STEP TWO. If the pvalue is less than the significance level, you “Reject.” If the p-value is
greater than or equal to the significance level, you “Cannot Reject.”
In the example of sale items and store revenues, the p-value from STEP
THREE is 0.45. The level of statistical significance is 0.05. Since the p-value
is greater than the significance level, you “Cannot Reject.”
Putting the four steps together produces the following “Hypothesis Test
Table:”
H 0: B SALE ITEMS = 0
1)
H A: B SALE ITEMS ≠ 0
(The number of sale items does not affect
store revenues)
(The number of sale items affects store
revenues)
2) LEVEL OF STATISTICAL SIGNIFICANCE = 0.05
3) STATISTICS: t-statistic = 0.76; p-value = 0.45
4) DECISION = Cannot Reject
5
What is the interpretation from this hypothesis test? You began your test
with two possibilities (H0 and HA). Unfortunately, your test led to an
inconclusive result: You were not able to eliminate the null hypothesis, so
both hypotheses remain “reasonable possibilities.” Your best guess is that
the number of sales DOES affect store revenues, since the estimated
coefficient for SALE ITEMS is 530.87 which is different from 0. However,
you cannot eliminate the hypothesis “The number of sale items does not
affect store revenues” as a “reasonable possibility.”
Suppose the p-value had been 0.03. That would have changed your
decision. In that case, your results indicate that there is a 3% chance that
the null hypothesis is true. This is not high enough to qualify this as a
“reasonable possibility.” Hence, you “Reject” this hypothesis. This is a
strong result: You are able to eliminate the null hypothesis as a “reasonable
possibility,” so only the alternative hypothesis remains. You conclude that
the number of sale items does affect store revenues.
NOTE: While we can never “accept” the null hypothesis; however, we can
“accept” the alternative hypothesis.
FOR A ONE-SIDED HYPOTHESIS TEST: Things are a little different for a
one-sided hypothesis test. Consider again the regression results from
TABLE 3-B on page 50 of the text; and suppose that we want to investigate
whether advertising increases store revenues. You should be able to
confirm that STEPS ONE and TWO of the “Hypothesis Test Table” should
look like the following:
H 0: B ADVERTISING ≤ 0
1)
H A: B ADVERTISING > 0
(Advertising does not increase store
revenues.)
(Advertising increases store revenues)
2) LEVEL OF STATISTICAL SIGNIFICANCE = 0.05
The t-statistic for one-sided hypothesis testing is reported the same way as
it is for two-sided hypothesis testing. You report the same value that is
produced by the regression software.
However, the p-value for one-sided hypothesis testing is complicated.
There are two cases to consider.
If the sign of the estimated coefficient is opposite to what the null
hypothesis states, then the correct p-value for a one-sided hypothesis test
is half the p-value reported by the regression software.
6
Alternatively, if the sign of the estimated coefficient is the same as what the
null hypothesis states, then the correct p-value is 1 minus half the p-value
reported by the regression software. Got that? Maybe an example will
help.
In TABLE 3-B on page 50, the estimated value of BADVERTISING = 1.14. The
null hypothesis states that BADVERTISING ≤ 0. In this case, the sign of the
estimated coefficient is opposite to what the null hypothesis states.
Therefore, the correct p-value is 0.012 (i.e., half the value of 0.024 reported
by the regression software in TABLE 3-B). Thus, STEP THREE of the
Hypothesis Test Table should look like this:
3) STATISTICS: t-statistic = 2.28; p-value = 0.012
STEP FOUR proceeds in the usual fashion: If the p-value is less than the
significance level, you “Reject.” If the p-value is greater than or equal to the
significance level, you “Cannot Reject.” In this case, we reject the null
hypothesis because the p-value = 0.012 < 0.05, so that STEP FOUR looks
like this:
4) DECISION = Reject
Alternatively, suppose the regression software had estimated a value of 1.14 for BADVERTISING; i.e., the same sign as what the null hypothesis states.
In this case, the regression software would have reported a t-statistic = 2.28, and a p-value of 0.024. Therefore, the correct p-value would be 0.988
(1 minus 0.012). STEPS THREE and FOUR of the Hypothesis Test Table
would then look like this:
3) STATISTICS: t-statistic = -2.28; p-value = 0.988
4) DECISION = Cannot Reject
Let’s do one more example for practice: Again, consider the regression
results from TABLE 3-B. Suppose we want to test the statement, “An
increase in PRICE causes store revenues to increase.” You should be able
to convince yourself that the corresponding “Hypothesis Test Table” is:
7
H 0: B PRICE ≤ 0
1)
H A: B PRICE > 0
(An increase in PRICE does not cause store
revenues to increase)
(An increase in PRICE causes store
revenues to increase)
2) LEVEL OF STATISTICAL SIGNIFICANCE = 0.05
3) STATISTICS: t-statistic = -2.43; p-value = 0.9915
4) DECISION = Cannot Reject
6C.
6D.
7A.
7B.
In this case, we “cannot reject” that the hypothesis “An increase in PRICE
does not cause store revenues to increase” is a “reasonable possibility.”
Read the handout “GUIDELINES FOR INTERPRETING YOUR HYPOTHESIS
TESTS”.
Answer Questions #19-22.
Create a “Week3-Empirical” folder in your R Workspace. Copy the files
“WEEK3-Empirical.Rmd” and “DVDData2.xls” into this folder. Work
through the R Markdown file to learn how to estimate regressions and test
hypotheses.
Answer Questions #23-26.
8A.
Read pages 45-47.
9A.
Read pages 57-61.
8B.
9B.
Answer Questions #27-28.
Answer Questions #29-32.
NOTE: The section, “Adjusted R2” on pages 58-59, states that the measure
“Adjusted R2,” or R 2 , is a better measure of “goodness-of-fit” than R2. This is
true. The larger the value for R 2 the better the regression model fits the
data. Two better measures are the “Akaike information criterion” (AIC) and
the “Schwarz information criterion” (SIC). Unlike R 2 , these measures
indicate a better fit when they have small values. Unfortunately, all three of
8
these measures are only useful when comparing regression equations that (i)
have the same dependent variable and (ii) use exactly the same observations.
Their main usefulness is for selecting among regression equations consisting
of alternative variable specifications.
FINAL NOTE: As noted above, it is very difficult to come up with an intuitive
explanation of the meaning of a “p-value”. Check out this article and
associated YouTube video as professional scientists and statisticians try,
and FAIL!, to give a practical interpretation of a p-value.
http://replicationnetwork.com/2015/12/01/fivethirtyeight-com-asksscientists-to-explain-the-meaning-of-a-p-value-hilarity-ensues/
9
Be prepared to answer the following questions in class:
1.
A)
B)
(Multiple choice: Select the single best answer.)
Selection bias occurs when the sample used in a regression analysis
differs in some systematic way from the population being studied.
True.
False.
A)
B)
(Multiple choice: Select the single best answer.)
An example of selection bias is when political polling underrepresents
key voter groups.
True.
False.
2.
3.
A)
B)
4.
(Multiple choice: Select the single best answer.)
Another example of selection bias occurs when regression analysis
based on a sample of recovering drug addicts is used to determine the
effectiveness of job training programs for the population as a whole.
(HINT: This is not from the text, so you’ll have to figure it out for
yourself.)
True.
False.
(Fill in the following blanks.)
The four general steps of hypothesis testing are as follows:
A)
Clearly ____________ the hypothesis to be tested.
B)
State the level of statistical ____________________ for the test.
C)
Run the regression to get the ___________________ estimates and
_____________________ necessary for the hypothesis test.
D)
Use the ____________________ rule to decide whether to reject the null
hypothesis.
5.
(Multiple choice: Select the single best answer.)
The hypothesis to be tested is known as the “null hypothesis” and is
written H0.
True.
False.
A)
B)
10
6.
A)
B)
7.
(Multiple choice: Select the single best answer.)
The alternative to H0 is known as the “alternative hypothesis” and is
written HA.
True.
False.
A)
B)
(Multiple choice: Select the single best answer.)
If you reject the null hypothesis, it is likely that it is false.
True.
False.
A)
B)
(Multiple choice: Select the single best answer.)
If you cannot reject the null hypothesis, it is likely that it is true.
True.
False.
8.
9.
A)
B)
10.
A)
B)
11.
A)
B)
12.
(Multiple choice: Select the single best answer.)
The larger the p-value, the less likely it is that the null hypothesis is true.
True.
False.
(Multiple choice: Select the single best answer.)
Consider the regression results in TABLE 3-B on page 50 of the text. The
larger the p-value for PRICE, the more likely it is that PRICE has no effect
on Revenue.
True.
False.
(Multiple choice: Select the single best answer.)
There is a direct relationship between the t-statistic and the p-value
produced by regression software: The bigger the absolute value of tstatistic, the bigger the p-value.
True.
False.
(Provide a short answer in the space below.)
In plain English, explain the logic underlying the relationship between
the the t-statistic and the p-value produced by regression software.
11
13.
A)
B)
14.
A)
B)
15.
A)
B)
C)
D)
16.
(Multiple choice: Select the single best answer.)
Consider the regression results reported in TABLE 3-C on page 54 of the
text. For the purpose of hypothesis testing, what would be the null
hypothesis corresponding to the following statement: The outside
temperature does not affect the truck driver’s MPG.
H 0: B TEMPERATURE = 0 .
H 0: B TEMPERATURE ≠ 0 .
(Multiple choice: Select the single best answer.)
Consider the regression results reported in TABLE 3-C on page 54 of the
text. For the purpose of hypothesis testing, what would be the null
hypothesis corresponding to the following statement: Average tire
pressure does affect the truck driver’s MPG.
H 0: B TIRE PRESSURE = 0 .
H 0: B TIRE PRESSURE ≠ 0 .
(Multiple choice: Select the single best answer.)
Consider the regression results reported in TABLE 3-B on page 50 of the
text. For the purpose of hypothesis testing, what would be the null
hypothesis corresponding to the following statement: Higher prices
decrease store revenues.
H 0: B PRICE < 0 .
H 0: B PRICE ≤ 0 .
H 0: B PRICE > 0 .
H 0: B PRICE ≥ 0 .
A)
(Multiple choice: Select the single best answer.)
Consider the regression results reported in TABLE 3-B on page 50 of the
text. For the purpose of hypothesis testing, what would be the null
hypothesis corresponding to the following statement: The number of
sale items increases store revenues.
H 0: BSALE ITEMS < 0 .
D)
H 0: BSALE ITEMS ≥ 0 .
B)
C)
H 0: BSALE ITEMS ≤ 0 .
H 0: BSALE ITEMS > 0 .
12
17.
A)
B)
C)
D)
18.
(Multiple choice: Select the single best answer.)
Consider the regression results reported in TABLE 3-C on page 54 of the
text. For the purpose of hypothesis testing, what would be the null
hypothesis corresponding to the following statement: The higher the
outside temperature, the greater the truck driver’s MPG.
H 0: B TEMPERATURE < 0 .
H 0: B TEMPERATURE ≤ 0 .
H 0: B TEMPERATURE > 0 .
H 0: B TEMPERATURE ≥ 0 .
A)
(Multiple choice: Select the single best answer.)
Consider the regression results reported in TABLE 3-C on page 54 of the
text. For the purpose of hypothesis testing, what would be the null
hypothesis corresponding to the following statement: The truck driver
gets more MPG when his tires have lower tire pressure.
H 0: B TIRE PRESSURE < 0 .
D)
H 0: B TIRE PRESSURE ≥ 0 .
B)
C)
19.
H 0: B TIRE PRESSURE ≤ 0 .
H 0: B TIRE PRESSURE > 0 .
g(Fill in the required information in the “Hypothesis Test Table” below.)
Consider the regression results reported in TABLE 3-C on page 54 of the
text. A researcher is studying the following statement: The outside
temperature does not affect the truck driver’s MPG. Complete the
corresponding “Hypothesis Test Table.”
H 0:
1)
H A:
2) LEVEL OF STATISTICAL SIGNIFICANCE =
3) STATISTICS:
4) DECISION =
13
20.
(Provide a short answer in the space below.)
In plain English, interpret the results of your hypothesis test above.
21.
(Fill in the required information in the “Hypothesis Test Table” below.)
Consider the regression results reported in TABLE 3-B on page 50 of the
text. A researcher is studying the following statement: An increase in
the number of sale items causes store revenues to increase. Complete
the corresponding “Hypothesis Test Table.”
H 0:
1)
H A:
2) LEVEL OF STATISTICAL SIGNIFICANCE =
3) STATISTICS:
4) DECISION =
22.
(Provide a short answer in the space below.)
In plain English, interpret the results of your hypothesis test above.
23.
(Fill in the required information in the “Hypothesis Test Table” below.)
Consider the regression results you obtained in Exercise #7 above. A
researcher is studying the following statement: An increase in monthly
rainfall causes Quinn to spend less money on DVD’s. Complete the
corresponding “Hypothesis Test Table.”
14
H 0:
1)
H A:
2) LEVEL OF STATISTICAL SIGNIFICANCE =
3) STATISTICS:
4) DECISION =
24.
(Provide a short answer in the space below.)
In plain English, interpret the results of your hypothesis test above.
25.
(Fill in the required information in the “Hypothesis Test Table” below.)
Consider the regression results you obtained in Exercise #7 above. A
researcher is studying the following statement: Price has no effect on
how much Quinn spends on DVD’s. Complete the corresponding
“Hypothesis Test Table.”
H 0:
1)
H A:
2) LEVEL OF STATISTICAL SIGNIFICANCE =
3) STATISTICS:
4) DECISION =
15
26.
(Provide a short answer in the space below.)
In plain English, interpret the results of your hypothesis test above.
27.
A)
B)
(Multiple choice: Select the single best answer.)
Type I error is the mistake that occurs when one rejects the null
hypothesis even though it is true.
True.
False.
A)
B)
(Multiple choice: Select the single best answer.)
Type II error is the mistake that occurs when one rejects the null
hypothesis even though it is false.
True.
False.
28.
29.
A)
B)
30.
A)
B)
31.
A)
B)
(Multiple choice: Select the single best answer.)
The larger the R2, the better the regression model fits the data.
True.
False.
(Multiple choice: Select the single best answer.)
R2 takes values between -1 and +1 ( − 1 ≤ R 2 ≤ 1 ).
True.
False.
(Multiple choice: Select the single best answer.)
As a goodness-of-fit measure, R2 has a serious problem. If a new
independent variable is added to a regression, R2 will increase even if
the new independent variable is a random number that has nothing to
do with the dependent variable.
True.
False.
16
32.
A)
B)
(Multiple choice: Select the single best answer.)
Adjusted R2, R 2 , is a better goodness-of-fit measure than R2 because it
will only increase when a new variable provides a “large” amount of
“explanatory power.”
True.
False.
17
Download