Data Skor Proyek Final

# Input data
metode <- c(
  rep("A", 5),
  rep("B", 6),
  rep("C", 7),
  rep("D", 6)
)

skor <- c(
  75, 80, 72, 78, 70,            # Metode A
  82, 88, 85, 90, 80, 86,        # Metode B
  88, 92, 95, 85, 90, 87, 93,    # Metode C
  78, 82, 80, 75, 85, 77         # Metode D
)

data <- data.frame(Metode = as.factor(metode), Skor = skor)

Visualisasi Awal

# Input data
library(ggplot2)
ggplot(data, aes(x = Metode, y = Skor, fill = Metode)) +
  geom_boxplot() +
  geom_jitter(width = 0.1, alpha = 0.6) +
  theme_minimal() +
  labs(title = "Distribusi Skor Proyek Final Berdasarkan Metode Pengajaran",
       x = "Metode Pengajaran", y = "Skor")

## Uji Statistik: One-Way ANOVA

# Input data
# ANOVA
anova_result <- aov(Skor ~ Metode, data = data)
summary(anova_result)
##             Df Sum Sq Mean Sq F value  Pr(>F)    
## Metode       3  764.6  254.88   18.31 5.9e-06 ***
## Residuals   20  278.3   13.92                    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Interpretasi Hasil

p_value <- summary(anova_result)[[1]]["Metode", "Pr(>F)"]

cat("--- Ringkasan Hasil ANOVA ---\n")
## --- Ringkasan Hasil ANOVA ---
cat(sprintf("Nilai P-Value               : %.4f\n", p_value))
## Nilai P-Value               : 0.0000
cat("------------------------------------------\n\n")
## ------------------------------------------
# Keputusan
if (p_value < 0.05) {
  cat("Keputusan: Hipotesis Nol DITOLAK.\n")
  cat("Interpretasi: Terdapat perbedaan yang signifikan secara statistik dalam rata-rata skor proyek final antar metode pengajaran.\n")
} else {
  cat("Keputusan: Hipotesis Nol GAGAL DITOLAK.\n")
  cat("Interpretasi: Tidak terdapat bukti statistik yang cukup untuk menyimpulkan adanya perbedaan signifikan antar metode.\n")
}
## Keputusan: Hipotesis Nol DITOLAK.
## Interpretasi: Terdapat perbedaan yang signifikan secara statistik dalam rata-rata skor proyek final antar metode pengajaran.

Langkah Lanjutan (Jika Signifikan)

# Jika signifikan, lanjutkan dengan uji Tukey HSD
if (p_value < 0.05) {
  tukey_result <- TukeyHSD(anova_result)
  print(tukey_result)
}
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Skor ~ Metode, data = data)
## 
## $Metode
##           diff         lwr        upr     p adj
## B-A  10.166667   3.8440578 16.4892756 0.0011546
## C-A  15.000000   8.8861159 21.1138841 0.0000064
## D-A   4.500000  -1.8226089 10.8226089 0.2240393
## C-B   4.833333  -0.9757504 10.6424170 0.1248350
## D-B  -5.666667 -11.6950377  0.3617044 0.0700958
## D-C -10.500000 -16.3090837 -4.6909163 0.0003242