Skip to content

Track T9

Proportions & Categorical Data

Counts, tables, odds and rates.

Unit 1One and two proportions

· 3 lessons
  1. 1One proportion: exact tests and honest intervalsTest a proportion against a target with the exact binomial or score test, and see why the textbook Wald interval is the one to avoid.Introductory · 10 min
  2. 2Two proportions: z, Fisher, Barnard and BoschlooFour tests compare two proportions. They differ in what they hold fixed, which is why Fisher's exact test can be more conservative than you need.Applied · 11 min
  3. 3Risk difference, risk ratio or odds ratio?One 2 × 2 table gives three effect sizes that can tell very different stories. Learn to convert them, and which to report.Introductory · 10 min

Unit 2Tables

· 3 lessons
  1. 4Larger tables: chi-square, G and exact testsObserved against expected is the whole idea. Learn the chi-square and G statistics, what independence and homogeneity mean, and how to find where a table differs.Introductory · 11 min
  2. 5The expected-counts rule, and what to do when it failsThe rule of five is about expected counts, not observed ones. When a table is sparse, a Monte Carlo or exact p-value is one option away.Applied · 8 min
  3. 6Goodness of fit and the power-divergence familyDo these counts match a theory? Pearson's chi-square, the G test and Cressie–Read are one family with one dial.Applied · 9 min

Unit 3Matched data

· 1 lesson
  1. 7Matched categories: McNemar and its relativesWhen the same people answer twice, only the people who changed carry information. McNemar, Cochran's Q, Stuart–Maxwell, Bhapkar and Bowker build on that idea.Applied · 12 min

Unit 4Strata and confounding

· 2 lessons
  1. 8Simpson's paradox and the Berkeley admissionsA gap can vanish or reverse when you split the data. The Berkeley admissions show how, and why the data alone can't say which view is right.Introductory · 10 min
  2. 9Stratified tables: Cochran–Mantel–Haenszel, Breslow–Day and WoolfCombine 2 × 2 tables across strata into one test and one odds ratio, then check whether a single odds ratio is a fair summary of them.Applied · 13 min

Unit 5Trends, surveys and models

· 3 lessons
  1. 10Ordered groups: the Cochran–Armitage trend testWhen groups have a natural order, a test of trend asks a sharper question than chi-square. Its answer depends on the scores you give the groups.Applied · 10 min
  2. 11Survey data: the Rao–Scott chi-squareClusters and weights make a survey carry less information than its row count suggests. Rao–Scott corrects the chi-square test for the design you actually used.Advanced · 11 min
  3. 12Log-linear models for tables with many variablesWrite a table's cell counts as a model with one term for each association. Comparing models answers questions a single chi-square can't.Advanced · 12 min

Unit 6Rates

· 1 lesson
  1. 13Counts over time: exact Poisson tests and the E-testEvents per patient day or per thousand hours need exposure in the denominator. Test one rate exactly, compare two by conditioning, or use the unconditional E-test.Applied · 12 min

Unit 7Margins, power and reporting

· 3 lessons
  1. 14Not worse by much: Farrington–Manning for proportionsTo claim a new option isn't meaningfully worse, set a margin, test against it, and use a standard error worked out at that margin.Advanced · 12 min
  2. 15How many do you need? Power for proportions and tablesSample size for a proportion depends on the baseline as well as the gap. Solve for n, for power or for the smallest detectable difference, and do it before you collect data.Applied · 12 min
  3. 16Reporting categorical results that people can checkGive counts and denominators, say which way percentages run, and pair each test with an effect size and interval. A capstone for the track, including Table 1.Introductory · 10 min