Member-only story

Statistics interview question: What is a confounding variable?

Crystal X
2 min readJul 3, 2024

--

In statistics, a confounding variable is an unmeasured third variable that influences both the independent and dependent variables. For example, in a scenario with three variables, X is the independent variable, y is the dependent variable, and Z is potentially the confounding variable.

A confounding variable cannot occur when there are only two variables in a dataset, as this is a phenomenon that can only occur with three or more variables.

Some challenges to identifying confounders in observational research are:-

  1. The variable has to be easily measurable.
  2. It is never actually known if something is a confounder.
  3. It is always a valid criticism that a proposed set of confounders don’t satisfy the backdoor criterion. The backdoor criterion for identifying the effect of X on y involves finding a set of nodes to condition on that collectively block all backdoor paths between X and y.

The Titanic dataset

One dataset that potentially has confounding variables in it is the Titanic dataset. Anyone who has studied this dataset will know that the people who were most likely to survive the shipwreck were women, children, and people who had tickets in the first and second classes. Therefore, men and third class passengers were more likely to perish on that fateful event.

Because it is known the people who were more likely to survive the shipwreck, PClass, Sex, and Age are potentially confounding variables because they will serve as a determining factor of who survived the event:-

--

--

Crystal X
Crystal X

Written by Crystal X

I have over five decades experience in the world of work, being in fast food, the military, business, non-profits, and the healthcare sector.

No responses yet

Write a response