#set document(title: "11.2 Pairwise Comparisons of Means (Post-Hoc Tests)", author: "Rachel Webb") #set page(width: 8.5in, height: auto, margin: 1in) #import "@preview/cetz:0.5.2" #set text(font: ("STIX Two Text", "Libertinus Serif", "New Computer Modern"), size: 10.5pt, lang: "en") #show math.equation: set text(font: ("STIX Two Math", "New Computer Modern Math")) #set par(justify: true, leading: 0.62em, spacing: 0.9em) #set enum(spacing: 1.1em) // room between list items so tall inline fractions don't collide #set list(spacing: 1.1em) #set table(stroke: 0.5pt + rgb("#c7ccd3")) #let BLUE = rgb("#183B6F") // brand navy — section bars + example/solution labels (white on navy 11.09:1) #let ORANGE = rgb("#A94509") // brand primary-700 — AA-safe deep orange for TEXT (5.93:1 on white; raw brand #F37021 is 2.94:1 and must never carry text) #let RED = rgb("#DC2626") // brand error-600 #let GREEN = rgb("#059669") // brand success-600 (decoration only; small green text uses green-text #007942) #show heading.where(level: 1): it => block(width: 100%, above: 0pt, below: 16pt, fill: gradient.linear(BLUE, rgb("#2C5AA0")), inset: (x: 14pt, y: 12pt), radius: 3pt, text(fill: white, weight: "bold", size: 19pt, it.body)) #show heading.where(level: 2): it => block(width: 100%, above: 18pt, below: 10pt, fill: BLUE, inset: (x: 10pt, y: 6pt), radius: 2pt, text(fill: white, weight: "bold", size: 12pt, it.body)) #show heading.where(level: 3): it => text(fill: ORANGE, weight: "bold", size: 12.5pt, it.body) #show heading.where(level: 4): it => text(fill: BLUE, weight: "bold", size: 10.5pt, it.body) #let examplebox(label, title, body) = block(width: 100%, breakable: true, fill: rgb("#EFF1F5"), stroke: 0.5pt + rgb("#CFDDF0"), radius: 4pt, inset: 10pt, above: 12pt, below: 12pt)[ #block(below: 6pt)[#box(fill: BLUE, inset: (x: 6pt, y: 2pt), radius: 2pt, text(fill: white, weight: "bold", size: 8.5pt, label)) #h(0.4em) #strong[#title]] #body] // rail = decorative left rule (raw brand token); labelcolor = AA-safe label text shade #let notebox(label, rail, labelcolor, tint, body) = block(width: 100%, breakable: true, fill: tint, stroke: (left: 3pt + rail), inset: (left: 10pt, rest: 8pt), radius: (right: 4pt), above: 11pt, below: 11pt)[ #text(fill: labelcolor, weight: "bold", size: 7.5pt, tracking: 0.5pt)[#upper(label)] #linebreak() #body] #let solutionbox(body) = block(above: 4pt, below: 8pt)[ #text(fill: BLUE, weight: "bold", size: 8.5pt)[Solution] #linebreak() #body] #let figph(msg) = block(width: 100%, height: 60pt, fill: rgb("#f6f7f9"), stroke: (paint: rgb("#c7ccd3"), dash: "dashed"), radius: 4pt, inset: 10pt)[ #align(center + horizon, text(fill: rgb("#889"), style: "italic", size: 9pt, msg))] // Standardize inlined figure sizes: measure the natural CeTZ canvas, then scale to a // consistent envelope (aspect-aware; see build_typst.py FIG_* constants). Unlike the // print preamble, dimensions are FLOORED: in an editor a user can trim a figure to a // degenerate 1-D shape (a bare line), and w/h or tw/w would then divide by zero. #let _STD_W = 3.5 #let _WIDE_W = 5.6 #let _MAX_H = 3.4 #let _ASPECT_WIDE = 2.2 #let _UPSCALE_MAX = 1.15 #let stdfig(body) = context { let m = measure(body) let w = calc.max(m.width / 1in, 0.01) let h = calc.max(m.height / 1in, 0.01) let tw = if w / h > _ASPECT_WIDE { _WIDE_W } else { _STD_W } let s = calc.min(tw / w, _MAX_H / h, _UPSCALE_MAX) align(center, box(scale(x: s * 100%, y: s * 100%, reflow: true, body))) } #show figure: set block(breakable: false) #set figure(gap: 8pt) #show figure.caption: set text(size: 8.5pt, fill: rgb("#555")) == 11.2#h(0.6em)Pairwise Comparisons of Means (Post-Hoc Tests) If you do in fact reject #math.equation(block: false, alt: "H sub 0")[$H_(0)$], then you know that at least two of the means are different. The ANOVA test does not tell which of those means are different, only that a difference exists. Most likely your sample means will be different from each other, but how different do they need to be for there to be a statistically significant difference? To determine which means are significantly different, you need to conduct further tests. These post-hoc tests include the range test, multiple comparison tests, Duncan test, Student-Newman-Keuls test, Tukey test, Scheffé test, Dunnett test, Fisher’s least significant different test, and the Bonferroni test, to name a few. There are more options, and there is no consensus on which test to use. These tests are available in statistical software packages such as R, Minitab and SPSS. One should #strong[never] use two-sample #math.equation(block: false, alt: "t")[$t$]-tests from the previous chapter. This would inflate the type I error. The probability of at least one type I error increases exponentially with the number of groups you are comparing. Let us assume that #math.equation(block: false, alt: "α equals 0.05")[$α = 0.05$], then the probability that an observed difference between two groups that does not occur by chance is #math.equation(block: false, alt: "1 minus α equals 0.95")[$1 − α = 0.95$]. If two comparisons are made, the probability that the observed difference is true is no longer 0.95. The probability is #math.equation(block: false, alt: "open parenthesis 1 minus α close parenthesis squared equals 0.9025")[$( 1 − α )^(2) = 0.9025$], and the P(Type I Error) = #math.equation(block: false, alt: "1 minus 0.9025 equals 0.0975")[$1 − 0.9025 = 0.0975$]. Therefore, the P(Type I Error) occurs if #math.equation(block: false, alt: "m")[$m$] comparisons are made is #math.equation(block: false, alt: "1 minus open parenthesis 1 minus α close parenthesis m")[$1 − ( 1 − α ) m$]. For instance, if we are comparing the means of four groups: There would be #math.equation(block: false, alt: "m equals 4 C sub 2 equals 6")[$m = 4 C_(2) = 6$] different ways to compare the 4 groups: groups (1,2), (1,3), (1,4), (2,3), (2,4), and (3,4). The P(Type I Error) = #math.equation(block: false, alt: "1 minus open parenthesis 1 minus α close parenthesis 6 equals 0.2649")[$1 − ( 1 − α ) 6 = 0.2649$]. This is why a researcher should use ANOVA for comparing means, instead of independent #math.equation(block: false, alt: "t")[$t$]-tests. There are many different methods to use. Many require special tables or software. We could actually just start with post-hoc tests, but they are a lot of work. If we run an ANOVA and we fail to reject the null hypothesis, then there is no need for further testing and it will save time if you were doing these steps by hand. Most statistical software packages give you the ANOVA table followed by the pairwise comparisons with just a change in the options menu. Keep in mind that Excel is not a statistical software and does not give pairwise comparisons. We will use the Bonferroni Test, named after the mathematician Carlo Bonferroni. The Bonferroni Test uses the t-distribution table and is similar to previous t-tests that we have used, but adjusts #math.equation(block: false, alt: "α")[$α$] to the number of comparisons being made. #figure(figph[Carlo Bonferroni portrait photograph.], alt: "Carlo Bonferroni portrait photograph.", caption: [#link("https://mathshistory.st-andrews.ac.uk/Biographies/Bonferroni/")[Carlo Bonferroni]]) The Bonferroni test is a statistical test for testing the difference between two population means (only done after an ANOVA test shows not all means are equal). The formula for the Bonferroni test statistic is #math.equation(block: false, alt: "t equals the fraction x bar sub i minus x bar sub j over the square root of open parenthesis M S W open parenthesis the fraction 1 over n sub i plus the fraction 1 over n sub j close parenthesis close parenthesis")[$t = frac(overline(x)_(i) − overline(x)_(j), sqrt(( M S W ( frac(1, n_(i)) + frac(1, n_(j)) ) )))$]. where #math.equation(block: false, alt: "x bar sub i")[$overline(x)_(i)$] and #math.equation(block: false, alt: "x bar sub j")[$overline(x)_(j)$] are the means of the samples being compared, #math.equation(block: false, alt: "n sub i")[$n_(i)$] and #math.equation(block: false, alt: "n sub j")[$n_(j)$] are the sample sizes, and #math.equation(block: false, alt: "M S W")[$M S W$] is the within-group variance from the ANOVA table. The Bonferroni test critical value or p-value is found by using the t-distribution with within degrees of freedom #math.equation(block: false, alt: "d f sub W equals N minus k")[$d f_(W) = N − k$], using an adjusted #math.equation(block: false, alt: "the fraction α over m")[$frac(α, m)$] two-tail area under the t-distribution, where #math.equation(block: false, alt: "k")[$k$] = number of groups and #math.equation(block: false, alt: "m equals k C sub 2")[$m = k C_(2)$], all the combinations of pairs out of #math.equation(block: false, alt: "k")[$k$] groups. === Critical Value Method #examplebox("Example 1")[][ According to the ANOVA test that we previously performed, there does appear to be a difference in the average age of assistant professors #math.equation(block: false, alt: "open parenthesis μ sub 1 close parenthesis")[$( μ_(1) )$], associate professors #math.equation(block: false, alt: "open parenthesis μ sub 2 close parenthesis")[$( μ_(2) )$], and full professors #math.equation(block: false, alt: "open parenthesis μ sub 3 close parenthesis")[$( μ_(3) )$] at this university. #figure(figph[Completely filled ANOVA table from Example 11-2.], alt: "Completely filled ANOVA table from Example 11-2.", caption: none) The hypotheses were: #math.equation(block: true, alt: "H sub 0 : μ sub 1 equals μ sub 2 equals μ sub 3")[$H_(0) : μ_(1) = μ_(2) = μ_(3)$] #math.equation(block: false, alt: "H sub 1 :")[$H_(1) :$] At least one mean differs. The decision was to reject #math.equation(block: false, alt: "H sub 0")[$H_(0)$], which means there is a significant difference in the mean age. The ANOVA test does not tell us, though, where the differences are. Determine which of the difference between each pair of means is significant. That is, test if #math.equation(block: false, alt: "μ sub 1 not equal to μ sub 2")[$μ_(1) ≠ μ_(2)$], if #math.equation(block: false, alt: "μ sub 1 not equal to μ sub 3")[$μ_(1) ≠ μ_(3)$], and if #math.equation(block: false, alt: "μ sub 2 not equal to μ sub 3")[$μ_(2) ≠ μ_(3)$]. #solutionbox[ The alternative hypothesis for the ANOVA was “at least one mean is different.” There will be #math.equation(block: false, alt: "3 C sub 2 equals 3")[$3 C_(2) = 3$] subsequent hypothesis tests to compare all the combinations of pairs (Group 1 vs. Group 2, Group 1 vs. Group 3, and Group 2 vs. Group 3). Note that if you have 4 groups then you would have to do #math.equation(block: false, alt: "4 C sub 2 equals 6")[$4 C_(2) = 6$] comparisons, etc. Use the t-distribution to find the critical value for the Bonferroni test. The total of all the individual sample sizes #math.equation(block: false, alt: "N equals 21")[$N = 21$] and #math.equation(block: false, alt: "k equals 3")[$k = 3$], and #math.equation(block: false, alt: "m equals 3 C sub 2 equals 3")[$m = 3 C_(2) = 3$], then the area for both tails would be #math.equation(block: false, alt: "the fraction α over m equals the fraction 0.01 over m equals 0.003333")[$frac(α, m) = frac(0.01, m) = 0.003333$]. #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ #emph[Find the Bonferroni-adjusted critical value] Opens the t-distribution with df = 18 in inverse mode. The Bonferroni adjustment splits alpha/m = 0.01/3 = 0.003333 between two tails, so the left-tail area entered is 1 - 0.0016667 = 0.9983333, giving C.V. = 3.3804 (so the critical values are +/-3.3804). Check the book's three pairwise test statistics -4.0552, -4.5958 and -0.5407 against them: only the last one fails to reject. - t(18), left-tail area 0.9983333: C.V. = 3.3804 ] This is a two-tailed test so the area in one tail is #math.equation(block: false, alt: "the fraction 0.003333 over 2")[$frac(0.003333, 2)$] with #math.equation(block: false, alt: "d f sub W equals N minus k equals 21 minus 3 equals 18")[$d f_(W) = N − k = 21 − 3 = 18$] gives #math.equation(block: false, alt: "C.V. equals ± 3.3804")[$"C.V." = ± 3.3804$]. The critical values are really far out in the tail so it is hard to see the shaded area. See Figure 11-3. #figure(figph[Graph of the t-distribution, with critical values of 3.3804 and -3.3804 marked. Also shows the calculator commands for finding the critical values.], alt: "Graph of the t-distribution, with critical values of 3.3804 and -3.3804 marked. Also shows the calculator commands for finding the critical values.", caption: [Figure 11-3: t-distribution with critical values.]) ==== Compare #math.equation(block: false, alt: "μ sub 1")[$μ_(1)$] and #math.equation(block: false, alt: "μ sub 2")[$μ_(2)$]: #math.equation(block: true, alt: "H sub 0 : μ sub 1 equals μ sub 2")[$H_(0) : μ_(1) = μ_(2)$] #math.equation(block: true, alt: "H sub 1 : μ sub 1 not equal to μ sub 2")[$H_(1) : μ_(1) ≠ μ_(2)$] The test statistic is #math.equation(block: false, alt: "t equals the fraction x bar sub 1 minus x bar sub 2 over the square root of open parenthesis M S W open parenthesis the fraction 1 over n sub 1 plus the fraction 1 over n sub 2 close parenthesis close parenthesis equals the fraction 37 minus 52 over the square root of open parenthesis 47.8889 open parenthesis the fraction 1 over 7 plus the fraction 1 over 7 close parenthesis close parenthesis equals minus 4.0552")[$t = frac(overline(x)_(1) − overline(x)_(2), sqrt(( M S W ( frac(1, n_(1)) + frac(1, n_(2)) ) ))) = frac(37 − 52, sqrt(( 47.8889 ( frac(1, 7) + frac(1, 7) ) ))) = − 4.0552$]. Compare the test statistic to the critical value. Since the test statistic #math.equation(block: false, alt: "minus 4.0552 less than critical value equals minus 3.3804")[$− 4.0552 < "critical value" = − 3.3804$], we reject #math.equation(block: false, alt: "H sub 0")[$H_(0)$]. There is enough evidence to conclude that there is a difference in the average age of assistant and associate professors. ==== Compare #math.equation(block: false, alt: "μ sub 1")[$μ_(1)$] and #math.equation(block: false, alt: "μ sub 3")[$μ_(3)$]: #math.equation(block: true, alt: "H sub 0 : μ sub 1 equals μ sub 3")[$H_(0) : μ_(1) = μ_(3)$] #math.equation(block: true, alt: "H sub 1 : μ sub 1 not equal to μ sub 3")[$H_(1) : μ_(1) ≠ μ_(3)$] The test statistic is #math.equation(block: false, alt: "t equals the fraction x bar sub 1 minus x bar sub 3 over the square root of open parenthesis M S W open parenthesis the fraction 1 over n sub 1 plus the fraction 1 over n sub 3 close parenthesis close parenthesis equals the fraction 37 minus 54 over the square root of open parenthesis 47.8889 open parenthesis the fraction 1 over 7 plus the fraction 1 over 7 close parenthesis close parenthesis equals minus 4.5958")[$t = frac(overline(x)_(1) − overline(x)_(3), sqrt(( M S W ( frac(1, n_(1)) + frac(1, n_(3)) ) ))) = frac(37 − 54, sqrt(( 47.8889 ( frac(1, 7) + frac(1, 7) ) ))) = − 4.5958$]. Compare the test statistic to the critical value. Since the test statistic #math.equation(block: false, alt: "minus 4.5958 less than critical value equals minus 3.3804")[$− 4.5958 < "critical value" = − 3.3804$], we reject #math.equation(block: false, alt: "H sub 0")[$H_(0)$]. Reject #math.equation(block: false, alt: "H sub 0")[$H_(0)$], since the test statistic is in the lower tail. There is enough evidence to conclude that there is a difference in the average age of assistant and full professors. ==== Compare #math.equation(block: false, alt: "μ sub 2")[$μ_(2)$] and #math.equation(block: false, alt: "μ sub 3")[$μ_(3)$]: #math.equation(block: true, alt: "H sub 0 : μ sub 2 equals μ sub 3")[$H_(0) : μ_(2) = μ_(3)$] #math.equation(block: true, alt: "H sub 1 : μ sub 2 not equal to μ sub 3")[$H_(1) : μ_(2) ≠ μ_(3)$] The test statistic is #math.equation(block: false, alt: "t equals the fraction x bar sub 2 minus x bar sub 3 over the square root of open parenthesis M S W open parenthesis the fraction 1 over n sub 2 plus the fraction 1 over n sub 3 close parenthesis close parenthesis equals the fraction 52 minus 54 over the square root of open parenthesis 47.8889 open parenthesis the fraction 1 over 7 plus the fraction 1 over 7 close parenthesis close parenthesis equals minus 0.5407")[$t = frac(overline(x)_(2) − overline(x)_(3), sqrt(( M S W ( frac(1, n_(2)) + frac(1, n_(3)) ) ))) = frac(52 − 54, sqrt(( 47.8889 ( frac(1, 7) + frac(1, 7) ) ))) = − 0.5407$] Compare the test statistic to the critical value. Since the test statistic is between the critical values #math.equation(block: false, alt: "minus 3.3804 less than minus 0.5407 less than 3.3804")[$− 3.3804 < − 0.5407 < 3.3804$], we fail to reject #math.equation(block: false, alt: "H sub 0")[$H_(0)$]. Do not reject #math.equation(block: false, alt: "H sub 0")[$H_(0)$], since the test statistic is between the two critical values. There is enough evidence to conclude that there is not a difference in the average age of associate and full professors. Note: you should get at least one group that has a reject #math.equation(block: false, alt: "H sub 0")[$H_(0)$], since you only do the Bonferroni test if you reject #math.equation(block: false, alt: "H sub 0")[$H_(0)$] for the ANOVA. Also, note that the transitive property does not apply. It could be that group 1 = group 2 and group 2 = group 3; this does not mean that group 1 = group 3. ] ] === P-Value Method #examplebox("Example 2")[][ A research organization tested microwave ovens. At #math.equation(block: false, alt: "α")[$α$] = 0.10, is there a significant difference in the average prices of the three types of oven? #figure(figph[Price data on 3 types of oven.], alt: "Price data on 3 types of oven.", caption: none) #solutionbox[ The ANOVA was run in Excel. #figure(figph[Excel-generated summary of oven data and ANOVA table for the data.], alt: "Excel-generated summary of oven data and ANOVA table for the data.", caption: none) To test if there is a significant difference in the average prices of the three types of oven, the hypotheses are: #math.equation(block: true, alt: "H sub 0 : μ sub 1 equals μ sub 2 equals μ sub 3")[$H_(0) : μ_(1) = μ_(2) = μ_(3)$] #math.equation(block: false, alt: "H sub 1 :")[$H_(1) :$] At least one mean differs. Use the Excel output to find the p-value in the ANOVA table of 0.001019, which is less than #math.equation(block: false, alt: "α")[$α$] so reject #math.equation(block: false, alt: "H sub 0")[$H_(0)$]; there is at least one mean that is different in the average oven prices. There is a statistically significant difference in the average prices of the three types of oven. Use the Bonferroni test p-value method to see where the differences are. ==== Compare #math.equation(block: false, alt: "μ sub 1")[$μ_(1)$] and #math.equation(block: false, alt: "μ sub 2")[$μ_(2)$]: #math.equation(block: true, alt: "H sub 0 : μ sub 1 equals μ sub 2")[$H_(0) : μ_(1) = μ_(2)$] #math.equation(block: true, alt: "H sub 1 : μ sub 1 not equal to μ sub 2")[$H_(1) : μ_(1) ≠ μ_(2)$] #math.equation(block: true, alt: "t equals the fraction x bar sub 1 minus x bar sub 2 over the square root of open parenthesis M S W open parenthesis the fraction 1 over n sub 1 plus the fraction 1 over n sub 2 close parenthesis close parenthesis equals the fraction 233.3333 minus 203.125 over the square root of open parenthesis open parenthesis 1073.794 open parenthesis the fraction 1 over 6 plus the fraction 1 over 8 close parenthesis close parenthesis equals 1.7070")[$t = frac(overline(x)_(1) − overline(x)_(2), sqrt(\( M S W \( frac(1, n_(1)) + frac(1, n_(2)) \) \))) = frac(233.3333 − 203.125, sqrt(\( \( 1073.794 \( frac(1, 6) + frac(1, 8) \) \))) = 1.7070$] To find the p-value, find the area in both tails and multiply this area by #math.equation(block: false, alt: "m")[$m$]. The area to the right of #math.equation(block: false, alt: "t equals 1.707")[$t = 1.707$], using #math.equation(block: false, alt: "d f sub W equals 19")[$d f_(W) = 19$], is 0.0520563. Remember these are always two-tail tests, so multiply this area by 2, to get both tail areas of 0.104113. #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ #emph[Reproduce the three Bonferroni p-values] Each link opens the t-distribution with df = 19 showing the right-tail area beyond one pairwise test statistic. Do the last steps yourself: double the tail area, then multiply by m = 3 comparisons (cap at 1). The first gives 0.0520563 x 2 x 3 = 0.3123, matching the SPSS Sig. column in Figure 11-4. - P(T \> 1.707) = 0.0520563, x2 x3 -\> p-value = 0.3123 - t = 4.3910: P(T \> 4.391) = 0.0001570, x2 x3 -\> p-value = 0.00094 - t = 2.8991: P(T \> 2.8991) = 0.0045984, x2 x3 -\> p-value = 0.0276 ] #figure(figph[Using a calculator to find the area under the curve to the right of t=1.707, using the tcdf function, and multiply it by 2.], alt: "Using a calculator to find the area under the curve to the right of t=1.707, using the tcdf function, and multiply it by 2.", caption: none) Then multiply this area by #math.equation(block: false, alt: "m equals 3 C sub 2 equals 3")[$m = 3 C_(2) = 3$] to get a p-value = 0.3123. #figure(figph[Multiplying the area under both tails by m=3 to find the p-value.], alt: "Multiplying the area under both tails by m=3 to find the p-value.", caption: none) Since the p-value = #math.equation(block: false, alt: "0.3123 greater than α equals 0.10")[$0.3123 > α = 0.10$], we do not reject #math.equation(block: false, alt: "H sub 0")[$H_(0)$]. There is a statistically significant difference in the average price of the 1,000- and 900-watt ovens. ==== Compare #math.equation(block: false, alt: "μ sub 1")[$μ_(1)$] and #math.equation(block: false, alt: "μ sub 3")[$μ_(3)$]: #math.equation(block: true, alt: "H sub 0 : μ sub 1 equals μ sub 3")[$H_(0) : μ_(1) = μ_(3)$] #math.equation(block: true, alt: "H sub 1 : μ sub 1 not equal to μ sub 3")[$H_(1) : μ_(1) ≠ μ_(3)$] #math.equation(block: true, alt: "t equals the fraction x bar sub 1 minus x bar sub 3 over the square root of open parenthesis M S W open parenthesis the fraction 1 over n sub 1 plus the fraction 1 over n sub 3 close parenthesis close parenthesis equals the fraction 233.3333 minus 155.625 over the square root of open parenthesis open parenthesis 1073.794 open parenthesis the fraction 1 over 6 plus the fraction 1 over 8 close parenthesis close parenthesis equals 4.3910")[$t = frac(overline(x)_(1) − overline(x)_(3), sqrt(\( M S W \( frac(1, n_(1)) + frac(1, n_(3)) \) \))) = frac(233.3333 − 155.625, sqrt(\( \( 1073.794 \( frac(1, 6) + frac(1, 8) \) \))) = 4.3910$] Use #math.equation(block: false, alt: "d f sub W")[$d f_(W)$] = 19 to find the p-value. #figure(figph[Using a calculator to find the area under both tails, and multiplying by m=3 to find the p-value.], alt: "Using a calculator to find the area under both tails, and multiplying by m=3 to find the p-value.", caption: none) Since the p-value = (tail areas)\*3 = #math.equation(block: false, alt: "0.00094 less than α equals 0.10")[$0.00094 < α = 0.10$], we reject #math.equation(block: false, alt: "H sub 0")[$H_(0)$]. There is a statistically significant difference in the average price of the 1,000- and 800-watt ovens. ==== Compare #math.equation(block: false, alt: "μ sub 2")[$μ_(2)$] and #math.equation(block: false, alt: "μ sub 3")[$μ_(3)$]: #math.equation(block: true, alt: "H sub 0 : μ sub 2 equals μ sub 3")[$H_(0) : μ_(2) = μ_(3)$] #math.equation(block: true, alt: "H sub 1 : μ sub 2 not equal to μ sub 3")[$H_(1) : μ_(2) ≠ μ_(3)$] #math.equation(block: true, alt: "t equals the fraction x bar sub 2 minus x bar sub 3 over the square root of open parenthesis M S W open parenthesis the fraction 1 over n sub 2 plus the fraction 1 over n sub 3 close parenthesis close parenthesis equals the fraction 203.125 minus 155.625 over the square root of open parenthesis open parenthesis 1073.794 open parenthesis the fraction 1 over 8 plus the fraction 1 over 8 close parenthesis close parenthesis equals 2.8991")[$t = frac(overline(x)_(2) − overline(x)_(3), sqrt(\( M S W \( frac(1, n_(2)) + frac(1, n_(3)) \) \))) = frac(203.125 − 155.625, sqrt(\( \( 1073.794 \( frac(1, 8) + frac(1, 8) \) \))) = 2.8991$] Use #math.equation(block: false, alt: "d f sub W equals 19")[$d f_(W) = 19$] to find the p-value (remember that these are always two-tail tests). #figure(figph[Using a calculator to find the area of both tails and multiplying it by m=3 to find the p-value.], alt: "Using a calculator to find the area of both tails and multiplying it by m=3 to find the p-value.", caption: none) Since the p-value = #math.equation(block: false, alt: "0.0276 less than α equals 0.10")[$0.0276 < α = 0.10$], we reject #math.equation(block: false, alt: "H sub 0")[$H_(0)$]. There is a statistically significant difference in the average price of the 900- and 800-watt ovens. There is a chance that after we multiply the area by the number of comparisons, the p-value would be greater than one. However, since the p-value is a probability we would cap the probability at one. This is a lot of math! The calculators and Excel do not have post-hoc pairwise comparisons shortcuts, but we can use the statistical software called SPSS to get the following results. We will look specifically at interpreting the SPSS output for Example 11-4. #figure(figph[Tables of Descriptives and ANOVA for the Example 11-4 data, generated in SPSS], alt: "Tables of Descriptives and ANOVA for the Example 11-4 data, generated in SPSS", caption: none) #figure(figph[SPSS-generated Multiple Comparisons table for microwave data.], alt: "SPSS-generated Multiple Comparisons table for microwave data.", caption: [Figure 11-4: Multiple Comparisons table.]) The first table, labeled "Descriptives", gives descriptive statistics; the second table is the ANOVA table, and note that the p-value is in the column labeled Sig. The Multiple Comparisons table is where we want to look. There are repetitive pairs in the last table, just in a different order. The first two rows in Figure 11-4 are comparing group 1 with groups 2 and 3. If we follow the first row across under the Sig. column, this gives the p-value = 0.312 for comparing the 1,000- and 900-watt ovens. #figure(figph[First row of the table in Figure 11-4, comparing the 1000-Watt oven to the 900-Watt oven.], alt: "First row of the table in Figure 11-4, comparing the 1000-Watt oven to the 900-Watt oven.", caption: none) The second row in Figure 11-4 compares the 1,000- and 800-watt ovens, p-value = 0.001. #figure(figph[First two rows of Figure 11-4, comparing the 1000-Watt oven to the 900- and 800-Watt ovens.], alt: "First two rows of Figure 11-4, comparing the 1000-Watt oven to the 900- and 800-Watt ovens.", caption: none) The third row in Figure 11-4 compares the 900- and 1000-watt ovens in the reverse order as the first row; note that the difference in the means is negative but the p-value is the same. #figure(figph[Third row in Figure 11-4, comparing the 900-Watt oven to the 1000-Watt oven.], alt: "Third row in Figure 11-4, comparing the 900-Watt oven to the 1000-Watt oven.", caption: none) The fourth row in Figure 11-4 compares the 900- and 800-watt ovens, p-value = 0.028. #figure(figph[Third and fourth rows of Figure 11-4, comparing the 900-Watt oven to the 1000-Watt and 800-Watt ovens.], alt: "Third and fourth rows of Figure 11-4, comparing the 900-Watt oven to the 1000-Watt and 800-Watt ovens.", caption: none) The last set of rows in Figure 11-4 are again repetitive and give the 800-watt oven compared to the 900- and 1000-watt ovens. Keep in mind that post-hoc is defined as occurring after an event. A post-hoc test is done after an ANOVA test shows that there is a statistically significant difference. You should get at least one group that has a result of "reject #math.equation(block: false, alt: "H sub 0")[$H_(0)$]", since you only do the Bonferroni test if you reject #math.equation(block: false, alt: "H sub 0")[$H_(0)$] for the ANOVA. ] ]