In 8a we built the tools to describe a relationship between two categorical variables — contingency tables, conditional proportions, standardized bar plots.
If two variables are associated, the natural next question is: does one cause changes in the other?
Today’s question: when can we draw a causal conclusion from data, and when can we only say “associated”?
Explanatory and Response Variables
When we suspect one variable may affect another:
Explanatory variable: the variable that might influence or explain the other
Also called: independent variable, predictor
Response variable: the variable that might be affected
Also called: dependent variable, outcome
Not every study has clear explanatory/response roles — sometimes we just have two variables and ask if they’re associated.
Two Scope-of-Inference Questions
We’ve already met one scope-of-inference question (Topic 5):
Generalization — can we apply findings beyond the sampled cases?
Answered by: how we sampled (random vs. convenience)
Today’s new question:
Causation — can we conclude one variable causes changes in the other?
Answered by: how we conducted the study
These are two separate questions.
Observational Study vs. Experiment
Observational study: researchers observe without intervening
Cases observed “as they are”
No control over the explanatory variable
Example: a survey asking about diet and health
Experiment: researchers deliberately manipulate the explanatory variable
Cases assigned to treatment conditions
Researchers control which case gets which treatment
Example: randomly assigning patients to a drug or a placebo
Observational or Experiment?
For each scenario, decide: observational study or experiment?
A researcher surveys 500 college students about hours of sleep per night and current GPA. Observational. The researcher just records what students report — no one is assigned a sleep amount.
A pharmaceutical company randomly assigns 200 patients with chronic migraines to receive either a new drug or a placebo for 12 weeks. Experiment. The researcher controls who gets which treatment via random assignment.
A school district compares math test scores between students enrolled in a flipped-classroom section and those in a traditional section. Students chose their own section. Observational. The district records scores by section but didn’t assign students to a section — students self-selected.
Ice Cream and Drowning
A surprising finding: ice cream sales and drowning deaths are strongly positively associated.
Ice cream sales high → drownings high
Ice cream sales low → drownings low
Does eating ice cream cause drowning?
No! Both go up together because of a third variable that drives them both:
Hot weather → more ice cream sales
Hot weather → more swimming → more drownings
Confounding Variables
A confounding variable is associated with both the explanatory and response variables.
flowchart TD
A[Temperature<br/>confounder] --> B[Ice cream sales]
A --> C[Drowning deaths]
style A fill:#ffcccc,stroke:#cc0000,stroke-width:3px
style B fill:#cce5ff,stroke:#0066cc,stroke-width:2px
style C fill:#cce5ff,stroke:#0066cc,stroke-width:2px
Why it matters: a confounder creates an alternative explanation for the association. In an observational study, we usually can’t rule confounders out — so we can only say variables are associated, not that one causes the other.
Spot the Confounder
For each observed association, name a plausible confounder that could explain it without any direct causal link.
Children who eat breakfast tend to score higher on standardized tests.Family income / home environment. Households with more resources are more likely to ensure breakfast and provide tutoring, books, and stable study conditions — driving both the breakfast and the score up.
Children with bigger feet tend to be better readers.Age. Older children have bigger feet and more years of reading instruction. Compare children of the same age and the foot–reading association disappears.
Cities with more police officers tend to have more reported crime.City size. Big cities have more officers and more crime. The association is driven by population — not by officers causing crime.
Random Assignment
The fix for confounding: random assignment.
Random assignment: cases are randomly assigned to treatment groups
Researchers control who gets which treatment
Assignment is by chance — not by patient preference, doctor recommendation, or any other characteristic
Key benefit: on average, random assignment balances the groups across every possible confounder — including ones we haven’t thought of, because chance doesn’t systematically sort patients into one group or the other.
Stent Study
The SAMMPRIS clinical trial (Chimowitz et al., NEJM 2011) tested whether a stent — a small mesh tube placed in a narrowed artery — prevents strokes in at-risk patients.
451 at-risk patients assigned to receive a stent (treatment) or standard medical care alone (control)
Outcome (“stroke” or “no event”) recorded after 365 days
Explanatory: group (treatment / control)
Response: outcome (stroke / no event)
Stent Study — Random Assignment
Each of the 451 patients was randomly assigned to treatment or control — by chance, not by patient or doctor choice.
Chance doesn’t pick favorites: an older patient is no more likely than a younger one to receive a stent — same for sicker patients, smokers, and so on.
Result: on average, the two groups end up similar in age, stenosis severity (artery narrowing), other health conditions — in every way except the stent itself.
What If Observational?
If patients had chosen whether to get a stent, severe stenosis would push both ways:
More likely to choose a stent (doctors recommend it)
More likely to have a stroke (artery risk, independent of treatment)
flowchart TD
A[Stenosis severity<br/>confounder] --> B[Stent treatment]
A --> C[Stroke outcome]
style A fill:#ffcccc,stroke:#cc0000,stroke-width:3px
style B fill:#cce5ff,stroke:#0066cc,stroke-width:2px
style C fill:#cce5ff,stroke:#0066cc,stroke-width:2px
Random assignment breaks this link.
Stent Study Results
Stent study outcomes
Group
Stroke
No event
control
28
199
treatment
45
179
Stroke proportions: control 12%, treatment 20%.
It turns out this difference is statistically significant.
Because random assignment ruled out confounders, we can conclude the stent caused more strokes — a result that surprised researchers and changed clinical practice.
Random Assignment vs. Random Sampling
These sound similar but answer different questions:
Random Sampling
Random Assignment
What
How cases are selected from a population
How cases are assigned to treatment groups
Purpose
Enables generalization
Enables causal conclusions
Controls for
Sampling bias
Confounding variables
A study can do either, both, or neither.
Recycling — Observational
Do signs on recycling bins reduce contamination? Students compared two bins for a month:
Student Center (public): no sign
Lichty Hall (residence): sign
Lower contamination at the signed bin.
But location is a confounder — public vs. residential bins may behave differently regardless of signs.
Recycling — Experiment
Same question, better design: 60 bins across campus; randomly assign 30 to display a sign for the month, 30 without. Record contamination per bin.
Suppose the same finding: lower contamination on the sign bins.
Random assignment balanced location types — a residential bin was no more likely to get the sign than a public one. The signs caused the reduction.
Judging Scope of Inference
For each study, what can we conclude? Causal or association? Generalize, or not?
A pharmaceutical company draws a random sample of 500 patients with chronic migraines from a national registry. Each is randomly assigned to a new drug or a placebo for 12 weeks. Causal + generalizable. Random assignment rules out confounders → causation. Random sampling → generalize to the registry population.
A psychology researcher recruits 50 students from her own intro class as volunteers. She randomly assigns each student to read a fiction or non-fiction passage, then measures empathy. Causal, not generalizable. Random assignment → causation. Convenience sample (her students) → conclusions don’t generalize beyond them.
A health survey randomly samples 1,000 adults from a city and compares exercise frequency (high vs. low) to self-reported stress levels. Association + generalizable. Random sample → generalizes to the city’s adults. No random assignment (researchers didn’t set exercise levels) → confounders possible (e.g., income, age) → only association.
Summary
Two separate questions about what we can conclude from a study: