PROBLEM 18
-The objective of this problem is to compare the output of four
different PROCs.
In this problem you will compare the output of PROC TTEST,
PROC ANOVA, PROC GLM, AND PROC NPAR1WAY run over the same set
of data. In this particular problem, the results will turn out
to be the same. From the theoretical/blackboard part of the
course, you should know WHY the various outputs are the same.
You have already had experience with PROC TTEST. PROC ANOVA is
used to run analysis of variance problems. PROC GLM can be used
to run regression problems as well as analysis of variance problems.
PROC NPAR1WAY is a nonparametric procedure that can perform a
one-way analysis of variance. PROCs NPAR1WAY, ANOVA, and GLM
provide F-statistics that will be identical. PROC TTEST will
provide a t-statistic that is equal to the F-statistics from the
other PROCs when squared.
The PROCs will be run on output data from two machines -- A and
B. The PROCs will be testing the null hypothesis that there is
no difference in the two machines, as their underlying average
outputs are the same.
THE DATA:
MACHINE A OUTPUT MACHINE B OUTPUT
47 55
53 54
49 58
50 61
46 52
Create a new dataset and use the following program to run the tests:
DATA ANOVA;
INPUT MACHINE $ OUTPUT;
CARDS;
A 47
A 53
A 49
A 50
A 46
B 55
B 54
B 58
B 61
B 52
PROC ANOVA;
CLASS MACHINE;
MODEL OUTPUT=MACHINE:
PROC GLM;
CLASS MACHINE;
MODEL OUTPUT=MACHINE;
PROC NPAR1WAY ANOVA;
CLASS MACHINE;
PROC TTEST;
CLASS MACHINE;
WRITING UP YOUR PROGRAM
Compare the results of each PROC. Reinforce your understanding by writing on the output what each PROC does and when it is used.
- Square the t-statistic and compare it to the F-statistics.
- Make sure that you explain WHY the results are the same.
- Symbolically, what are the null and alternative hypotheses?
- Are the two machines the "same" statistically?
- What is the formula for obtaining the t-statistic?
Write your analysis and conclusions on your computer output before
you hand it in.