Decoding Support, Confidence, and Lift:
A Grocery Store Story
Imagine walking into your neighborhood supermarket. You grab a cart and pick up a carton of milk. While heading toward the checkout, you suddenly remember — Oh, I also need bread!
Now, if this scene feels familiar, you’re not alone. In fact, many supermarkets rely on exactly this type of buying pattern to recommend products, design store layouts, or even create discount bundles.
The tool behind this magic? Association Rule Mining.
And at the heart of it are three concepts: Support, Confidence, and Lift.
Let’s turn this abstract jargon into something you can easily visualize.
📊 The Supermarket Dataset
Suppose we analyze 1,000 shopping transactions at a supermarket. We focus on two items:
- Milk
- Bread
Here’s what we discover:
- Milk was bought in 200 transactions
- Bread was bought in 300 transactions
- Milk & Bread were bought together in 100 transactions
1. Support: How often does this combo show up?
Support tells us the frequency of an itemset in the whole dataset.
For the rule Milk → Bread:
👉 10% of all shoppers bought both Milk and Bread.
Support is like the popularity score of a pair.
2. Confidence: If I buy Milk, how likely am I to buy Bread too?
Confidence measures conditional probability.
👉 50% of the customers who bought Milk also bought Bread.
Get Uzair Ahmad’s stories in your inbox
Join Medium for free to get updates from this writer.
Confidence is what retailers really care about: If a customer puts Milk in the basket, what’s the chance they’ll also grab Bread?
3. Lift: Is this relationship special, or just coincidence?
Lift compares the observed co-occurrence with what we’d expect by pure chance.
👉 Customers who buy Milk are 1.67 times more likely to also buy Bread compared to a random shopper.
🔄 Now Flip the Rule: Bread → Milk
Association rules are directional, so let’s check the opposite:
Support
Support is symmetric, so it stays the same:
Confidence
Now we condition on Bread instead of Milk:
👉 Only 33% of Bread-buyers also buy Milk.
Notice how this is lower than the previous 50%.
Lift
👉 What do you observe ?
Wrapping It Up: Why It Matters
So what do our rules tell us?
Milk → Bread:
- Support = 10%
- Confidence = 50%
- Lift = 1.67
Bread → Milk:
- Support = 10%
- Confidence = 33%
- Lift = 1.67
This means:
- Milk-buyers are stronger candidates to also buy Bread than the other way around.
- But in both directions, Milk and Bread co-occur 1.67× more often than chance would predict.
- That’s why supermarkets often place bread and milk close to each other, or bundle them in promotions.
- If Lift = 1 → no real association (random).
- If Lift > 1 → positive association.
- If Lift < 1 → negative association.
Next time you’re in a supermarket and see two items side by side, you’ll know there’s math behind it — quietly nudging you to pick up both.









