ANOVA exam question

Task description

Case description

An experimental study examined whether a four-week mindfulness training improves students’ stress management skills. Three groups were compared: a mindfulness group, a relaxation group, and a control group without any intervention. Stress management skills were assessed before and after the intervention using a validated questionnaire. The aim was to evaluate the effectiveness of the interventions and identify differences between the groups.

Information about data collection

  • Sample: 60 students (20 per group)
  • Groups:
    • Mindfulness group
    • Relaxation group
    • Control group
  • Measurement time points: Before (pre) and after (post)
  • Measurement instrument: Stress management questionnaire (scale 0–100)

R script with data analysis

# Data simulation
set.seed(123)
gruppe <- rep(c("Mindfulness", "Relaxation", "Control"), each = 20)
prä <- c(rnorm(20, mean = 50, sd = 10),
rnorm(20, mean = 50, sd = 10),
rnorm(20, mean = 50, sd = 10))
post <- c(rnorm(20, mean = 70, sd = 10),
rnorm(20, mean = 60, sd = 10),
rnorm(20, mean = 50, sd = 10))
daten <- data.frame(Gruppe = gruppe, Prä = prä, Post = post)

# Descriptive statistics
library(dplyr)
daten %>%
group_by(Gruppe) %>%
summarise(Mittelwert_Prä = mean(Prä),
SD_Prä = sd(Prä),
Mittelwert_Post = mean(Post),
SD_Post = sd(Post))

# Assumption tests
# Normality
shapiro.test(daten$Post[daten$Gruppe == "Mindfulness"])
shapiro.test(daten$Post[daten$Gruppe == "Relaxation"])
shapiro.test(daten$Post[daten$Gruppe == "Control"])

# Homogeneity of variance
library(car)
leveneTest(Post ~ Gruppe, data = daten)

# One-way ANOVA
anova_result <- aov(Post ~ Gruppe, data = daten)
summary(anova_result)

# Kruskal-Wallis test
kruskal.test(Post ~ Gruppe, data = daten)

R output (excerpt)

Descriptive statistics:

# Mindfulness: Mean_Post ≈ 70, SD_Post ≈ 10
# Relaxation: Mean_Post ≈ 60, SD_Post ≈ 10
# Control: Mean_Post ≈ 50, SD_Post ≈ 10

Normality (Shapiro-Wilk test):

# p-values for all groups > 0.05

Levene’s test:

# p-value > 0.05

One-Way ANOVA:

            Df Sum Sq Mean Sq F value   Pr(>F)    
Group 2 4000 2000 20 <0.001 ***
Residuals 57 5700 100

Kruskal-Wallis test:

Kruskal-Wallis chi-squared = 25, df = 2, p-value < 0.001

Exam questions

  1. Interpretation: What do the ANOVA results mean in terms of the stress-management competence of the three groups?
  2. Choice of method: Why was a Kruskal-Wallis test conducted in addition to the ANOVA?
  3. Theory: Explain the concept of Type I error inflation and how it can be counteracted.
  4. Application: Which post hoc tests would be appropriate after a significant ANOVA, and why?

Sample solution

  1. Interpretation: The ANOVA shows a significant difference in stress-management competence between the groups (F(2,57) = 20, p < 0.001). This suggests that at least one group differs significantly from the others. The mindfulness group has the highest mean, followed by the relaxation group and the control group.
  2. Choice of method: The Kruskal-Wallis test was conducted as a nonparametric alternative to the ANOVA to validate the results, particularly if the assumptions of normality or homogeneity of variance had been violated. In this case, the Kruskal-Wallis test confirmed the ANOVA results.
  3. Theory: Alpha error inflation occurs when, across multiple hypothesis tests, the probability of making at least one Type I error increases. To counteract this, correction procedures such as the Bonferroni correction or Tukey’s HSD test can be used to adjust the significance level.
  4. Application: Following a significant ANOVA, post hoc tests such as Tukey’s HSD test are appropriate because they enable pairwise group comparisons and control alpha error inflation. These tests help identify which groups differ significantly from one another.