Appendix C: Interactive Modules

Twenty-seven browser-based modules accompany this book. Each one takes a claim the text makes in prose and turns it into something you run: you predict what will happen, run the simulation or the analysis, record what you actually got, and account for the difference.

They are worksheets, not demonstrations. Most modules save your answers in the browser as you type and have Save and Print buttons — printing produces the copy you hand in. The preview activities and the Ch 7 cleaning activity use a linked answer document instead. Work through them with a partner wherever you can; several prompts are built to make the two of you commit to different predictions before anything is run.

Each chapter links to its own modules at the point where they become useful. This appendix collects them in book order — except the preview series just below, which runs ahead of its chapters rather than alongside them, so it leads the list instead of being buried mid-appendix.


Why Do We Care? — Preview Activities

Four graded activities, run before their formal chapters, not after. Each one answers a real research question start to finish — plot, test, interpret — using only the pattern from the day before, so that the machinery in Chapters 15, 17, 21, and 22 arrives with an obvious reason to exist.

Module What you do in it
Day 1: Why Do We Care? — A First Look at the t-Test Compare two groups on a real recall question, then re-run the same test on two more variable pairs — one a myth-bust, one right at the .05 line — before Chapter 15 names t, df, or Cohen’s d.
Day 2: Why Do We Care? — A First Look at ANOVA The six-t-test problem, solved in one test across four groups, then two follow-up reruns before Chapter 17 names F or eta².
Day 3: Why Do We Care? — A First Look at Regression The same outcome ~ predictor pattern extended to two continuous variables — boxplot() becomes plot(), aov()/t.test() become lm() — before Chapter 22 names slope or R².
Day 4: Why Do We Care? — A First Look at Chi-Square Two categorical variables instead of two numbers — a contingency table replaces the plot, chisq.test() breaks the outcome ~ predictor pattern on purpose — before Chapter 21 names χ² or Cramér’s V.

Chapter 3 — Describing data

Module What you do in it
Mean vs. Median: What Moves and What Doesn’t Drag one value to an extreme and watch the mean and SD chase it while the median and IQR stay put. Read a distribution’s skew off the mean–median gap, then decide which summary pair to report.

Chapter 5 — Sampling and inference

Module What you do in it
Coffee Experiment Simulator Draw sample after sample and watch the sampling distribution of the difference between two group means assemble itself. Record how its width changes across n = 10, 30 and 100 — the result every significance test in this course depends on.
The Dance of the Confidence Intervals Build 100 confidence intervals and watch their long-run coverage emerge, then repeat one real two-group effect until the significance verdict flips even though the effect never changes. Returns in Chapter 15 for Welch-test interpretation and reporting.

Chapter 7 — Preparing data

Module What you do in it
Ch 7 Extension: Cleaning Messy Data Write your own t.test() on a raw, uncleaned dataset and hit a real R error before touching a single cleaning function. Then find every problem (duplicate IDs, inconsistent coding, sentinel values, missing data), fix them, and rerun the same test on the cleaned result.

Chapters 10–13 — Checking normality

A five-part sequence on the assumption students most often check wrongly: what normality is really about, how to see it, how to test it, what to do when it fails, and when to stop trying and change tests.

Module What you do in it
Module 1: Why Does Normality Matter? Compare false-positive rates and power for normal and skewed populations, then change sample size, balance, and spread to find where the tests’ robustness actually breaks.
Module 2: Visual Detection of Normality Diagnose six mystery variables from histograms, boxplots and Q-Q plots. One is built so the mean-versus-median check passes and the data still are not normal.
Module 3: Statistical Tests for Normality Run shapiro.test() in R on the same distribution at n = 30 and n = 5,000: it usually passes the small sample and always fails the large one, though the skew is the same mild skew in both. The in-browser simulation runs the same test (a port of R’s algorithm) on fresh samples.
Module 4: Data Transformations Apply log, square-root and reciprocal transformations and re-check normality after each — including one case where nothing works and the honest move is to stop.
Module 5: Non-Parametric Alternatives A clean dataset where the parametric and rank-based tests agree, and an outlier-heavy one where they disagree, which forces you to decide which one you would report. You also measure what the rank test actually costs in power.

Chapter 16 — Paired-Samples t-Test

Module What you do in it
Paired vs. Independent: What Pairing Buys Hold the mean change and both marginal SDs fixed while increasing the pre/post correlation. Watch only the paired standard error shrink, then scramble the row matching and see why pairing is a design fact rather than a two-column format.

Chapters 17–18 — ANOVA

Module What you do in it
ANOVA: Signal, Noise, and Interaction Separate group means from within-group noise and watch the omnibus test and Tukey intervals change, then build parallel, ordinal, and crossover interactions one model term at a time.

Chapter 20 — Correlation

Module What you do in it
Correlation Trainer: What r Can and Cannot Tell You Guess five correlations with immediate feedback, move one high-leverage point until the coefficient reverses, restrict the predictor range, then reveal age as the third variable behind a strong shoe-length/reading association. Finish by reproducing one trainer dataset with cor.test() in R.

Chapter 21 — Chi-square

Tests for categorical data, built up in order: which variables qualify, the two tests, and finally the assumptions that decide whether you may use either one.

Module What you do in it
Module 1: Why Chi-Square Matters Sort variables by type before any test is run, and separate a large χ² from a large effect using Cohen’s w.
Module 2: Goodness-of-Fit Test One variable against a set of expected proportions, across four worked datasets — all four of which are non-significant.
Module 3: Test of Independence Contingency tables, standardized residuals, and which χ² your Cramér’s V was built from.
Module 4: Assumptions and Troubleshooting The expected-count rule, Fisher’s exact test, and what Yates’ correction costs you.

Chapters 22–25 — Regression

From one predictor to several: what regression is for, how to read and report a fitted model, whether you are allowed to trust it, and what changes when predictors compete.

Module What you do in it
Regression: Signal and Noise Move the slope and the scatter and watch the variation split into explained and leftover, the same split as one-way ANOVA. A gentle, tight line beats a steep, noisy one on R².
Module 3: Checking Assumptions and Diagnostics One predictor, a clean reference outcome, and four outcomes that each break one assumption. Includes a slope that is non-significant with R² = .002 whose residual plot shows an obvious curve.
Module 4: Multiple Regression Add a useless predictor and watch R² rise while adjusted R² falls; add a near-duplicate and watch a standard error inflate five-fold.

Chapter 27 — Effect sizes

Module What you do in it
Significance Is Not Size Manufacture a significant result from a trivial effect by raising the sample size, then miss a real and meaningful one in a small sample.

Chapter 28 — Simpson’s Paradox

Module What you do in it
Simpson’s Paradox Slider Hold two positive within-group relationships fixed while sliding the groups apart across X. Watch the pooled regression cross zero and reverse, then connect the mechanism to the real UC Berkeley admissions data in R.

Chapter 28b — Open Science and the Replication Crisis

Module What you do in it
Forking Paths and the Significance Filter Start with a true null, search across 20 analysis paths, then filter a 100-study evidence base to show only p < .05. Watch chance findings become the entire visible literature and observed effect magnitudes inflate without any change in the true effect.

NoteHow these open

Every link on this page opens the module in a new browser tab, so the chapter you were reading stays where it is. Close the tab when you are done with the module.