In: Statistics and Probability
You want to see if three different cafes yield different costs for a lunch meal for a week. You randomly select five measurements from trials on an automated driving machine for each cafe. At the 0.05 significance level, is there a difference among cafes in mean lunch meal cost? Test this claim showing all calculation steps clearly in the Ms World file (25P) and draw an ANOVA Table for the solution
Cafe 1 35 23 34 34 39
Cafe 2 20 28 26 22 18
Cafe 3 25 25 34 38 42
Null Hypothesis: There is no difference between cafes in mean lunch cost.
Alternative Hypothesis: There is a difference between at least one pair of cafes.
Level of significance:
Let us calulate the Totals and squares for getting teh sum of squares in the ANOVA table.
Total | ||||||
Cafe 1 | 35 | 23 | 34 | 34 | 39 | 165 |
Cafe 2 | 20 | 28 | 26 | 22 | 18 | 114 |
Cafe 3 | 25 | 25 | 34 | 38 | 42 | 164 |
443 |
Let us denote be denoted by the observation at the cafe.
There are k=3 cafes and n=3*5=15 observations in total.
1. Correction factor:
2. Total sum of squares:
We need the individual square and the sum. Let us use the following table of squares and then add up teh values:
Cafe 1 | 1225 | 529 | 1156 | 1156 | 1521 | |
Cafe 2 | 400 | 784 | 676 | 484 | 324 | |
Cafe 3 | 625 | 625 | 1156 | 1444 | 1764 | |
13869 |
3. Sum of squares due to cafe:
4. Error Sum of squares:
5. Degrees of freedom:
Total=15-1=14
Cafes:3-1=2
Error df=14-2=12
We shall now form the ANOVA table:
Source of Variation | SS | df | MS | F | P-value | F crit |
Between Cafes | 340.1333 | 2 | 170.0667 | 4.579892 | 0.033267 | 3.885294 |
Error | 445.6 | 12 | 37.13333 | |||
Total | 785.7333 | 14 |
Decision: From the ANOVA table above, we see that the p-value is 0.033<0.05 and hence we reject the Null hypothesis. Hence, we conclude that there is enough evidence to claim that there is a significant difference between at least two cafes.