What is a confounding variable, and how does randomising treatment assignment in an experiment remove confounding bias?
ML systems and evaluation, Causal inference
Level L1 Beginner. Length Short. Nature Th Theoretical.
What's being asked
Whether you know why correlation fails to imply causation in observational data and how randomisation fixes it.
Key idea
A confounder is a common cause of both the treatment and the outcome , creating a spurious correlation between and ; randomisation makes independent of , leaving only the causal effect.
Steps
- Define a confounder: a variable that influences both who receives the treatment and what outcome occurs (for example, age affecting both exercise habits and heart health).
- Explain the bias: comparing treated and untreated groups in observational data mixes the true causal effect of on with pre-existing differences in .
- Explain how randomisation works: assigning randomly (such as by a coin flip) severs the link from to , so treated and control groups have the same distribution of both observed and unobserved confounders in expectation.
Common mistakes
- Calling a mediator (a variable on the causal path ) a confounder; controlling for a mediator blocks part of the causal effect you want to measure.
- Claiming randomisation removes all differences in a small sample; it balances confounders in expectation, while finite samples can still have chance imbalances.
How long your answer should be
3–5 sentences with one concrete example.
Last checked on 4 December 2026.
Read this
Previous in ML systems and evaluation: What is the difference between demographic parity and equalised odds, and why can a perfect classifier violate demographic parity?
Next in ML systems and evaluation: What is the difference between a shadow deployment and a canary rollout when releasing a new ML model?