In: Statistics and Probability
Use PROC GLM in SAS to test whether the mean number of insect deaths differs across insectide types. Use alpha= 0.05, and justify your answer by referring to either a test statistic value and table value, or by referring to a P-value.
data insectdeaths; input INSECTICIDE $ DEAD; cards; A 85 B 90 C 93 D 98 A 82 B 92 C 94 D 98 A 83 B 90 C 96 D 100 A 88 B 91 C 95 D 97 A 89 B 93 C 96 D 97 A 92 B 81 C 94 D 99 ; run;
Treat insecticides as a grouping variable using class statement in proc glm
use model statement
Ho:
he mean number of insect deaths are same across insectide types.
Ha:
The mean number of insect deaths differs across insectide types.
SAS code:
data insectdeaths;
input INSECTICIDE $ DEAD;
cards;
A 85
B 90
C 93
D 98
A 82
B 92
C 94
D 98
A 83
B 90
C 96
D 100
A 88
B 91
C 95
D 97
A 89
B 93
C 96
D 97
A 92
B 81
C 94
D 99
;
run;
proc glm data = insectdeaths;
class INSECTICIDE ;
model DEAD = INSECTICIDE ;
means INSECTICIDE ;
run;
Output;
The GLM Procedure
| Class Level Information | ||
|---|---|---|
| Class | Levels | Values |
| INSECTICIDE | 4 | A B C D |
| Number of Observations Read | 24 |
|---|---|
| Number of Observations Used | 24 |
The GLM Procedure
Dependent Variable: DEAD
| Source | DF | Sum of Squares | Mean Square | F Value | Pr > F |
|---|---|---|---|---|---|
| Model | 3 | 488.7916667 | 162.9305556 | 17.99 | <.0001 |
| Error | 20 | 181.1666667 | 9.0583333 | ||
| Corrected Total | 23 | 669.9583333 |
| R-Square | Coeff Var | Root MSE | DEAD Mean |
|---|---|---|---|
| 0.729585 | 3.264029 | 3.009707 | 92.20833 |
| Source | DF | Type I SS | Mean Square | F Value | Pr > F |
|---|---|---|---|---|---|
| INSECTICIDE | 3 | 488.7916667 | 162.9305556 | 17.99 | <.0001 |
| Source | DF | Type III SS | Mean Square | F Value | Pr > F |
|---|---|---|---|---|---|
| INSECTICIDE | 3 | 488.7916667 | 162.9305556 | 17.99 | <.0001 |

The GLM Procedure

| Level of INSECTICIDE |
N | DEAD | |
|---|---|---|---|
| Mean | Std Dev | ||
| A | 6 | 86.5000000 | 3.83405790 |
| B | 6 | 89.5000000 | 4.32434966 |
| C | 6 | 94.6666667 | 1.21106014 |
| D | 6 | 98.1666667 | 1.16904519 |
since F=17.99,p<.0001,
p<0.05
Reject Ho that all the 4 type insecticides means are equal
and conclude that there is sufficient evidence at 5% level of significance that
he mean number of insect deaths differs across insectide types.