Lesson 5.3: Inference for Multiple Means Using ANOVA

Software Lab 5.3

Comparing Multiple Means

As you work through the lab, answer the ungraded exercises in the shaded boxes. Check your answers by consulting the Software Lab 5.3 Solutions.

Remember to complete the graded Software Lab Questions for this section in Moodle.

Exam Scores from Three Different Lectures: The Data

Download classdata [CSV file] (OpenIntro, n.d.) and load it into jamovi. This dataset represents exam scores of 164 students from three different lectures who were all given the same exam. This dataset is analyzed in Section 7.5.6 in the textbook. The variables we’ll be using in this lab are:

  • m1: first midterm exam score
  • lecture: a, b, or c

Data Exploration

1. Select Analyses > Exploration > Descriptives, move m1 to the Variables box, move lecture to the Split by box, and select N, Mean, and Std. deviation. Unselect everything else. Confirm that the summary statistics match those in the textbook. Check your answer by consulting the Software Lab 5.3 Solutions.
2. Is the variability within each group approximately the same?
3. Under Plots select Q-Q. Do the normal probability plots affirm the nearly normal condition within each group?

ANOVA F-Test

Is there convincing evidence that the average exam score varies by lecture? We’ll conduct an ANOVA F-test to answer this question.

The hypotheses are H0: \mu_1=\mu_2=\mu_3 versus HA: at least one mean is different. The test statistic F = \dfrac{MSG}{MSE} can be modeled by an F-model with k-1=2 numerator degrees of freedom and n-k=161 denominator degrees of freedom, assuming the following conditions are satisfied:

  • Independence: The observations are independent within and between groups.
  • Nearly Normal Condition: The observations within each group are nearly normal.
  • Variability: The variability within each group is approximately the same.
4. Select Analyses > ANOVA > One-Way ANOVA, move m1 to the Dependent Variables box, move lecture to the Grouping Variable box, and under Variances select Assume equal (Fisher's). Unselect Don't assume equal (Welch's) if it is selected already. Confirm that the F-statistic and p-value match the values in the textbook.
5. Confirm the calculation of the p-value. Hint: Select R > Rj Editor and run the following code: 1-pf(3.48, df1=2, df2=161).
6. Evaluate the hypothesis test based on a significance level \alpha = 0.05 and draw a conclusion in the context of the problem.

Multiple Comparisons

Bonferroni Correction

7. Still in the “One-Way ANOVA” dialog, select Post-Hoc Tests and under Post-Hoc Test select Tukey (equal variances) and under Statistics select Test results. Make sure you unselect Report significance because this outputs adjusted p-values for Tukey’s range test, not the unadjusted p-values we’re going to need here. Compare the t-values in the jamovi output with the t-scores in the textbook. Hint: The numbers won’t match exactly because the textbook uses rounded numbers in its calculations. Also, the t-scores for lecture A versus lecture C, and for lecture B versus lecture C, should really be negative since the lecture C sample mean score is the highest.
8. Calculate the p-values for the t-values in jamovi, and compare them to the p-values in the textbook. Confirm the conclusion from the textbook. Hint: Select R > Rj Editor and run the following code: 2*(1-pt(1.23, df=161)), 2*pt(-1.47, df=161), and 2*pt(-2.64, df=161). Again, the p-values won’t match exactly due to rounding errors in the textbook calculations.

Tukey’s Range Test (Tukey’s HSD)

9. Still in the “One-Way ANOVA” dialog, select Post-Hoc Tests and under Post-Hoc Test select Tukey (equal variances) and under Statistics select Report significance. Report the adjusted p-values in the jamovi output.
10. Interpret the results of Tukey’s range tests (Tukey’s HSD) from question 9.

References

OpenIntro. (n.d.). Data sets [Data sets]. https://openintro.org/data/

License

Icon for the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License

Introduction to Probability and Statistics Copyright © 2023 by Thompson Rivers University is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License, except where otherwise noted.

Share This Book