Do pairwise t tests on the cafeteria groups and determine which pairs are differ
ID: 3319638 • Letter: D
Question
Do pairwise t tests on the cafeteria groups and determine which pairs are different. Use the Holm method (default method in R) of adjustment for the p-values to compensate for multiple comparisons. Use an adjusted p-value of 0.05 as a criterion.
DATASET: cafebacteria
"bacteria" "cafeteria" "brand"
6.092 1 1
5.81 1 1
4.504 1 2
4.346 1 2
5.163 1 3
2.723 1 3
4.671 1 4
3.051 1 4
2.515 1 5
5.338 2 1
7.673 2 1
5.16 2 2
8.007 2 2
5.639 2 3
5.48 2 3
4.963 2 4
2.917 2 4
3.396 2 5
3.834 2 5
1.179 3 1
5.28 3 1
1.734 3 2
4.078 3 2
1.397 3 3
2.802 3 3
5 3 4
2.441 3 4
4.669 3 5
3.274 3 5
5.515 4 1
5.372 4 1
8.204 4 2
6.282 4 2
5.515 4 3
3.453 4 3
6.657 4 4
9.986 4 4
4.273 4 5
4.967 4 5
5.649 5 1
6.097 5 1
5.037 5 2
4.634 5 2
4.92 5 3
3.947 5 3
4.984 5 4
4.398 5 4
3.947 5 5
3.951 5 5
4.902 6 1
4.605 6 1
4.73 6 2
3.039 6 2
4.429 6 3
2.801 6 3
4.501 6 4
5.68 6 4
7.284 6 5
4.031 6 5
10.022 7 1
10.105 7 1
6.114 7 2
8.968 7 2
7.199 7 3
9.023 7 3
6.673 7 4
3.101 7 4
5.964 7 5
7.245 7 5
8.636 8 1
7.551 8 1
5.407 8 2
8.131 8 2
4.138 8 3
4.684 8 3
4.607 8 4
5.975 8 4
0.461 8 5
0.873 8 5
8.237 9 1
6.551 9 1
6.539 9 2
7.208 9 2
4.84 9 3
4.813 9 3
5.541 9 4
5.338 9 4
3.675 9 5
6.958 9 5
7.34 10 1
6.914 10 1
6.979 10 2
4.537 10 2
6.149 10 3
6.177 10 3
3.589 10 4
6.997 10 4
4.218 10 5
4.814 10 5
Explanation / Answer
Pairwise t tests on the cafeteria groups and determine which pairs are different. Using the Holm method (default method in R) of adjustment for the p-values to compensate for multiple comparisons is:
> pairwise.t.test(cafebacteria$bacteria, cafebacteria$cafeteria)
Pairwise comparisons using t tests with pooled SD
data: cafebacteria$bacteria and cafebacteria$cafeteria
1 2 3 4 5 6 7 8 9
2 1.0000 - - - - - - - -
3 1.0000 0.2898 - - - - - - -
4 1.0000 1.0000 0.0136 - - - - - -
5 1.0000 1.0000 1.0000 1.0000 - - - - -
6 1.0000 1.0000 1.0000 1.0000 1.0000 - - - -
7 0.0056 0.1725 1e-05 1.0000 0.0254 0.0136 - - -
8 1.0000 1.0000 0.5619 1.0000 1.0000 1.0000 0.0822 - -
9 1.0000 1.0000 0.0168 1.0000 1.0000 1.0000 1.0000 1.0000 -
10 1.0000 1.0000 0.0380 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
P value adjustment method: holm
Using 0.05 as a criteria,
the pairs of acfeteria which have a significant difference in means of bacteria count are those with a p-value < 0.05 in the above table.
Thus, the following pairs of cafeteria have a significant difference in means of bacteria count:
cafeteria 3 and cafeteria 4
cafeteria 3 and cafeteria 7
cafeteria 3 and cafeteria 9
cafeteria 3 and cafeteria 10
cafeteria 5 and cafeteria 7
cafeteria 6 and cafeteria 7
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.