In: Statistics and Probability
1-way ANOVA test
A researcher hypothesized that if people were to use his newly-developed caffeine pill, that they would have more energy and have a better attention span throughout the day, but not feel jittery at night. To test his hypothesis, he gathered 30 participants and randomly assigned them to one of 3 conditions: a placebo condition (0mg) in which they were given a sugar pill, a 50mg condition, or a 100mg condition. Each participant was made to stay awake the night before and given one of the three pills to take the next morning. That night, the participants were asked to rate their energy level from 1 (no energy) to 10 (high energy).
Data Set:
LAB 7: 1-way ANOVA | ||
Placebo | 50mg | 100mg |
7 | 4 | 8 |
4 | 6 | 5 |
7 | 6 | 4 |
5 | 3 | 6 |
6 | 6 | 7 |
8 | 7 | 4 |
5 | 8 | 3 |
3 | 4 | 6 |
6 | 3 | 7 |
3 | 7 | 8 |
Null hypotheses H0 : The average energy level rating is equal for all three conditions - sugar pill, a 50mg condition, or a 100mg condition.
Alternative hypotheses H1 : At least one average energy level rating is different in all three conditions - sugar pill, a 50mg condition, or a 100mg condition.
Level of significance = 0.05
Degree of freedom of group = Number of level - 1 = 3 - 1 = 2
Degree of freedom of error = Number of observations - Number of level = 30 - 3 = 27
Critical value of F at DF = 2,27 is 3.35
Let Ti be the total ratings for condition i, ni be number of observations of condition i.
Let G be the total ratings of all observations and N be total number of observations.
ΣX^2 is sum of squares of all observations for each condition
T1 = 54, T2 = 54 , T3 = 58
G = 54 + 54 + 58 = 166
ΣX^2 = 318 + 320 + 364 = 1002
SST = ΣX^2 - G^2/N = 1002 - 166^2/30 = 83.46667
SSTR = ΣT^2/n - G^2/N = (54^2 /10 + 54^2 /10 + 58^2 /10 ) - 166^2/30 = 30.08
SSE = 83.46667 - 1.066667 = 82.4
MSTR = SSTR / DF Group = 1.066667 / 2 = 0.5333335
MSE = SSE / DF Error = 82.4 / 27 = 3.051852
Test statistic, F = MSTR / MSE = 0.5333335 / 3.051852 = 0.1748
Since the observed F (0.1748) is less than the critical value (3.35), we fail to reject the null hypothesis H0 and conclude that there is no strong evidence to believe that the average energy level rating is different for all three conditions - sugar pill, a 50mg condition, or a 100mg condition.