Script · Not a recorded lecture · Week 13

A different model for a different question

Study ANOVA, logistic regression, causal designs, and missingness.

Written teaching script: This is the narration and demonstration plan for an eventual recorded lecture. No audio or video is claimed to exist. Mathematical and editorial review will precede filming.

Opening

A straight line, an ANOVA F statistic, and a logistic curve are not rival teams competing for the statistical championship. They answer different questions under different models.

Teaching narrative

One-way ANOVA compares group means by separating between-group and within-group variability. Rejecting its global null means not all means are equal; it does not automatically identify every differing pair.

Logistic regression models log odds for binary outcomes. Exponentiating a coefficient yields an odds ratio, not a probability ratio. Explain this before someone doubles a risk by mistake.

Missing observations can change which records enter a model. The historical airquality dataset has 153 daily records, 37 missing ozone observations, and additional missing solar radiation. A multivariable model may use far fewer complete rows than the headline dataset size.

Model selection requires scientific judgment about outcomes, predictors, confounding, dependence, nonlinearities, and measurement. Statistical computing makes comparisons easier. It does not absolve us from understanding the observations.

Before the experiment

Can two regressions applied to the same spreadsheet use different subsets of observations?

Live demonstration

Reproduce the ANOVA sums of squares for three fictional groups, fit a small logistic regression, and run the missingness audit for airquality.

Exit question

Identify an instance where changing the model also changes the sample, and why that matters.

Assigned reading for this lecture

Complete week 13's applied assignment →

All fourteen lecture scripts →