← Course home
MODULE 13 · FIRST-YEAR LEVEL

Reproducibility, ethics and reporting

Does an analysis provide evidence of how the result was produced?

70–90 minutesConcepts first, R optionalSynthetic data

Learning outcomes

Conceptual lesson

Reproducibility aims for the same results from the same data and code. A documented R script, data dictionary, random seed (`set.seed`), package versions and an audit trail of analytical choices make work easier to inspect. Reproducibility is not scientific validity: a flawed design can be perfectly reproducible.

Research ethics includes consent, privacy, data minimisation, secure handling and honest reporting. Never upload identifiable student records to a public GitHub repository or public course archive. The shared dataset here is entirely synthetic.

A good results section states the research question, sampling and measurement, valid n, descriptive findings, the method and its conditions, magnitude and uncertainty, plus limitations. The word “significant” alone is rarely an adequate result.

Worked research example

Record the R environment with `sessionInfo()` and disclose the three missing `stress_rating` entries. Reproducing the analysis does not imply that the observational group differences are causal.

Common reasoning trap

Saving just a graph or p-value without data provenance and processing steps does not establish methodological transparency.

Independent practice

  1. Make a six-item reproducible-analysis checklist.
  2. Write one results paragraph with valid n, centre, uncertainty and limitations.
  3. Explain the ethical difference between sharing synthetic data and real confidential student records.

Explain your reasoning, not only the number.

Optional R lab

Save the synthetic CSV in the working folder before running the script. Base R only.

CSV · Download R script

# 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.

stopifnot(nrow(d)==36)
summary(d)
sapply(d, function(x) sum(is.na(x)))
table(d$group)
sessionInfo()
# Script + data + methods + limitations are the minimum audit trail.

Stretch: mathematical track

Write a short critical reflection on preregistration and the separation of exploratory and confirmatory analysis.

Exit ticket

Write one defensible claim and one limitation from this week's example.

Student workbook and self-check

Four first-year written problems, 20-mark rubric and a four-question self-check.

Open week 13 workbook →