In: Statistics and Probability
Traditional ANOVA is usually used when our categorical predictor variable has more than two categories. It works for two categories, it's just that there is a simpler technique for that -- two-sample t. To show ANOVA works for two categories, see if pulse rate before depends on Sex.
PuBefore | PuAfter | Ran? | Smokes? | Sex | Height | Weight | ActivityL | |
48 | 54 | no | yes | male | 68 | 150 | 1 | |
54 | 56 | no | yes | male | 69 | 145 | 2 | |
54 | 50 | no | no | male | 69 | 160 | 2 | |
58 | 70 | yes | no | male | 72 | 145 | 2 | |
58 | 58 | no | no | male | 66 | 135 | 3 | |
58 | 56 | no | no | female | 67 | 125 | 2 | |
60 | 76 | yes | no | male | 71 | 170 | 3 | |
60 | 62 | no | no | male | 71 | 155 | 2 | |
60 | 70 | no | yes | male | 71.5 | 164 | 2 | |
60 | 66 | no | no | female | 62 | 120 | 2 | |
61 | 70 | no | no | female | 65.5 | 120 | 2 | |
62 | 76 | yes | yes | male | 73.5 | 160 | 3 | |
62 | 75 | yes | no | male | 72 | 195 | 2 | |
62 | 58 | yes | no | male | 72 | 175 | 3 | |
62 | 100 | yes | no | female | 66 | 120 | 2 | |
62 | 98 | yes | yes | female | 62.75 | 112 | 2 | |
62 | 62 | no | no | male | 74 | 190 | 1 | |
62 | 66 | no | no | male | 70 | 155 | 2 | |
62 | 68 | no | yes | male | 73 | 155 | 2 | |
62 | 66 | no | no | female | 65 | 122 | 3 | |
64 | 88 | yes | no | male | 66 | 140 | 2 | |
64 | 80 | yes | no | male | 69 | 155 | 2 | |
64 | 62 | no | no | male | 75 | 160 | 3 | |
64 | 60 | no | no | female | 66 | 130 | 3 | |
66 | 78 | yes | yes | male | 73 | 190 | 1 | |
66 | 82 | yes | yes | male | 69 | 175 | 2 | |
66 | 102 | yes | no | male | 70 | 130 | 2 | |
66 | 72 | no | no | female | 66 | 125 | 2 | |
66 | 76 | no | no | female | 65 | 115 | 2 | |
68 | 72 | yes | no | male | 74 | 190 | 2 | |
68 | 76 | yes | no | male | 67 | 145 | 2 | |
68 | 76 | yes | yes | male | 74 | 180 | 2 | |
68 | 112 | yes | no | female | 70 | 125 | 2 | |
68 | 66 | no | yes | male | 67 | 150 | 2 | |
68 | 68 | no | no | male | 71 | 150 | 3 | |
68 | 64 | no | no | male | 69.5 | 150 | 3 | |
68 | 68 | no | no | male | 72 | 142 | 3 | |
68 | 66 | no | no | male | 68 | 155 | 2 | |
68 | 68 | no | no | female | 69 | 150 | 2 | |
68 | 68 | no | no | female | 62 | 110 | 2 | |
70 | 72 | yes | yes | male | 73 | 170 | 3 | |
70 | 106 | yes | no | male | 71 | 170 | 2 | |
70 | 94 | yes | yes | male | 75 | 185 | 2 | |
70 | 62 | no | yes | male | 66 | 130 | 2 | |
70 | 70 | no | no | male | 70 | 150 | 2 | |
70 | 66 | no | yes | male | 75 | 190 | 2 | |
72 | 80 | yes | no | male | 66 | 135 | 3 | |
72 | 74 | no | yes | male | 69 | 170 | 2 | |
72 | 74 | no | yes | male | 68 | 155 | 3 | |
72 | 70 | no | no | male | 71 | 140 | 2 | |
72 | 70 | no | no | female | 63 | 118 | 2 | |
72 | 68 | no | no | female | 68 | 110 | 2 | |
74 | 84 | yes | no | male | 73 | 165 | 1 | |
74 | 76 | yes | no | male | 70 | 157 | 2 | |
74 | 70 | no | no | male | 73 | 155 | 3 | |
74 | 74 | no | no | male | 73 | 155 | 2 | |
74 | 76 | no | no | male | 67 | 123 | 2 | |
76 | 118 | yes | no | male | 71 | 138 | 2 | |
76 | 76 | no | no | male | 72 | 215 | 2 | |
76 | 76 | no | no | male | 74 | 148 | 3 | |
76 | 76 | no | yes | female | 62 | 108 | 3 | |
76 | 76 | no | no | female | 61.75 | 108 | 2 | |
78 | 104 | yes | yes | female | 68 | 130 | 2 | |
78 | 118 | yes | no | female | 69 | 145 | 2 | |
78 | 76 | no | no | male | 72 | 180 | 3 | |
78 | 78 | no | no | female | 67 | 115 | 2 | |
78 | 80 | no | no | female | 68 | 133 | 1 | |
80 | 96 | yes | no | male | 72 | 155 | 2 | |
80 | 128 | yes | no | female | 68 | 125 | 2 | |
80 | 74 | no | no | female | 64 | 102 | 2 | |
82 | 100 | yes | no | female | 68 | 138 | 2 | |
82 | 84 | no | yes | male | 73 | 180 | 2 | |
82 | 80 | no | no | female | 63 | 116 | 1 | |
84 | 84 | yes | no | male | 72 | 150 | 3 | |
84 | 84 | no | no | male | 69 | 136 | 2 | |
84 | 84 | no | no | female | 66 | 130 | 2 | |
84 | 80 | no | no | female | 65 | 118 | 1 | |
86 | 84 | no | no | female | 67 | 150 | 3 | |
87 | 84 | no | no | female | 63 | 95 | 3 | |
88 | 110 | yes | yes | female | 69 | 150 | 2 | |
88 | 84 | no | no | male | 73.5 | 155 | 2 | |
88 | 74 | no | yes | female | 65 | 135 | 2 | |
90 | 94 | yes | yes | male | 74 | 160 | 1 | |
90 | 88 | no | yes | male | 67 | 140 | 2 | |
90 | 90 | no | no | male | 68 | 145 | 1 | |
90 | 92 | no | yes | female | 64 | 125 | 1 | |
92 | 84 | yes | yes | male | 70 | 153 | 3 | |
92 | 94 | no | yes | male | 69 | 150 | 2 | |
94 | 92 | no | yes | female | 62 | 131 | 2 | |
96 | 140 | yes | no | female | 61 | 140 | 2 | |
96 | 116 | yes | no | female | 68 | 116 | 2 | |
100 | 115 | yes | yes | female | 63 | 121 | 2 | |
Running a One way ANOVA, using excel, to test whether pulse rate before depends on Sex. Let denote the mean 'Pulse rate before' of Males and Frmales respectively.
We have to test:
H0: Pulse rate before has no dependency on Sex Ha: Pulse rate before depends on Sex
i.e
Vs
Running a One way ANOVA
We get the output:
We find that the ANOVA is significant with F = 7.98, p-value = 0.006 < 0.06. We may reject H0 at 5% level. We ,may arrve at the conclusion that the data provides sufficient evidence to support the claim that pulse rate before depends on Sex.
To verify, by running an independene sample t test:
We get the output:
We arrive at the same conclusion, where the test is found to be significant with t = 2.825, p-value = 0.006< 0.05.