← Course home
MODULE 4 · FIRST-YEAR LEVEL

Probability and random variation

How do probability and uncertainty relate?

70–90 minutesConcepts first, R optionalSynthetic data

Learning outcomes

Conceptual lesson

Probability quantifies the chance of events under an explicit model. A fair coin has a one-half chance of heads, but five flips need not yield exactly half heads. Distinguish long-run relative frequencies from the variation in a short run.

Conditional probability P(A

B) describes A given B. In general P(A

B) is not P(B

A). Independent events do not change one another's probabilities; independence should not be assumed automatically in observed data.

The binomial distribution models counts of successes across a fixed number of independent trials with the same success probability. A normal distribution can approximate many continuous measurements and model errors; not every dataset must be normal.

Worked research example

In 20 fair-coin flips we expect 10 heads, but we are not guaranteed exactly 10. Repeated simulations will produce different counts. This helps introduce the idea of statistical uncertainty.

Common reasoning trap

“After many heads, tails must be due” is the gambler's fallacy. Independent flips have no memory.

Practice tasks

  1. 1. Give the expected number of heads in 20 fair-coin flips and explain why it is not guaranteed.
  2. 2. Distinguish P(positive test | disease) from P(disease | positive test).
  3. 3. Explain why 100 simulations produce different head counts.

Explain your reasoning, not just the numerical result.

Optional R practice

Download the fictional CSV into your working folder, then run the script below or download the .R file. No additional packages are needed.

Download CSV · Download R lab · Module 0 refresher

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

Stretch: mathematical track

Use a simple Bayes-rule example to discuss the positive predictive value of a screening test at low prevalence.

Exit ticket

Write one evidence-bounded claim and one limitation about this week's example.

This week's student workbook

Four original written problems (20 marks) and a formative four-question self-check.

Open week 4 workbook →

Optional mathematical derivations

Extend this topic with worked mathematics, written exercises and base R checks.

Math M1 · Math M2 · Math M3 · Math M4 · Full math pathway