Lab #8 Demonstration

advertisement
Econ 246
March 8-12, 2010
Lab #8 Demonstration
Simple Hypothesis Tests Using EViews
Recall: The general procedure for testing hypotheses follow
5 STEPS:
STEP 1:
State the null and alternative hypotheses.
STEP 2: Determine
the Test Statistic Used To Test the
Null Hypothesis.
STEP 3:
STEP 4:
Determine the “Critical Region(s)” of the
Test
Take Your Sample and Calculate the Value
of the Test Statistic:
STEP 5:
Compare the Calculated Test Statistic With
the Critical Value and Make the Statistical
Decision
This time, we will employ EViews’
Simple Hypothesis Test
function to solve last week’s example.
1
To illustrate follow along with this example:
A Wendy’s franchise has been averaging about $5,000
worth of business on a typical Saturday. The manager,
concerned that sales are slipping, considers the average
sales for four consecutive Saturdays.
A) We established this to be a one-sided lower tailed test.
H0 :   $5000
Ha :  < $5000
B) What test statistic should you use if  is known to
equal $500? STEP 2: Determine the Test Statistic
Use Z:
Z
X

n
If
 is unknown we must use t:
X
t
s
n
.
The sample standard deviation must be determined from
the sample.
2
C) Find the critical values for X and Z, assuming that
 = 0.05. That is, find the rejection region:
 = 0.05; n=4; one-sided test.
Without a Z-table we use EViews to determine the critical
value for Z:
In the command window type: show @qnorm(0.05)
Rounding it up, -Z0.05=-1.645.
This is the critical Z-value.
This is our rejection/acceptance boundary
point. Any values to the left of -1.6448 will
lead to a rejection of the null hypothesis.
3
If we did not know the population variance, the code to
determine the critical value for the t-distribution with 3
degrees of freedom is:
show @qtdist(0.05,3)
The critical value for the t-distribution is -2.353363.
D)
What decision should be made in regard to the
hypotheses if sales are $4,200, $4,400, $5,200
and $4,800 on the four Saturdays? What
probability could be reported in this example?
In EViews, open up a new workfile and specify a range of
1 to 4.
Click on “QUICK” and “EMPTY GROUP.” Enter the four
sales figures:
4
Under View, we can directly test the null hypothesis with
this sample:
Click:
View / Tests for Descriptive Stats / Simple Hypothesis
Tests
5
A box will appear. To test whether the mean equals
5000 with a known variance and standard deviation, fill
in the box as follows:
Click OK:
The computed Z value is -1.4 (Green Arrow)
Since the computed value is to the right of the critical
value, we cannot reject the null.
6
Notice that EViews reports a TWO sided P-value. (Red
Arrow.) For this one sided test, we would divide the pvalue in half.
If the variance of the population is unknown, we would
use the sample variance to solve this problem. Looking
again at the sample statistics:
The sample standard deviation is 443.4712.
To determine the computed value and derive the p-value,
follow the same procedure as the Z-value, but use sample
standard deviation:
7
Go To:
View / Tests for Descriptive Stats / Simple Hypothesis
Tests
Fill in the box with only the mean test value.
8
The computed value is -1.578457. The critical value was
-2.353. We would not reject the null at the 5% level.
Now your exercise:
9
Download