06.5.6 · Skill in Statistical reasoning

Confounding

A hidden factor that affects both the cause and the effect.

Users who use a feature may retain better because they were already engaged, not because of the feature. Confounders make correlations look causal. Randomized experiments are the most reliable way around them.

Your status · Confounding

Saved in this browser. Sign in to keep it on every device.It colours this skill's tile on your map.

Why it matters for a product engineer

In product data, the users who do something are rarely like the users who do not. They are more engaged, more experienced, or on a bigger plan, and those differences also drive the outcome. If you mistake this for an effect, you build features that do nothing, and then promote them as successes.

How to do it

  1. For any claim like “users who do X do better”, ask what makes people do X in the first place.
  2. Draw the causes: the possible confounder, the feature and the outcome, with arrows between them.
  3. Compare like with like, such as users with similar activity before they used X.
  4. Adjust for confounders in the analysis. You can only adjust for what you measured.
  5. When the decision is important, run a randomized experiment instead.

Common mistakes

  • Adjusting for a few variables and calling the result causal.
  • Adjusting for something that the feature itself changed.
  • Ignoring the direction: engagement can cause feature use, not only the other way.
  • Trusting a strong association because the sample is large.

Example

Many observational studies found less heart disease in women who used hormone replacement therapy. A meta-analysis gave a relative risk of 0.56. Then the large, randomized Women’s Health Initiative trial found a higher risk for women assigned to the therapy. One likely explanation is confounding. A 2004 study found that women in worse social and economic circumstances, from childhood on, were less likely to use the therapy, and those circumstances also affect heart disease.

Bars

Heart disease with hormone therapy, relative to no therapy

  • Observational studies0.56
  • Randomized trial1.29

Below 1 means less heart disease. When women chose the therapy, it looked protective. When chance chose, the risk was higher.

ReportedLawlor, Davey Smith and Ebrahim, American Journal of Public Health, 2004

Sources: Socioeconomic position and hormone replacement therapy use: explaining the discrepancy in evidence from observational and randomized controlled trials (Lawlor, Davey Smith and Ebrahim) ↗ · Women's Health Initiative (NHLBI) ↗ · How and when to control for confounders during product usage analyses (Heap) ↗

Resources

2

Tools

1
Tools for Statistical reasoning