Propensity Score Matching: Mimicking an A/B Test
Propensity Score Matching (PSM) mimics a randomized trial with observational data by finding a "statistical twin" for each subject. It's used to estimate a feature's impact when a true A/B test isn't possible. The footgun is assuming it removes all bias.
The mental model
Propensity Score Matching (PSM) creates a fair comparison group after the fact, when you couldn't run a proper A/B test. Imagine you launched a new feature that users could opt into. Are the adopters happier because of the feature, or were they already your most engaged users? PSM isolates the feature's effect by finding non-adopters who looked almost identical to the adopters before the feature was available.
How it works
PSM is a two-step process. First, you build a statistical model (often logistic regression) to calculate a "propensity score" for every user. This score is the predicted probability that a user would receive the "treatment" (e.g., adopt the feature) based on their pre-treatment characteristics, or covariates, like activity level, account age, and location. Second, for each treated user, you find one or more untreated users with a very similar propensity score. This matched set of untreated users becomes your new, cleaner control group. You can then compare outcomes between the treated group and their statistical twins.
When to use it
Use PSM for causal inference on observational data where randomization isn't feasible. This is common when measuring the impact of a user-activated feature, a non-random marketing campaign, or a policy change. It's your best bet when a true A/B test is impractical, unethical, or was simply never run.
When not to use it
Never choose PSM over a well-designed randomized controlled trial (RCT), which is always the gold standard for causality. PSM is also ineffective if there is no "common support"—meaning the treated and untreated groups are so different that you can't find good matches. Most importantly, PSM cannot control for unobserved confounders. If a key factor influencing treatment selection (like user intent) isn't in your data, your results will still be biased.
One canonical example
A company wants to know if its new, optional premium subscription increases 90-day retention. A simple comparison is biased because subscribers are likely more engaged to begin with. Using PSM, they first model the propensity to subscribe based on pre-subscription data like daily sessions and features used. Then, for each subscriber, they find a non-subscriber with a nearly identical propensity score. By comparing the retention rates of these two matched groups, they get a much cleaner estimate of the subscription's true effect.
Interview question
What is a critical limitation of Propensity Score Matching (PSM) when attempting to establish causality?
- a.It is always less reliable than a simple regression analysis for estimating treatment effects.
- b.It requires a perfectly randomized assignment of treatment to be effective.
- c.It can only be used when there are very few pre-treatment characteristics (covariates) available.
- d.It cannot control for unobserved confounders that influence both treatment assignment and the outcome.Correct
Why? this is the answer
The card explicitly states that 'PSM cannot control for unobserved confounders,' which is its most significant limitation for causal inference. PSM is designed for observational data where randomization is not possible, and it aims to improve upon simple regression by balancing observed covariates.
Just read this? Test yourself on what you have been reading.
Read the original → en.wikipedia.org
Put your scrolling time to good use
Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Open roles that interview on causal inference — each one lists the topics its interview covers.
See open roles