Apriori: Support vs. Confidence vs. Lift — Three Metrics, One Rule
TL;DR — The Apriori algorithm mines association rules of the form 'If a customer buys , they also buy '. But generating a rule is the easy part — deciding whether a rule is actually useful requires three separate metrics. Support tells you how often and appear together in the dataset; it filters out combinations so rare that the rule is statistically meaningless. Confidence tells you, given that a transaction contains , how likely it is to also contain ; it measures the directional strength of the rule. Lift tells you whether the association between and is genuine or just a side-effect of being very popular on its own. You need all three: high Support ensures statistical reliability, high Confidence ensures directional strength, and Lift ensures the relationship is real and not just driven by 's base popularity.
Feature Comparison
| Feature | Support & Confidence | Lift |
|---|---|---|
| What It Measures | Support: how often and co-occur in the dataset. Confidence: how often appears given is present | Lift: how much more often and appear together than you'd expect if they were statistically independent |
| Formula | where is total transactions. | |
| Output Range | Support: — fraction of all transactions. Confidence: — conditional probability | Lift: — a ratio. means independence; means positive association; means negative association |
| When It's Misleading Alone | High Confidence alone is misleading if is already very popular — if 90% of baskets contain bread, any rule will have Confidence regardless of whether has anything to do with bread | High Lift alone is misleading if Support is very low — a on a rule that appears in only 2 transactions out of 10,000 is not actionable; the pattern may be statistical noise |
| Role in the Apriori Algorithm | Support is used as the primary pruning threshold (Minimum Support) during candidate generation — infrequent itemsets are eliminated early. Confidence filters the final candidate rules | Lift is computed after candidate generation and rule filtering; it is used to rank and select the most genuinely useful rules from those that passed Support and Confidence thresholds |
| Directionality | Support is symmetric: . Confidence is asymmetric: in general | Lift is symmetric: . It measures association strength, not direction |
| What a Value of Means | Support : the itemset appears in every single transaction. Confidence : every transaction with also contains (perfect rule) | : knowing gives you zero additional information about ; they are statistically independent and the rule is useless |
| Practical Interpretation | 'Bread and butter appear together in 30% of all transactions' (Support). 'When customers buy bread, they buy butter 75% of the time' (Confidence) | 'Customers who buy bread are 2.5 times more likely to buy butter than a random customer is' (Lift ) |
Complexity Showdown
Training Time
All three metrics are computed from item counts collected during Apriori's candidate generation passes. Support requires the actual counting work. Confidence and Lift are both simple arithmetic operations on top of Support values — none of them adds meaningful overhead compared to the core counting step.
Prediction Time
Support and Confidence are both gates inside the algorithm that affect how many candidates are generated and evaluated. Lift is computed at the very end on the surviving rule set only. Lift is the cheapest metric to compute because it only runs on rules that already passed the other two filters.
Space Complexity
Support requires storing all frequent itemsets and their counts throughout the algorithm. Lift is only stored for finalized rules, which is a smaller set. In practice all three values are stored together per rule, but Lift alone requires less intermediate storage.
When To Use Which?
Focus on Support & Confidence when:
- ✓You are filtering for statistical reliability — set a Minimum Support threshold (e.g., ) to ensure rules are based on enough data points to be meaningful, not just lucky coincidences in a small sample.
- ✓You want directional 'if-then' predictions — Confidence directly answers 'if a customer buys , how likely are they to buy ?' which is the core question for cross-selling and recommendation systems.
- ✓You are in the Apriori candidate generation phase — Support is the pruning metric used inside the algorithm itself. Apriori's key optimization (the antimonotone property) states: if an itemset has low Support, all of its supersets will too, so they can be pruned immediately.
- ✓You need asymmetric rule evaluation — Confidence lets you distinguish from , which can tell you the direction of influence (e.g., buying diapers predicts beer more strongly than buying beer predicts diapers).
- ✓You are reporting rules to a business stakeholder — Support and Confidence have intuitive, easy-to-explain interpretations as percentages and conditional probabilities.
Focus on Lift when:
- ✓You want to filter out trivially obvious rules caused by item popularity — high-Confidence rules for universally popular items (milk, bread) are not interesting because those items appear everywhere anyway. confirms the association is real.
- ✓You need to rank rules by actual usefulness — after applying Support and Confidence thresholds, sort surviving rules by Lift to surface the most surprising and actionable patterns first.
- ✓You are comparing rules with different base rates — Lift normalizes for item popularity, so you can fairly compare a rule involving a rare item with a rule involving a common item.
- ✓You want symmetric association detection — since Lift is symmetric, it's useful when you care about the relationship between items regardless of which direction the recommendation goes.
- ✓You are detecting negative associations — reveals items that actively co-occur less than expected. This is invisible to Support and Confidence but can be practically useful (e.g., competing products that are rarely purchased together).
Common Exam Traps
Saying a rule with Confidence is always a strong rule
Confidence means nothing if . In that case, , meaning buying actually slightly decreases the probability of buying relative to the base rate. The rule is worse than useless. Always check Lift before declaring a high-Confidence rule useful.
Thinking Support is symmetric but Confidence is not, or vice versa
Support is symmetric: . Lift is also symmetric. Confidence is the asymmetric one: which changes when you flip the rule to . Exam questions often test this distinction.
Confusing the Apriori antimonotone property with Confidence or Lift
The antimonotone property applies only to Support: if itemset has low Support, every superset of also has low Support, so they can all be pruned. This property does NOT hold for Confidence or Lift — a subset rule can have low Confidence while a superset rule has high Confidence. Apriori's pruning efficiency is entirely based on Support.
Claiming Lift is sufficient to call a rule useful
Lift confirms positive association, but the rule also needs adequate Support. A rule with but (3 transactions out of 30,000) is based on near-zero evidence and likely noise. A useful rule needs AND Support above your minimum threshold.
Saying means the rule is wrong
means and are statistically independent — knowing gives you zero additional information about . The rule isn't 'wrong'; it's just useless for prediction. The items co-occur as often as chance would predict regardless of any association.
Forgetting that Confidence can equal 1 without meaning a perfect rule in the absolute sense
means every transaction containing also contains — a perfect rule directionally. But if , this perfect rule applies to only 0.1% of your data. It's a perfect rule for an extremely rare pattern. Support and Confidence together determine whether a rule is both strong and broadly applicable.
Final Verdict
Support, Confidence, and Lift are not competing metrics — they answer three different questions about the same rule. Support asks: 'Is this pattern common enough to trust?' Confidence asks: 'How reliably does predict ?' Lift asks: 'Is this prediction genuinely useful, or is just popular?' A rule worth acting on needs all three: enough Support to be statistically grounded, enough Confidence to be directionally reliable, and to confirm the association is real and not just a reflection of 's base popularity. Evaluate all three together. A rule that passes only one or two of these filters is a misleading rule.