AB testing — Propensity Score Matching

Peter Lin
9 min readJun 6, 2022

Followed by the previous article: DiD Analysis, this time we are going to talk about matching methodology, more specifically speaking, PSM (Propensity Score Matching). This article will again focus on helping understand the concept behind the methodology with easy understanding examples.

Story Time

As we use Macdonald’s and In-N-Out as the example in DiD analysis, let’s use the same example again. So you are on Macdonald’s marketing team, and your team launched a marketing campaign which is a TV advertisement. This time we don’t have Pre period’s data, in other words, we can’t run DiD analysis. What can we do now?

This time your teammates gather data from those who have seen Macdonald’s advertisement as well as those who haven't seen it. They come up with the following dta:

Here we treat “having seen the ad or not” as a dummy variable, so as “buy Macdonald’s burgers or not”. To be more clear, the column “Buy Macdonald’s burger” will be marked as yes if he/she buys our burgers within 7 days after seeing the ad, which makes more sense it’s due to the ad.

--

--