Statistics 2

In-Class Exercise 11

Yu-You Liou

Shih Chien University

2026-09-16

Data for Questions 1 to 3

Three teaching methods were compared. The values are final scores.

scores <- c(78, 82, 75, 80, 77,
            85, 88, 91, 86, 90,
            72, 70, 76, 69, 74)
method <- factor(rep(c("Lecture", "Flipped", "Online"), each = 5))
dta    <- data.frame(method, scores)

Question 1

Describing the Groups

  1. Report the mean and the standard deviation of each method.
  2. Draw a boxplot with ggplot() and geom_boxplot(), and overlay the individual scores with geom_jitter().
  3. Which method appears to perform best?

Question 2

One-Way ANOVA

Test the claim that the three methods have different mean scores at \alpha=0.05.

  1. State H_0 and H_1.
  2. Fit the model with fit <- aov(scores ~ method, data = dta) and read the table with summary(fit).
  3. Report F, the two degrees of freedom, and the P-value, then state the decision.

Question 3

Verifying F by Hand

  1. Compute the grand mean and the sum of squares between groups SS_B=\sum n_i(\bar{X}_i-\bar{X}_{GM})^2.
  2. Compute the sum of squares within groups SS_W=\sum(n_i-1)s_i^2.
  3. Compute MS_B=SS_B/(k-1) and MS_W=SS_W/(N-k), then F=MS_B/MS_W.
  4. Confirm that your result matches the F value in Question 2.