R.K. HendersonAI leader · data scientist

Data & decisions / 05

causal inference

Causal impact lab

Two programs that were never randomized. The naive read gets the sign wrong; three causal methods recover the true effect.

The decisionDid a program work when nobody ran an experiment, and which estimate should the business act on?

Decisions Customer 5 stages Synthetic or public data
−0.43difference-in-differences vs a true −0.40
+0.16what the naive comparison said: the wrong sign
3causal methods, each scored against the truth

01 / Overview

The problem, and the approach.

AThe challenge

Most programs are never randomized: managers choose where to launch, and customers choose whether to join. A dashboard comparison then mixes the program’s effect with who received it, and can point in the wrong direction.

BThe approach

A loyalty price lock launched in eight manager-chosen markets and an opt-in autopay discount, with a true effect planted in the synthetic data. Difference-in-differences with an event study, a demeaned synthetic control checked with placebo runs, and propensity matching and weighting, each scored against the truth, with E-values for what unmeasured confounding could still do.

02 / The decision journey

5 decisions, one story.

Each stage asks one business question and answers it with a model you can open and change. Any card opens that stage of the live demo.

  1. 01 Frame What does the dashboard say? Both naive comparisons say the program raised churn. It cut it. Open this stage
  2. 02 Diff-in-diff Did the treated markets change more? Within 0.03 of the truth, with the event study that earns the trust. Open this stage
  3. 03 Synthetic control What would have happened without it? A weighted twin of untreated markets, checked with placebo runs. Open this stage
  4. 04 Matching Did the discount work, or did loyal customers join? Matching removes measured differences, and a toggle shows what it cannot. Open this stage
  5. 05 Decide Which number goes to the business? Every estimate against the truth, and a rule for choosing among them. Open this stage

03 / Under the hood

How it’s built.

Algorithms

  • Two-way fixed effects
  • Event study
  • Synthetic control
  • Propensity scores (logistic)
  • Nearest-neighbor matching
  • Inverse probability weighting

Stack

  • Python
  • NumPy · pandas
  • Fixed-effects regression
  • scikit-learn (propensity)
  • Plotly
  • Streamlit

Methods, in order

  1. Difference-in-differences
  2. Event study
  3. Synthetic control
  4. Placebo tests
  5. Propensity matching
  6. E-values

Data

Synthetic weekly churn for treated and untreated markets, with a known effect of −0.40.

04 / Outcomes

What it changed.

  1. 01

    The naive comparison said +0.16: the program looked harmful.

  2. 02

    Difference-in-differences recovered −0.43 against a true −0.40.

  3. 03

    A rule for which estimate goes to the business, and what each method cannot fix.

Results come from synthetic or public data with known answers. They show the method, not a client result.

05 / Try it

The live demo.

The real app, running on synthetic data. Change the inputs and watch the decision move.

Interactive, synthetic data. If nobody has used it for a while it takes about 30 seconds to wake.

Open in a new tab ↗

Open conversations

Questions about
how it was built?

Decision Lab · live demo
Starting the demo…