Association Rules · AI Algorithms
SUPPORT, CONFIDENCE, LIFT — the three metrics that make bread-to-butter meaningful
Apriori uses anti-monotonicity — if A,B is infrequent then A,B,C must also be infrequent
S
Support — how often items appear together
Measures how frequently a given itemset (combination of items) appears together across all transactions in the dataset.
Example: if bread and butter appear together in 8% of all grocery transactions, the support for {bread, butter} is 0.08.
C
Confidence — how reliably A predicts B
Measures P(B|A) — given that item A was purchased, what's the probability that item B was also purchased? This captures the directional reliability of the rule.
Example: if 70% of transactions containing bread also contain butter, the confidence of the rule "bread → butter" is 0.7.
L
Lift — is the relationship stronger than pure chance?
Measures whether the association between A and B is stronger than would be expected if they were purchased completely independently. A lift greater than 1 indicates a positive association beyond random chance.
Example: a lift of 2.5 for {bread, butter} means these items are purchased together 2.5 times more often than would be expected if they were completely unrelated.
Apriori's anti-monotonicity — pruning the search efficiently
The Apriori algorithm exploits the fact that if a smaller itemset (like {A, B}) is infrequent, any larger itemset containing it (like {A, B, C}) must also be infrequent — this lets Apriori prune huge portions of the search space without ever having to check them directly.
Example: if {bread, butter} doesn't meet the minimum support threshold, Apriori can immediately skip checking {bread, butter, jam} and any other superset, since it's mathematically guaranteed to also be infrequent.
1
A retailer wants to find which product combinations are frequently purchased together across millions of transactions, but checking every possible combination directly would be computationally infeasible.
2
The Apriori algorithm starts by identifying frequent single items, then frequent pairs, then frequent triples, and so on.
3
At each step, if a smaller itemset turns out to be infrequent, Apriori immediately prunes (skips) every larger itemset that contains it, using the anti-monotonicity property, rather than checking each one individually.
4
This dramatically reduces the search space, making it computationally feasible to mine meaningful association rules from massive transaction datasets.

Exams test whether you can correctly calculate or interpret support, confidence, and lift given example transaction data, and whether you understand WHY Apriori's anti-monotonicity property makes the algorithm efficient — pruning large portions of the itemset search space without needing to check them directly.

The most common trap is confusing confidence with lift. Confidence only measures P(B|A) directionally, without accounting for how common B is on its own — a rule can have high confidence purely because B is very common overall, even with no meaningful association. Lift specifically corrects for this by comparing against what pure chance would predict.

1. What does support measure?
How frequently a given itemset appears together across all transactions.
Tap to reveal / hide
2. What does confidence measure for the rule A → B?
P(B|A) — the probability B was purchased given that A was purchased.
Tap to reveal / hide
3. What does a lift value greater than 1 indicate?
A positive association between the items that is stronger than would be expected by pure chance.
Tap to reveal / hide
4. What is the anti-monotonicity property Apriori relies on?
If a smaller itemset is infrequent, any larger itemset containing it must also be infrequent — allowing large portions of the search space to be pruned.
Tap to reveal / hide
5. Why isn't confidence alone sufficient to judge a meaningful association?
Because a rule can have high confidence simply because the consequent item is very common overall, without reflecting any true association — lift corrects for this by comparing against chance.
Tap to reveal / hide