Causal Inference 101

6 min read

Confounding explained

What confounding is, how it biases treatment effects, and the main strategies to address it.

A confounder is a variable that affects both whether a unit receives treatment and the outcome. Ignoring it mixes the treatment effect with the confounder's effect.

Classic example: a new therapy is given to less severe patients. Outcomes look better for treated patients, but severity — not the therapy — may explain the difference.

Selection bias is closely related

When treated and control groups differ systematically, we say there is selection bias. Matching, weighting, and regression adjustment try to balance groups on observed confounders. Unobserved confounding remains the fundamental threat — sensitivity analysis helps quantify that risk.

Strategies to reduce confounding

  • Condition on measured confounders (regression, matching, IPW).
  • Use randomization or quasi-random variation when available.
  • Use causal graphs to clarify what must be adjusted and what must not.
  • Run refutation tests and placebo checks where possible.

Run this method on your data — no Python

CausalLens runs matching, DiD, causal forests, DoWhy refutation, and more — with balance tables, sensitivity checks, and PDF export.