Rates, Risks and Chance v8
Topic 10 · Statistical analyses and comparing groups

Rates, Risks and Chance

An interactive lab for measuring disease, comparing groups and judging random error. Every example uses synthetic data invented for teaching.

Objectives and key terms

What you will learn

Each module practises one set of skills. Read the objectives before you start and come back to the key terms whenever a word in a module is unfamiliar.

How to use this lab
  1. Pick a module from the tabs below. Each one opens with a worked example already loaded.
  2. Move a slider or type a new number. Every result, chart and sentence updates as you go.
  3. Read the blue "What this means" box. It turns the numbers into a sentence you could use in a paper or on rounds.
  4. Finish each module with "Check your understanding". All datasets are synthetic: invented for practice, with no real people or places.

Allow about 10 minutes per module. Works on a phone.

Module 1 · Measures of disease frequency

Measuring how common a disease is

Every measure of disease frequency needs three things: the number of cases, the size of the population they came from, and the time it was followed. Change each one and watch what happens.

A. Make the counts comparable

Region B has fewer new cases of type 1 diabetes in children than Region A. Does it have less disease? Region A counted cases for one year; Region B counted for three years in a much smaller population. Convert both regions to the same population size and time period.

Region A
Region B
What this means

B. Count person-time, not people

Five people in a small town are observed from 2015 to 2025. People move in, move away, are born, die or get sick. Each person adds time to the denominator only while they are being followed and still free of the disease.

FromToPerson-years
What this means

C. The sink: incidence, duration and prevalence

Prevalence is the water in the sink. New cases (incidence) flow in from the tap; cure and death drain it away. The longer people live with the disease, the slower the drain. In a steady state, P ÷ (1 − P) = IR × D, and when P is under about 10%, P ≈ IR × D.

Presets use rounded, illustrative values for teaching.

What this means

D. How sure are we? A 95% confidence interval for prevalence

A school survey of 1,000 adolescents finds 30 with a food allergy that needs an epinephrine autoinjector. The interval shows the range of true prevalence values compatible with the sample. Change the sample size and see how the interval shrinks or grows.

What this means

Formula: A/N ± 1.96 × √[(A/N)(1 − A/N) ÷ N]. Works best when N is large and the outcome is not rare.

E. Describing differences across racialized groups

A synthetic school screening program measured blood pressure in adolescents aged 12 to 17. Prevalence of elevated blood pressure is described by racialized group, each with a 95% confidence interval and a comparison with a reference group you choose.

How to read this example

Race is a social category. Gaps between racialized groups in health outcomes are best explained by structural racism, which shapes income, housing, neighbourhoods, chronic stress and access to care. When you describe a gap, name the likely structural causes and avoid explanations based on genes or individual behaviour. The reference group is also a choice: try changing it and notice how the story changes.

Grey numbers under each estimate are 95% confidence intervals.

What this means

Check your understanding