9  Two-Factor ANOVA

Sample Problems

9.1 About

the factorial ANOVA problems use the FactorialData class which requires:

  • a tuple to specify the levels of each factor - (factor A, factor B)
  • the sample size per group - all groups will have the same sample size

Each of the problems below sets factor levels randomly with 2 or 3 levels. Per-group sample size is randomly set between 5 and 15. An example funciton call is included below

levels_factor_a = random.randint(2,3)
levels_factor_b = random.randint(2,3)
n = random.randint(5,15)
FactorialData(design = (levels_factor_a, levels_factor_b), group_n = n).factorial_ANOVA()

9.2 Problem 1

Given the following data, use a use a 2-Factor ANOVA with \(\alpha = {0.01}\) to analyze the following data


Full Group Summary Data
\(T_{A1B1} = {166} \quad M_{A1B1} = {20.75}\quad SS_{A1B1} = {259.5} \quad n_{A1B1} = {8}\)
\(T_{A1B2} = {150} \quad M_{A1B2} = {18.75}\quad SS_{A1B2} = {197.5} \quad n_{A1B2} = {8}\)
\(T_{A2B1} = {197} \quad M_{A2B1} = {24.62}\quad SS_{A2B1} = {175.88} \quad n_{A2B1} = {8}\)
\(T_{A2B2} = {161} \quad M_{A2B2} = {20.12}\quad SS_{A2B2} = {262.88} \quad n_{A2B2} = {8}\)
\(\Sigma X^2 = {15244}\)
\(G = {674}\)

Stage 1 ANOVA Calculations

Calculate the Degrees of Freedom: \(df_{total}, df_{within}, \text{ and } df_{between}\)

\(df_{total} = N - 1\)

\(df_{total} = {32} - 1\)

\(df_{total} = {31}\)


\(df_{between} = k - 1\)

\(df_{between} = {4} - 1\)

\(df_{between} = {3}\)


\(df_{within} = N - K\)

\(df_{within} = {32} - {4}\)

\(df_{within} = {28}\)


Calculate the Sum of Squares: \(SS_{total}, SS_{within}, \text{ and } SS_{between}\)

\(SS_{total} = \Sigma X^2 - \frac{G^2}{N}\)

\(SS_{total} = {15244} - \frac{674^2}{32}\)

\(SS_{total} = {15244} - \frac{454276}{32}\)

\(SS_{total} = {15244} - {14196.12}\)

\(SS_{total} = {1047.88}\)


\(SS_{within} = \Sigma SS_{inside\_each\_condition}\)

\(SS_{within} = {259.5 + 197.5 + 175.88 + 262.88}\)

\(SS_{within} = {895.76}\)


\(SS_{between} = SS_{total} - SS_{within}\)

\(SS_{between} = {1047.88} - {895.76}\)

\(SS_{between} = {152.12}\)


note: the other way to calculate \(SS_{betwen}\) is:

\(SS_{between} = \Sigma{\frac{T^2}{n}} - \frac{G^2}{N}\)




Stage 2 calculations for \(Factor_A\)

Summary Data for Factor_A
\(T_{A_1} = {316} \quad n_{A_1} = {16}\)
\(T_{A_2} = {358} \quad n_{A_2} = {16}\)

State the Hypotheses
\(H_0: \mu_1 = \mu_2\)
\(H_1: \mu_1 \ne \mu_2\)

partition df for \(Factor_A\)

\(df_{Factor_A} = k_{Factor_A} - 1\)

\(df_{Factor_A} = {2} - 1\)

\(df_{Factor_A} = {1}\)


The decision criteria:

\(F_{crit} = {7.64}, \alpha = {0.01}\)

Partition the SS for \(Factor_A\)

Calculate \(SS_{Factor_A}\)

\(\Sigma{\frac{{T_{Factor_A}}^2}{n_{Factor_A}}} - \frac{G^2}{N}\)

\(SS_{Factor_A} = {\frac{{316}^2}{16} + \frac{{358}^2}{16}} - \frac{{674}^2}{32}\)

\(SS_{Factor_A} = {\frac{{99856}}{16} + \frac{{128164}}{16}} - \frac{{454276}}{32}\)

\(SS_{Factor_A} = {{6241.0} + {8010.25}} - {14196.12}\)

\(SS_{Factor_A} = {14251.25} - {14196.12}\)

\(SS_{Factor_A} = {55.13}\)

Mean Squares for \({Factor_A}\)

\(MS_{Factor_A} = \frac{SS_{Factor_A}}{df_{Factor_A}}\)

\(MS_{Factor_A} = \frac{55.13}{1}\)

\(MS_{Factor_A} = {55.13}\)

Calculate the F-Ratio for \({Factor_A}\)

\(F_{Factor_A} = \frac{MS_{Factor_A}}{MS_{Within}}\)

\(F_{Factor_A} = \frac{55.13}{31.99}\)

\(F_{Factor_A} = {1.72}\)


Calculate \(\eta_p^2 \text{ for } Factor_A\)

\(\eta_p^2 = \frac{{SS_{{Factor_A}}}}{{SS_{{Total}} - SS_{{Factor_B}} - SS_{{AxB}}}}\)

\(\eta_p^2 = \frac{55.13}{{1047.88} - {84.5} - {12.49}}\)

\(\eta_p^2 = \frac{55.13}{950.89}\)

\(\eta_p^2 = {0.06}\)

The results:

fail to reject the null hypothesis, results not significant,

\(F({1}, {28}) = {1.72}, p > {0.01}, \eta_p^2 = {0.06}\)



Stage 2 calculations for \(Factor_B\)

Summary Data for Factor_B
\(T_{B_1} = {363} \quad n_{B_1} = {16}\)
\(T_{B_2} = {311} \quad n_{B_2} = {16}\)

State the Hypotheses
\(H_0: \mu_1 = \mu_2\)
\(H_1: \mu_1 \ne \mu_2\)

partition df for \(Factor_B\)

\(df_{Factor_B} = k_{Factor_B} - 1\)

\(df_{Factor_B} = {2} - 1\)

\(df_{Factor_B} = {1}\)


The decision criteria:

\(F_{crit} = {7.64}, \alpha = {0.01}\)

Partition the SS for \(Factor_B\)

Calculate \(SS_{Factor_B}\)

\(\Sigma{\frac{{T_{Factor_B}}^2}{n_{Factor_B}}} - \frac{G^2}{N}\)

\(SS_{Factor_B} = {\frac{{363}^2}{16} + \frac{{311}^2}{16}} - \frac{{674}^2}{32}\)

\(SS_{Factor_B} = {\frac{{131769}}{16} + \frac{{96721}}{16}} - \frac{{454276}}{32}\)

\(SS_{Factor_B} = {{8235.56} + {6045.06}} - {14196.12}\)

\(SS_{Factor_B} = {14280.62} - {14196.12}\)

\(SS_{Factor_B} = {84.5}\)

Mean Squares for \({Factor_B}\)

\(MS_{Factor_B} = \frac{SS_{Factor_B}}{df_{Factor_B}}\)

\(MS_{Factor_B} = \frac{84.5}{1}\)

\(MS_{Factor_B} = {84.5}\)

Calculate the F-Ratio for \({Factor_B}\)

\(F_{Factor_B} = \frac{MS_{Factor_B}}{MS_{Within}}\)

\(F_{Factor_B} = \frac{84.5}{31.99}\)

\(F_{Factor_B} = {2.64}\)


Calculate \(\eta_p^2 \text{ for } Factor_B\)

\(\eta_p^2 = \frac{{SS_{{Factor_B}}}}{{SS_{{Total}} - SS_{{Factor_A}} - SS_{{AxB}}}}\)

\(\eta_p^2 = \frac{84.5}{{1047.88} - {55.13} - {12.49}}\)

\(\eta_p^2 = \frac{84.5}{980.26}\)

\(\eta_p^2 = {0.09}\)

The results:

fail to reject the null hypothesis, results not significant,

\(F({1}, {28}) = {2.64}, p > {0.01}, \eta_p^2 = {0.09}\)



Stage 2 calculations for the \(AxB\) interaction


State the Hypotheses
\(H_0:\) There is no AxB interation
\(H_1:\) There is an AxB interaction

Partition df for the interaction

\(df_{AxB} = df_{Between} -df_{Factor_A} - df_{Factor_B}\)

\(df_{AxB} = {3} - {1} - {1}\)

\(df_{AxB} = {1}\)



The decision criteria:

\(F_{crit} = {7.64}, \alpha = {0.01}\)

Partition the SS for \(AxB\)

Calculate \(SS_{AxB}\)

\(SS_{{AxB}} = SS_{{Between}} - SS_{{Factor_A}} - SS_{{Factor_B}}\)

\(SS_{AxB} = {152.12} - {55.13} - {84.5}\)

\(SS_{AxB} = {12.49}\)

Mean Squares for \({AxB}\)

\(MS_{AxB} = \frac{SS_{AxB}}{df_{AxB}}\)

\(MS_{AxB} = \frac{12.49}{1}\)

\(MS_{AxB} = {12.49}\)

Calculate the F-Ratio for \({AxB}\)

\(F_{AxB} = \frac{MS_{AxB}}{MS_{Within}}\)

\(F_{AxB} = \frac{12.49}{31.99}\)

\(F_{AxB} = {0.39}\)


Calculate \(\eta_p^2 \text{ for } AxB\)

\(\eta_p^2 = \frac{{SS_{{AxB}}}}{{SS_{{Total}} - SS_{{Factor_A}} - SS_{{Factor_B}}}}\)

\(\eta_p^2 = \frac{12.49}{{1047.88} - {55.13} - {84.5}}\)

\(\eta_p^2 = \frac{12.49}{908.25}\)

\(\eta_p^2 = {0.01}\)

The results:

fail to reject the null hypothesis, results not significant,

\(F({1}, {28}) = {0.39}, p > {0.01}, \eta_p^2 = {0.01}\)

9.3 Problem 2

Given the following data, use a use a 2-Factor ANOVA with \(\alpha = {0.01}\) to analyze the following data


Full Group Summary Data
\(T_{A1B1} = {179} \quad M_{A1B1} = {35.8}\quad SS_{A1B1} = {346.8} \quad n_{A1B1} = {5}\)
\(T_{A1B2} = {217} \quad M_{A1B2} = {43.4}\quad SS_{A1B2} = {251.2} \quad n_{A1B2} = {5}\)
\(T_{A1B3} = {257} \quad M_{A1B3} = {51.4}\quad SS_{A1B3} = {177.2} \quad n_{A1B3} = {5}\)
\(T_{A2B1} = {225} \quad M_{A2B1} = {45.0}\quad SS_{A2B1} = {48.0} \quad n_{A2B1} = {5}\)
\(T_{A2B2} = {191} \quad M_{A2B2} = {38.2}\quad SS_{A2B2} = {44.8} \quad n_{A2B2} = {5}\)
\(T_{A2B3} = {193} \quad M_{A2B3} = {38.6}\quad SS_{A2B3} = {149.2} \quad n_{A2B3} = {5}\)
\(T_{A3B1} = {156} \quad M_{A3B1} = {31.2}\quad SS_{A3B1} = {34.8} \quad n_{A3B1} = {5}\)
\(T_{A3B2} = {212} \quad M_{A3B2} = {42.4}\quad SS_{A3B2} = {201.2} \quad n_{A3B2} = {5}\)
\(T_{A3B3} = {234} \quad M_{A3B3} = {46.8}\quad SS_{A3B3} = {142.8} \quad n_{A3B3} = {5}\)
\(\Sigma X^2 = {80110}\)
\(G = {1864}\)

Stage 1 ANOVA Calculations

Calculate the Degrees of Freedom: \(df_{total}, df_{within}, \text{ and } df_{between}\)

\(df_{total} = N - 1\)

\(df_{total} = {45} - 1\)

\(df_{total} = {44}\)


\(df_{between} = k - 1\)

\(df_{between} = {9} - 1\)

\(df_{between} = {8}\)


\(df_{within} = N - K\)

\(df_{within} = {45} - {9}\)

\(df_{within} = {36}\)


Calculate the Sum of Squares: \(SS_{total}, SS_{within}, \text{ and } SS_{between}\)

\(SS_{total} = \Sigma X^2 - \frac{G^2}{N}\)

\(SS_{total} = {80110} - \frac{1864^2}{45}\)

\(SS_{total} = {80110} - \frac{3474496}{45}\)

\(SS_{total} = {80110} - {77211.02}\)

\(SS_{total} = {2898.98}\)


\(SS_{within} = \Sigma SS_{inside\_each\_condition}\)

\(SS_{within} = {346.8 + 251.2 + 177.2 + 48.0 + 44.8 + 149.2 + 34.8 + 201.2 + 142.8}\)

\(SS_{within} = {1396.0}\)


\(SS_{between} = SS_{total} - SS_{within}\)

\(SS_{between} = {2898.98} - {1396.0}\)

\(SS_{between} = {1502.98}\)


note: the other way to calculate \(SS_{betwen}\) is:

\(SS_{between} = \Sigma{\frac{T^2}{n}} - \frac{G^2}{N}\)




Stage 2 calculations for \(Factor_A\)

Summary Data for Factor_A
\(T_{A_1} = {653} \quad n_{A_1} = {15}\)
\(T_{A_2} = {609} \quad n_{A_2} = {15}\)
\(T_{A_3} = {602} \quad n_{A_3} = {15}\)

State the Hypotheses
\(H_0: \mu_1 = \mu_2 = \mu_3\)
\(H_1:\) At least one mean is different

partition df for \(Factor_A\)

\(df_{Factor_A} = k_{Factor_A} - 1\)

\(df_{Factor_A} = {3} - 1\)

\(df_{Factor_A} = {2}\)


The decision criteria:

\(F_{crit} = {5.25}, \alpha = {0.01}\)

Partition the SS for \(Factor_A\)

Calculate \(SS_{Factor_A}\)

\(\Sigma{\frac{{T_{Factor_A}}^2}{n_{Factor_A}}} - \frac{G^2}{N}\)

\(SS_{Factor_A} = {\frac{{653}^2}{15} + \frac{{609}^2}{15} + \frac{{602}^2}{15}} - \frac{{1864}^2}{45}\)

\(SS_{Factor_A} = {\frac{{426409}}{15} + \frac{{370881}}{15} + \frac{{362404}}{15}} - \frac{{3474496}}{45}\)

\(SS_{Factor_A} = {{28427.27} + {24725.4} + {24160.27}} - {77211.02}\)

\(SS_{Factor_A} = {77312.94} - {77211.02}\)

\(SS_{Factor_A} = {101.92}\)

Mean Squares for \({Factor_A}\)

\(MS_{Factor_A} = \frac{SS_{Factor_A}}{df_{Factor_A}}\)

\(MS_{Factor_A} = \frac{101.92}{2}\)

\(MS_{Factor_A} = {50.96}\)

Calculate the F-Ratio for \({Factor_A}\)

\(F_{Factor_A} = \frac{MS_{Factor_A}}{MS_{Within}}\)

\(F_{Factor_A} = \frac{50.96}{38.78}\)

\(F_{Factor_A} = {1.31}\)


Calculate \(\eta_p^2 \text{ for } Factor_A\)

\(\eta_p^2 = \frac{{SS_{{Factor_A}}}}{{SS_{{Total}} - SS_{{Factor_B}} - SS_{{AxB}}}}\)

\(\eta_p^2 = \frac{101.92}{{2898.98} - {512.72} - {888.34}}\)

\(\eta_p^2 = \frac{101.92}{1497.92}\)

\(\eta_p^2 = {0.07}\)

The results:

fail to reject the null hypothesis, results not significant,

\(F({2}, {36}) = {1.31}, p > {0.01}, \eta_p^2 = {0.07}\)



Stage 2 calculations for \(Factor_B\)

Summary Data for Factor_B
\(T_{B_1} = {560} \quad n_{B_1} = {15}\)
\(T_{B_2} = {620} \quad n_{B_2} = {15}\)
\(T_{B_3} = {684} \quad n_{B_3} = {15}\)

State the Hypotheses
\(H_0: \mu_1 = \mu_2 = \mu_3\)
\(H_1:\) At least one mean is different

partition df for \(Factor_B\)

\(df_{Factor_B} = k_{Factor_B} - 1\)

\(df_{Factor_B} = {3} - 1\)

\(df_{Factor_B} = {2}\)


The decision criteria:

\(F_{crit} = {5.25}, \alpha = {0.01}\)

Partition the SS for \(Factor_B\)

Calculate \(SS_{Factor_B}\)

\(\Sigma{\frac{{T_{Factor_B}}^2}{n_{Factor_B}}} - \frac{G^2}{N}\)

\(SS_{Factor_B} = {\frac{{560}^2}{15} + \frac{{620}^2}{15} + \frac{{684}^2}{15}} - \frac{{1864}^2}{45}\)

\(SS_{Factor_B} = {\frac{{313600}}{15} + \frac{{384400}}{15} + \frac{{467856}}{15}} - \frac{{3474496}}{45}\)

\(SS_{Factor_B} = {{20906.67} + {25626.67} + {31190.4}} - {77211.02}\)

\(SS_{Factor_B} = {77723.74} - {77211.02}\)

\(SS_{Factor_B} = {512.72}\)

Mean Squares for \({Factor_B}\)

\(MS_{Factor_B} = \frac{SS_{Factor_B}}{df_{Factor_B}}\)

\(MS_{Factor_B} = \frac{512.72}{2}\)

\(MS_{Factor_B} = {256.36}\)

Calculate the F-Ratio for \({Factor_B}\)

\(F_{Factor_B} = \frac{MS_{Factor_B}}{MS_{Within}}\)

\(F_{Factor_B} = \frac{256.36}{38.78}\)

\(F_{Factor_B} = {6.61}\)


Calculate \(\eta_p^2 \text{ for } Factor_B\)

\(\eta_p^2 = \frac{{SS_{{Factor_B}}}}{{SS_{{Total}} - SS_{{Factor_A}} - SS_{{AxB}}}}\)

\(\eta_p^2 = \frac{512.72}{{2898.98} - {101.92} - {888.34}}\)

\(\eta_p^2 = \frac{512.72}{1908.72}\)

\(\eta_p^2 = {0.27}\)

The results:

reject the null hypothesis, results are significant,

\(F({2}, {36}) = {6.61}, p < {0.01}, \eta_p^2 = {0.27}\)



Stage 2 calculations for the \(AxB\) interaction


State the Hypotheses
\(H_0:\) There is no AxB interation
\(H_1:\) There is an AxB interaction

Partition df for the interaction

\(df_{AxB} = df_{Between} -df_{Factor_A} - df_{Factor_B}\)

\(df_{AxB} = {8} - {2} - {2}\)

\(df_{AxB} = {4}\)



The decision criteria:

\(F_{crit} = {3.89}, \alpha = {0.01}\)

Partition the SS for \(AxB\)

Calculate \(SS_{AxB}\)

\(SS_{{AxB}} = SS_{{Between}} - SS_{{Factor_A}} - SS_{{Factor_B}}\)

\(SS_{AxB} = {1502.98} - {101.92} - {512.72}\)

\(SS_{AxB} = {888.34}\)

Mean Squares for \({AxB}\)

\(MS_{AxB} = \frac{SS_{AxB}}{df_{AxB}}\)

\(MS_{AxB} = \frac{888.34}{4}\)

\(MS_{AxB} = {222.08}\)

Calculate the F-Ratio for \({AxB}\)

\(F_{AxB} = \frac{MS_{AxB}}{MS_{Within}}\)

\(F_{AxB} = \frac{222.08}{38.78}\)

\(F_{AxB} = {5.73}\)


Calculate \(\eta_p^2 \text{ for } AxB\)

\(\eta_p^2 = \frac{{SS_{{AxB}}}}{{SS_{{Total}} - SS_{{Factor_A}} - SS_{{Factor_B}}}}\)

\(\eta_p^2 = \frac{888.34}{{2898.98} - {101.92} - {512.72}}\)

\(\eta_p^2 = \frac{888.34}{2284.34}\)

\(\eta_p^2 = {0.39}\)

The results:

reject the null hypothesis, results are significant,

\(F({4}, {36}) = {5.73}, p < {0.01}, \eta_p^2 = {0.39}\)

9.4 Problem 3

Given the following data, use a use a 2-Factor ANOVA with \(\alpha = {0.01}\) to analyze the following data


Full Group Summary Data
\(T_{A1B1} = {486} \quad M_{A1B1} = {60.75}\quad SS_{A1B1} = {867.5} \quad n_{A1B1} = {8}\)
\(T_{A1B2} = {428} \quad M_{A1B2} = {53.5}\quad SS_{A1B2} = {988.0} \quad n_{A1B2} = {8}\)
\(T_{A1B3} = {552} \quad M_{A1B3} = {69.0}\quad SS_{A1B3} = {888.0} \quad n_{A1B3} = {8}\)
\(T_{A2B1} = {298} \quad M_{A2B1} = {37.25}\quad SS_{A2B1} = {3703.5} \quad n_{A2B1} = {8}\)
\(T_{A2B2} = {537} \quad M_{A2B2} = {67.12}\quad SS_{A2B2} = {932.88} \quad n_{A2B2} = {8}\)
\(T_{A2B3} = {416} \quad M_{A2B3} = {52.0}\quad SS_{A2B3} = {858.0} \quad n_{A2B3} = {8}\)
\(\Sigma X^2 = {167527}\)
\(G = {2717}\)

Stage 1 ANOVA Calculations

Calculate the Degrees of Freedom: \(df_{total}, df_{within}, \text{ and } df_{between}\)

\(df_{total} = N - 1\)

\(df_{total} = {48} - 1\)

\(df_{total} = {47}\)


\(df_{between} = k - 1\)

\(df_{between} = {6} - 1\)

\(df_{between} = {5}\)


\(df_{within} = N - K\)

\(df_{within} = {48} - {6}\)

\(df_{within} = {42}\)


Calculate the Sum of Squares: \(SS_{total}, SS_{within}, \text{ and } SS_{between}\)

\(SS_{total} = \Sigma X^2 - \frac{G^2}{N}\)

\(SS_{total} = {167527} - \frac{2717^2}{48}\)

\(SS_{total} = {167527} - \frac{7382089}{48}\)

\(SS_{total} = {167527} - {153793.52}\)

\(SS_{total} = {13733.48}\)


\(SS_{within} = \Sigma SS_{inside\_each\_condition}\)

\(SS_{within} = {867.5 + 988.0 + 888.0 + 3703.5 + 932.88 + 858.0}\)

\(SS_{within} = {8237.88}\)


\(SS_{between} = SS_{total} - SS_{within}\)

\(SS_{between} = {13733.48} - {8237.88}\)

\(SS_{between} = {5495.6}\)


note: the other way to calculate \(SS_{betwen}\) is:

\(SS_{between} = \Sigma{\frac{T^2}{n}} - \frac{G^2}{N}\)




Stage 2 calculations for \(Factor_A\)

Summary Data for Factor_A
\(T_{A_1} = {1466} \quad n_{A_1} = {24}\)
\(T_{A_2} = {1251} \quad n_{A_2} = {24}\)

State the Hypotheses
\(H_0: \mu_1 = \mu_2\)
\(H_1: \mu_1 \ne \mu_2\)

partition df for \(Factor_A\)

\(df_{Factor_A} = k_{Factor_A} - 1\)

\(df_{Factor_A} = {2} - 1\)

\(df_{Factor_A} = {1}\)


The decision criteria:

\(F_{crit} = {7.28}, \alpha = {0.01}\)

Partition the SS for \(Factor_A\)

Calculate \(SS_{Factor_A}\)

\(\Sigma{\frac{{T_{Factor_A}}^2}{n_{Factor_A}}} - \frac{G^2}{N}\)

\(SS_{Factor_A} = {\frac{{1466}^2}{24} + \frac{{1251}^2}{24}} - \frac{{2717}^2}{48}\)

\(SS_{Factor_A} = {\frac{{2149156}}{24} + \frac{{1565001}}{24}} - \frac{{7382089}}{48}\)

\(SS_{Factor_A} = {{89548.17} + {65208.38}} - {153793.52}\)

\(SS_{Factor_A} = {154756.55} - {153793.52}\)

\(SS_{Factor_A} = {963.03}\)

Mean Squares for \({Factor_A}\)

\(MS_{Factor_A} = \frac{SS_{Factor_A}}{df_{Factor_A}}\)

\(MS_{Factor_A} = \frac{963.03}{1}\)

\(MS_{Factor_A} = {963.03}\)

Calculate the F-Ratio for \({Factor_A}\)

\(F_{Factor_A} = \frac{MS_{Factor_A}}{MS_{Within}}\)

\(F_{Factor_A} = \frac{963.03}{196.14}\)

\(F_{Factor_A} = {4.91}\)


Calculate \(\eta_p^2 \text{ for } Factor_A\)

\(\eta_p^2 = \frac{{SS_{{Factor_A}}}}{{SS_{{Total}} - SS_{{Factor_B}} - SS_{{AxB}}}}\)

\(\eta_p^2 = \frac{963.03}{{13733.48} - {1388.04} - {3144.53}}\)

\(\eta_p^2 = \frac{963.03}{9200.91}\)

\(\eta_p^2 = {0.1}\)

The results:

fail to reject the null hypothesis, results not significant,

\(F({1}, {42}) = {4.91}, p > {0.01}, \eta_p^2 = {0.1}\)



Stage 2 calculations for \(Factor_B\)

Summary Data for Factor_B
\(T_{B_1} = {784} \quad n_{B_1} = {16}\)
\(T_{B_2} = {965} \quad n_{B_2} = {16}\)
\(T_{B_3} = {968} \quad n_{B_3} = {16}\)

State the Hypotheses
\(H_0: \mu_1 = \mu_2 = \mu_3\)
\(H_1:\) At least one mean is different

partition df for \(Factor_B\)

\(df_{Factor_B} = k_{Factor_B} - 1\)

\(df_{Factor_B} = {3} - 1\)

\(df_{Factor_B} = {2}\)


The decision criteria:

\(F_{crit} = {5.15}, \alpha = {0.01}\)

Partition the SS for \(Factor_B\)

Calculate \(SS_{Factor_B}\)

\(\Sigma{\frac{{T_{Factor_B}}^2}{n_{Factor_B}}} - \frac{G^2}{N}\)

\(SS_{Factor_B} = {\frac{{784}^2}{16} + \frac{{965}^2}{16} + \frac{{968}^2}{16}} - \frac{{2717}^2}{48}\)

\(SS_{Factor_B} = {\frac{{614656}}{16} + \frac{{931225}}{16} + \frac{{937024}}{16}} - \frac{{7382089}}{48}\)

\(SS_{Factor_B} = {{38416.0} + {58201.56} + {58564.0}} - {153793.52}\)

\(SS_{Factor_B} = {155181.56} - {153793.52}\)

\(SS_{Factor_B} = {1388.04}\)

Mean Squares for \({Factor_B}\)

\(MS_{Factor_B} = \frac{SS_{Factor_B}}{df_{Factor_B}}\)

\(MS_{Factor_B} = \frac{1388.04}{2}\)

\(MS_{Factor_B} = {694.02}\)

Calculate the F-Ratio for \({Factor_B}\)

\(F_{Factor_B} = \frac{MS_{Factor_B}}{MS_{Within}}\)

\(F_{Factor_B} = \frac{694.02}{196.14}\)

\(F_{Factor_B} = {3.54}\)


Calculate \(\eta_p^2 \text{ for } Factor_B\)

\(\eta_p^2 = \frac{{SS_{{Factor_B}}}}{{SS_{{Total}} - SS_{{Factor_A}} - SS_{{AxB}}}}\)

\(\eta_p^2 = \frac{1388.04}{{13733.48} - {963.03} - {3144.53}}\)

\(\eta_p^2 = \frac{1388.04}{9625.92}\)

\(\eta_p^2 = {0.14}\)

The results:

fail to reject the null hypothesis, results not significant,

\(F({2}, {42}) = {3.54}, p > {0.01}, \eta_p^2 = {0.14}\)



Stage 2 calculations for the \(AxB\) interaction


State the Hypotheses
\(H_0:\) There is no AxB interation
\(H_1:\) There is an AxB interaction

Partition df for the interaction

\(df_{AxB} = df_{Between} -df_{Factor_A} - df_{Factor_B}\)

\(df_{AxB} = {5} - {1} - {2}\)

\(df_{AxB} = {2}\)



The decision criteria:

\(F_{crit} = {5.15}, \alpha = {0.01}\)

Partition the SS for \(AxB\)

Calculate \(SS_{AxB}\)

\(SS_{{AxB}} = SS_{{Between}} - SS_{{Factor_A}} - SS_{{Factor_B}}\)

\(SS_{AxB} = {5495.6} - {963.03} - {1388.04}\)

\(SS_{AxB} = {3144.53}\)

Mean Squares for \({AxB}\)

\(MS_{AxB} = \frac{SS_{AxB}}{df_{AxB}}\)

\(MS_{AxB} = \frac{3144.53}{2}\)

\(MS_{AxB} = {1572.26}\)

Calculate the F-Ratio for \({AxB}\)

\(F_{AxB} = \frac{MS_{AxB}}{MS_{Within}}\)

\(F_{AxB} = \frac{1572.26}{196.14}\)

\(F_{AxB} = {8.02}\)


Calculate \(\eta_p^2 \text{ for } AxB\)

\(\eta_p^2 = \frac{{SS_{{AxB}}}}{{SS_{{Total}} - SS_{{Factor_A}} - SS_{{Factor_B}}}}\)

\(\eta_p^2 = \frac{3144.53}{{13733.48} - {963.03} - {1388.04}}\)

\(\eta_p^2 = \frac{3144.53}{11382.41}\)

\(\eta_p^2 = {0.28}\)

The results:

reject the null hypothesis, results are significant,

\(F({2}, {42}) = {8.02}, p < {0.01}, \eta_p^2 = {0.28}\)

9.5 Problem 4

Given the following data, use a use a 2-Factor ANOVA with \(\alpha = {0.05}\) to analyze the following data


Full Group Summary Data
\(T_{A1B1} = {202} \quad M_{A1B1} = {22.44}\quad SS_{A1B1} = {112.22} \quad n_{A1B1} = {9}\)
\(T_{A1B2} = {216} \quad M_{A1B2} = {24.0}\quad SS_{A1B2} = {70.0} \quad n_{A1B2} = {9}\)
\(T_{A1B3} = {226} \quad M_{A1B3} = {25.11}\quad SS_{A1B3} = {82.89} \quad n_{A1B3} = {9}\)
\(T_{A2B1} = {276} \quad M_{A2B1} = {30.67}\quad SS_{A2B1} = {178.0} \quad n_{A2B1} = {9}\)
\(T_{A2B2} = {173} \quad M_{A2B2} = {19.22}\quad SS_{A2B2} = {73.56} \quad n_{A2B2} = {9}\)
\(T_{A2B3} = {249} \quad M_{A2B3} = {27.67}\quad SS_{A2B3} = {88.0} \quad n_{A2B3} = {9}\)
\(\Sigma X^2 = {34676}\)
\(G = {1342}\)

Stage 1 ANOVA Calculations

Calculate the Degrees of Freedom: \(df_{total}, df_{within}, \text{ and } df_{between}\)

\(df_{total} = N - 1\)

\(df_{total} = {54} - 1\)

\(df_{total} = {53}\)


\(df_{between} = k - 1\)

\(df_{between} = {6} - 1\)

\(df_{between} = {5}\)


\(df_{within} = N - K\)

\(df_{within} = {54} - {6}\)

\(df_{within} = {48}\)


Calculate the Sum of Squares: \(SS_{total}, SS_{within}, \text{ and } SS_{between}\)

\(SS_{total} = \Sigma X^2 - \frac{G^2}{N}\)

\(SS_{total} = {34676} - \frac{1342^2}{54}\)

\(SS_{total} = {34676} - \frac{1800964}{54}\)

\(SS_{total} = {34676} - {33351.19}\)

\(SS_{total} = {1324.81}\)


\(SS_{within} = \Sigma SS_{inside\_each\_condition}\)

\(SS_{within} = {112.22 + 70.0 + 82.89 + 178.0 + 73.56 + 88.0}\)

\(SS_{within} = {604.67}\)


\(SS_{between} = SS_{total} - SS_{within}\)

\(SS_{between} = {1324.81} - {604.67}\)

\(SS_{between} = {720.14}\)


note: the other way to calculate \(SS_{betwen}\) is:

\(SS_{between} = \Sigma{\frac{T^2}{n}} - \frac{G^2}{N}\)




Stage 2 calculations for \(Factor_A\)

Summary Data for Factor_A
\(T_{A_1} = {644} \quad n_{A_1} = {27}\)
\(T_{A_2} = {698} \quad n_{A_2} = {27}\)

State the Hypotheses
\(H_0: \mu_1 = \mu_2\)
\(H_1: \mu_1 \ne \mu_2\)

partition df for \(Factor_A\)

\(df_{Factor_A} = k_{Factor_A} - 1\)

\(df_{Factor_A} = {2} - 1\)

\(df_{Factor_A} = {1}\)


The decision criteria:

\(F_{crit} = {4.04}, \alpha = {0.05}\)

Partition the SS for \(Factor_A\)

Calculate \(SS_{Factor_A}\)

\(\Sigma{\frac{{T_{Factor_A}}^2}{n_{Factor_A}}} - \frac{G^2}{N}\)

\(SS_{Factor_A} = {\frac{{644}^2}{27} + \frac{{698}^2}{27}} - \frac{{1342}^2}{54}\)

\(SS_{Factor_A} = {\frac{{414736}}{27} + \frac{{487204}}{27}} - \frac{{1800964}}{54}\)

\(SS_{Factor_A} = {{15360.59} + {18044.59}} - {33351.19}\)

\(SS_{Factor_A} = {33405.18} - {33351.19}\)

\(SS_{Factor_A} = {53.99}\)

Mean Squares for \({Factor_A}\)

\(MS_{Factor_A} = \frac{SS_{Factor_A}}{df_{Factor_A}}\)

\(MS_{Factor_A} = \frac{53.99}{1}\)

\(MS_{Factor_A} = {53.99}\)

Calculate the F-Ratio for \({Factor_A}\)

\(F_{Factor_A} = \frac{MS_{Factor_A}}{MS_{Within}}\)

\(F_{Factor_A} = \frac{53.99}{12.6}\)

\(F_{Factor_A} = {4.28}\)


Calculate \(\eta_p^2 \text{ for } Factor_A\)

\(\eta_p^2 = \frac{{SS_{{Factor_A}}}}{{SS_{{Total}} - SS_{{Factor_B}} - SS_{{AxB}}}}\)

\(\eta_p^2 = \frac{53.99}{{1324.81} - {283.81} - {382.34}}\)

\(\eta_p^2 = \frac{53.99}{658.66}\)

\(\eta_p^2 = {0.08}\)

The results:

reject the null hypothesis, results are significant,

\(F({1}, {48}) = {4.28}, p < {0.05}, \eta_p^2 = {0.08}\)



Stage 2 calculations for \(Factor_B\)

Summary Data for Factor_B
\(T_{B_1} = {478} \quad n_{B_1} = {18}\)
\(T_{B_2} = {389} \quad n_{B_2} = {18}\)
\(T_{B_3} = {475} \quad n_{B_3} = {18}\)

State the Hypotheses
\(H_0: \mu_1 = \mu_2 = \mu_3\)
\(H_1:\) At least one mean is different

partition df for \(Factor_B\)

\(df_{Factor_B} = k_{Factor_B} - 1\)

\(df_{Factor_B} = {3} - 1\)

\(df_{Factor_B} = {2}\)


The decision criteria:

\(F_{crit} = {3.19}, \alpha = {0.05}\)

Partition the SS for \(Factor_B\)

Calculate \(SS_{Factor_B}\)

\(\Sigma{\frac{{T_{Factor_B}}^2}{n_{Factor_B}}} - \frac{G^2}{N}\)

\(SS_{Factor_B} = {\frac{{478}^2}{18} + \frac{{389}^2}{18} + \frac{{475}^2}{18}} - \frac{{1342}^2}{54}\)

\(SS_{Factor_B} = {\frac{{228484}}{18} + \frac{{151321}}{18} + \frac{{225625}}{18}} - \frac{{1800964}}{54}\)

\(SS_{Factor_B} = {{12693.56} + {8406.72} + {12534.72}} - {33351.19}\)

\(SS_{Factor_B} = {33635.0} - {33351.19}\)

\(SS_{Factor_B} = {283.81}\)

Mean Squares for \({Factor_B}\)

\(MS_{Factor_B} = \frac{SS_{Factor_B}}{df_{Factor_B}}\)

\(MS_{Factor_B} = \frac{283.81}{2}\)

\(MS_{Factor_B} = {141.9}\)

Calculate the F-Ratio for \({Factor_B}\)

\(F_{Factor_B} = \frac{MS_{Factor_B}}{MS_{Within}}\)

\(F_{Factor_B} = \frac{141.9}{12.6}\)

\(F_{Factor_B} = {11.26}\)


Calculate \(\eta_p^2 \text{ for } Factor_B\)

\(\eta_p^2 = \frac{{SS_{{Factor_B}}}}{{SS_{{Total}} - SS_{{Factor_A}} - SS_{{AxB}}}}\)

\(\eta_p^2 = \frac{283.81}{{1324.81} - {53.99} - {382.34}}\)

\(\eta_p^2 = \frac{283.81}{888.48}\)

\(\eta_p^2 = {0.32}\)

The results:

reject the null hypothesis, results are significant,

\(F({2}, {48}) = {11.26}, p < {0.05}, \eta_p^2 = {0.32}\)



Stage 2 calculations for the \(AxB\) interaction


State the Hypotheses
\(H_0:\) There is no AxB interation
\(H_1:\) There is an AxB interaction

Partition df for the interaction

\(df_{AxB} = df_{Between} -df_{Factor_A} - df_{Factor_B}\)

\(df_{AxB} = {5} - {1} - {2}\)

\(df_{AxB} = {2}\)



The decision criteria:

\(F_{crit} = {3.19}, \alpha = {0.05}\)

Partition the SS for \(AxB\)

Calculate \(SS_{AxB}\)

\(SS_{{AxB}} = SS_{{Between}} - SS_{{Factor_A}} - SS_{{Factor_B}}\)

\(SS_{AxB} = {720.14} - {53.99} - {283.81}\)

\(SS_{AxB} = {382.34}\)

Mean Squares for \({AxB}\)

\(MS_{AxB} = \frac{SS_{AxB}}{df_{AxB}}\)

\(MS_{AxB} = \frac{382.34}{2}\)

\(MS_{AxB} = {191.17}\)

Calculate the F-Ratio for \({AxB}\)

\(F_{AxB} = \frac{MS_{AxB}}{MS_{Within}}\)

\(F_{AxB} = \frac{191.17}{12.6}\)

\(F_{AxB} = {15.17}\)


Calculate \(\eta_p^2 \text{ for } AxB\)

\(\eta_p^2 = \frac{{SS_{{AxB}}}}{{SS_{{Total}} - SS_{{Factor_A}} - SS_{{Factor_B}}}}\)

\(\eta_p^2 = \frac{382.34}{{1324.81} - {53.99} - {283.81}}\)

\(\eta_p^2 = \frac{382.34}{987.01}\)

\(\eta_p^2 = {0.39}\)

The results:

reject the null hypothesis, results are significant,

\(F({2}, {48}) = {15.17}, p < {0.05}, \eta_p^2 = {0.39}\)

9.6 Problem 5

Given the following data, use a use a 2-Factor ANOVA with \(\alpha = {0.05}\) to analyze the following data


Full Group Summary Data
\(T_{A1B1} = {326} \quad M_{A1B1} = {32.6}\quad SS_{A1B1} = {478.4} \quad n_{A1B1} = {10}\)
\(T_{A1B2} = {362} \quad M_{A1B2} = {36.2}\quad SS_{A1B2} = {475.6} \quad n_{A1B2} = {10}\)
\(T_{A2B1} = {366} \quad M_{A2B1} = {36.6}\quad SS_{A2B1} = {664.4} \quad n_{A2B1} = {10}\)
\(T_{A2B2} = {489} \quad M_{A2B2} = {48.9}\quad SS_{A2B2} = {552.9} \quad n_{A2B2} = {10}\)
\(T_{A3B1} = {483} \quad M_{A3B1} = {48.3}\quad SS_{A3B1} = {566.1} \quad n_{A3B1} = {10}\)
\(T_{A3B2} = {516} \quad M_{A3B2} = {51.6}\quad SS_{A3B2} = {248.4} \quad n_{A3B2} = {10}\)
\(\Sigma X^2 = {113980}\)
\(G = {2542}\)

Stage 1 ANOVA Calculations

Calculate the Degrees of Freedom: \(df_{total}, df_{within}, \text{ and } df_{between}\)

\(df_{total} = N - 1\)

\(df_{total} = {60} - 1\)

\(df_{total} = {59}\)


\(df_{between} = k - 1\)

\(df_{between} = {6} - 1\)

\(df_{between} = {5}\)


\(df_{within} = N - K\)

\(df_{within} = {60} - {6}\)

\(df_{within} = {54}\)


Calculate the Sum of Squares: \(SS_{total}, SS_{within}, \text{ and } SS_{between}\)

\(SS_{total} = \Sigma X^2 - \frac{G^2}{N}\)

\(SS_{total} = {113980} - \frac{2542^2}{60}\)

\(SS_{total} = {113980} - \frac{6461764}{60}\)

\(SS_{total} = {113980} - {107696.07}\)

\(SS_{total} = {6283.93}\)


\(SS_{within} = \Sigma SS_{inside\_each\_condition}\)

\(SS_{within} = {478.4 + 475.6 + 664.4 + 552.9 + 566.1 + 248.4}\)

\(SS_{within} = {2985.8}\)


\(SS_{between} = SS_{total} - SS_{within}\)

\(SS_{between} = {6283.93} - {2985.8}\)

\(SS_{between} = {3298.13}\)


note: the other way to calculate \(SS_{betwen}\) is:

\(SS_{between} = \Sigma{\frac{T^2}{n}} - \frac{G^2}{N}\)




Stage 2 calculations for \(Factor_A\)

Summary Data for Factor_A
\(T_{A_1} = {688} \quad n_{A_1} = {20}\)
\(T_{A_2} = {855} \quad n_{A_2} = {20}\)
\(T_{A_3} = {999} \quad n_{A_3} = {20}\)

State the Hypotheses
\(H_0: \mu_1 = \mu_2 = \mu_3\)
\(H_1:\) At least one mean is different

partition df for \(Factor_A\)

\(df_{Factor_A} = k_{Factor_A} - 1\)

\(df_{Factor_A} = {3} - 1\)

\(df_{Factor_A} = {2}\)


The decision criteria:

\(F_{crit} = {3.17}, \alpha = {0.05}\)

Partition the SS for \(Factor_A\)

Calculate \(SS_{Factor_A}\)

\(\Sigma{\frac{{T_{Factor_A}}^2}{n_{Factor_A}}} - \frac{G^2}{N}\)

\(SS_{Factor_A} = {\frac{{688}^2}{20} + \frac{{855}^2}{20} + \frac{{999}^2}{20}} - \frac{{2542}^2}{60}\)

\(SS_{Factor_A} = {\frac{{473344}}{20} + \frac{{731025}}{20} + \frac{{998001}}{20}} - \frac{{6461764}}{60}\)

\(SS_{Factor_A} = {{23667.2} + {36551.25} + {49900.05}} - {107696.07}\)

\(SS_{Factor_A} = {110118.5} - {107696.07}\)

\(SS_{Factor_A} = {2422.43}\)

Mean Squares for \({Factor_A}\)

\(MS_{Factor_A} = \frac{SS_{Factor_A}}{df_{Factor_A}}\)

\(MS_{Factor_A} = \frac{2422.43}{2}\)

\(MS_{Factor_A} = {1211.21}\)

Calculate the F-Ratio for \({Factor_A}\)

\(F_{Factor_A} = \frac{MS_{Factor_A}}{MS_{Within}}\)

\(F_{Factor_A} = \frac{1211.21}{55.29}\)

\(F_{Factor_A} = {21.91}\)


Calculate \(\eta_p^2 \text{ for } Factor_A\)

\(\eta_p^2 = \frac{{SS_{{Factor_A}}}}{{SS_{{Total}} - SS_{{Factor_B}} - SS_{{AxB}}}}\)

\(\eta_p^2 = \frac{2422.43}{{6283.93} - {614.39} - {261.31}}\)

\(\eta_p^2 = \frac{2422.43}{5408.23}\)

\(\eta_p^2 = {0.45}\)

The results:

reject the null hypothesis, results are significant,

\(F({2}, {54}) = {21.91}, p < {0.05}, \eta_p^2 = {0.45}\)



Stage 2 calculations for \(Factor_B\)

Summary Data for Factor_B
\(T_{B_1} = {1175} \quad n_{B_1} = {30}\)
\(T_{B_2} = {1367} \quad n_{B_2} = {30}\)

State the Hypotheses
\(H_0: \mu_1 = \mu_2\)
\(H_1: \mu_1 \ne \mu_2\)

partition df for \(Factor_B\)

\(df_{Factor_B} = k_{Factor_B} - 1\)

\(df_{Factor_B} = {2} - 1\)

\(df_{Factor_B} = {1}\)


The decision criteria:

\(F_{crit} = {4.02}, \alpha = {0.05}\)

Partition the SS for \(Factor_B\)

Calculate \(SS_{Factor_B}\)

\(\Sigma{\frac{{T_{Factor_B}}^2}{n_{Factor_B}}} - \frac{G^2}{N}\)

\(SS_{Factor_B} = {\frac{{1175}^2}{30} + \frac{{1367}^2}{30}} - \frac{{2542}^2}{60}\)

\(SS_{Factor_B} = {\frac{{1380625}}{30} + \frac{{1868689}}{30}} - \frac{{6461764}}{60}\)

\(SS_{Factor_B} = {{46020.83} + {62289.63}} - {107696.07}\)

\(SS_{Factor_B} = {108310.46} - {107696.07}\)

\(SS_{Factor_B} = {614.39}\)

Mean Squares for \({Factor_B}\)

\(MS_{Factor_B} = \frac{SS_{Factor_B}}{df_{Factor_B}}\)

\(MS_{Factor_B} = \frac{614.39}{1}\)

\(MS_{Factor_B} = {614.39}\)

Calculate the F-Ratio for \({Factor_B}\)

\(F_{Factor_B} = \frac{MS_{Factor_B}}{MS_{Within}}\)

\(F_{Factor_B} = \frac{614.39}{55.29}\)

\(F_{Factor_B} = {11.11}\)


Calculate \(\eta_p^2 \text{ for } Factor_B\)

\(\eta_p^2 = \frac{{SS_{{Factor_B}}}}{{SS_{{Total}} - SS_{{Factor_A}} - SS_{{AxB}}}}\)

\(\eta_p^2 = \frac{614.39}{{6283.93} - {2422.43} - {261.31}}\)

\(\eta_p^2 = \frac{614.39}{3600.19}\)

\(\eta_p^2 = {0.17}\)

The results:

reject the null hypothesis, results are significant,

\(F({1}, {54}) = {11.11}, p < {0.05}, \eta_p^2 = {0.17}\)



Stage 2 calculations for the \(AxB\) interaction


State the Hypotheses
\(H_0:\) There is no AxB interation
\(H_1:\) There is an AxB interaction

Partition df for the interaction

\(df_{AxB} = df_{Between} -df_{Factor_A} - df_{Factor_B}\)

\(df_{AxB} = {5} - {2} - {1}\)

\(df_{AxB} = {2}\)



The decision criteria:

\(F_{crit} = {3.17}, \alpha = {0.05}\)

Partition the SS for \(AxB\)

Calculate \(SS_{AxB}\)

\(SS_{{AxB}} = SS_{{Between}} - SS_{{Factor_A}} - SS_{{Factor_B}}\)

\(SS_{AxB} = {3298.13} - {2422.43} - {614.39}\)

\(SS_{AxB} = {261.31}\)

Mean Squares for \({AxB}\)

\(MS_{AxB} = \frac{SS_{AxB}}{df_{AxB}}\)

\(MS_{AxB} = \frac{261.31}{2}\)

\(MS_{AxB} = {130.66}\)

Calculate the F-Ratio for \({AxB}\)

\(F_{AxB} = \frac{MS_{AxB}}{MS_{Within}}\)

\(F_{AxB} = \frac{130.66}{55.29}\)

\(F_{AxB} = {2.36}\)


Calculate \(\eta_p^2 \text{ for } AxB\)

\(\eta_p^2 = \frac{{SS_{{AxB}}}}{{SS_{{Total}} - SS_{{Factor_A}} - SS_{{Factor_B}}}}\)

\(\eta_p^2 = \frac{261.31}{{6283.93} - {2422.43} - {614.39}}\)

\(\eta_p^2 = \frac{261.31}{3247.11}\)

\(\eta_p^2 = {0.08}\)

The results:

fail to reject the null hypothesis, results not significant,

\(F({2}, {54}) = {2.36}, p > {0.05}, \eta_p^2 = {0.08}\)