🎉 75% of content is free forever — Unlock Premium from $10/mo →
CW
💼 Servicesℹ️ About✉️ ContactView Pricing Plansfrom $10

Causal Inference: Beyond Correlation

Module 4: Statistics and Probability🟢 Free Lesson

Advertisement

Causal Inference DAGXUYConfounder UX: Treatment | Y: Outcome | U: UnobservedY = α + β·X+ ε (error)

Correlation vs Causation

Causal inference is the process of determining whether one variable truly causes a change in another, as opposed to merely being correlated.

Causal Structures (DAGs)CorrelationXYX ~ YMove togetherCausalXYX → YX causes YForkZXYX ← Z → YZ confoundsColliderXYZX → Z ← YBias if conditionedChainXZYX → Z → YZ mediatesKey PatternsCausal (interventional)Confounding (spurious)Collider (bias)Mediation (mechanism)Association only⚠ Correlation ≠ CausationThree conditions for causation: (1) Temporal precedence (2) Covariation (3) No confounders

Three conditions for causation:

  1. Temporal precedence: Cause precedes effect
  2. Covariation: Cause and effect are related
  3. No confounders: The relationship is not explained by a third variable

Potential Outcomes Framework

Rubin Causal Model

For individual i, define:

  • Y_i(1) = outcome if treated (potential outcome under treatment)
  • Y_i(0) = outcome if not treated (potential outcome under control)

Fundamental Problem of Causal Inference

Average Treatment Effect (ATE)

Conditional Average Treatment Effect (CATE)

SUTVA (Stable Unit Treatment Value Assumption)

  1. No interference: One unit's treatment does not affect another's outcome
  2. Consistency: Only one version of each treatment level

Propensity Score Matching

Key Property

Matching Methods

MethodDescriptionExample
Nearest NeighborFind closest control by propensity scoreT1→C3, T2→C1
CaliperReject matches beyond thresholdT1 (d=0.02) ✓, T2 (d=0.08) ≤
KernelWeighted average of all controlsT1 ← weighted sum of C1-C5
StratificationDivide by propensity score strataStratum 1: [0.0-0.2] → ATE_1

Implementation

Difference-in-Differences (DiD)

Two-Period Model

Difference-in-Differences (DiD)Time →Outcome (Y)PrePostTreatmentControlCounterfactualΔ (DiD)Causal effectδ = 0.5Pre: Similar levelsTreatment groupControl groupCounterfactualDiD estimate

Parallel Trends Assumption

Implementation

Instrumental Variables (IV)

When to Use IV

When treatment is correlated with unobserved confounders (endogeneity):

Instrument Requirements

  1. Relevance: Z is correlated with X
  2. Exclusion: Z affects Y only through X
  3. Exogeneity: Z is uncorrelated with confounders

Two-Stage Least Squares (2SLS)

Architecture Diagram
Confounding:

    U (unobserved)
   / \
  v   v
  X   Y     Endogeneity: Cov(X, ε) ≈ 0

Instrumental Variable:

    U (unobserved)
   / \
  v   v
  X   Y     IV Z satisfies: Z ⊥ U, Z -> X
  ^
  |
  Z (instrument)

Regression Discontinuity Design (RDD)

Sharp RDD

YXCutoff (c)ControlTreatment

Directed Acyclic Graphs (DAGs)

Pearl's Causal Hierarchy

  1. Association: P(Y | X) — Seeing
  2. Intervention: P(Y | do(X)) — Doing
  3. Counterfactual: P(Y_x | X', Y') — Imagining

do-Calculus

Backdoor Criterion

A set Z satisfies the backdoor criterion relative to (X, Y) if:

  1. No node in Z is a descendant of X
  2. Z blocks every path between X and Y that contains an arrow into X

Key Takeaways

Practice Exercises

  1. Propensity Score Matching: Perform PSM on job training data and check covariate balance before/after matching
  2. DiD Analysis: Replicate the minimum wage study and test the parallel trends assumption
  3. IV Estimation: Implement IV using quarter of birth as an instrument for education. Check instrument strength
  4. RDD Design: Apply RDD to a dataset with a known cutoff. Estimate the effect at different bandwidths
  5. Discussion: When would you prefer DiD over propensity score matching? How do you validate the exclusion restriction?

Need Expert Data Science Help?

Get personalized tutoring, project support, or professional consulting.

Advertisement