Foundations of Inquiry · Lesson 023
Confounding Variables: The Hidden Third Factor
Learning objectives: Define a confounder, distinguish association from a causal explanation, draw a simple causal diagram, and propose a design that reduces confounding.
What is a confounder?
Suppose students who bring umbrellas are more likely to have wet shoes. Carrying an umbrella does not make shoes wet: rainy weather makes umbrellas more common and can make shoes wet. Rain is a common cause. A confounding variable is associated with both the exposure and outcome and can distort the estimated relationship between them. Whether a variable is truly a confounder depends on the causal question and the structure of the problem.
Diagram: Rain → Umbrella; Rain → Wet shoes. An observed Umbrella ↔ Wet shoes association alone cannot establish Umbrella → Wet shoes.
Worked example: an apparent effect disappears
Imagine an observational sample of 200 people. In the rainy group, 80 carry umbrellas and 60 have wet shoes (not necessarily the same 60); in the dry group, 20 carry umbrellas and 10 have wet shoes. These totals alone cannot calculate the association between umbrellas and wet shoes because the overlap counts are missing. We need a complete two-by-two table within each weather group.
Consider this fully specified hypothetical dataset instead:
| Weather | Umbrella | Wet shoes | Dry shoes |
|---|---|---|---|
| Rain | Yes | 48 | 12 |
| Rain | No | 32 | 8 |
| Dry | Yes | 2 | 18 |
| Dry | No | 8 | 72 |
Overall, umbrella carriers have 50 wet-shoe cases among 80 people: 50/80 = 62.5%. Non-carriers have 40 wet-shoe cases among 120: 40/120 = 33.3%. That looks like a 29.2-percentage-point difference. But within rainy weather, both groups have 80% wet shoes (48/60 = 32/40 = 0.8); within dry weather, both have 10% (2/20 = 8/80 = 0.1). The overall difference arises because umbrella carriers are more concentrated in rainy conditions. This is a numerical illustration of confounding, not evidence about real umbrella behavior.
Try it
Draw a causal diagram for the question, “Does drinking coffee cause people to arrive at work earlier?” Brainstorm possible common causes, such as work schedule or commuting habits. Explain how you would measure these factors and why simply comparing coffee drinkers with non-drinkers may be misleading. Do not treat any proposed factor as proven without evidence.
Reflection
Which variable might be a cause, which might be an effect, and which might be a common cause? Why is controlling for every measured variable not always wise? Some variables are mediators or colliders; adjusting for them can create rather than remove bias.
Knowledge check
- What makes a variable a confounder?
- Why can a pooled association differ from a stratified association?
- Does random assignment eliminate all bias?
Answer key
- It is a common cause (or a proxy for relevant common causes) of exposure and outcome in the causal structure, potentially distorting their observed association.
- The exposure groups can have different mixes of an influential third variable, as the weather example demonstrates.
- No. Randomization reduces systematic baseline confounding on average but does not eliminate chance imbalance, measurement error, nonadherence, attrition, or other biases.
Limits and next steps
Stratification may be difficult with small samples; measured adjustment cannot fix unknown confounders; and causal conclusions need a credible design and assumptions. The example uses deliberately constructed data, not empirical results. Continue by asking what would happen under a different intervention and what assumptions are required.
