# Statistics Lab / ferdo — synthetic data (no real student records)
# Save stats_synthetic.csv in your working directory.
d <- read.csv("stats_synthetic.csv", stringsAsFactors = TRUE)
stopifnot(nrow(d) == 36, all(c("score_pre","score_post","group") %in% names(d)))
# Groups are observational labels: differences cannot establish a treatment effect.

set.seed(2026)
one_run <- sum(sample(c(0,1), 20, replace=TRUE) == 1)
repeats <- replicate(1000, sum(sample(c(0,1), 20, replace=TRUE)))
mean(repeats)
hist(repeats, breaks=seq(-0.5,20.5,1))
dbinom(10, size=20, prob=.5)
