You are on page 1of 5

Association Rule/ Market Basket Analysis

Support = p(antecedent & consequent) = n(antecedent & consequent)/ total N

Confidence=p(consequent/antecedent) = p( ante & cons)/p(ante)

= n(antecedent & consequent)/n(ante)


Lift = Confidence / p(consequent)

= [n(antecedent & consequent)*N] /[n(conseq)* n(ante)]

Reading Association Rule/ Market Basket Analysis


For example, suppose that an online music merchandise retailer’s sales database contains 100,000 transactions. Among these transactions,
suppose that 20,000 include both guitar strings and guitar picks, and 10,500 of those 20,000 transactions also include purchases of electronic
tuners.

The Association rule


“If guitar strings & guitar picks are purchased, THEN electronic tuner is purchased at the same trip”

has a support of 10.50% (10500/100,000 = 10.5%)= P( Strings ,Picks and Tuner)


and a confidence of 52.5% (10,500/20,000 = 52.5%).= support/p(ante)
{expected confidence in support of consequent -tuners= 10500/100000=10.5%. so from a sale of 20000, we may expect 10.5% x 20000=
2100 tuners but because of association rule 10.50% sale lifted to 52.50% }
Lift Ratio = Confidence/P(consequent) =0.525/(10500/100000) = 5

Although this rule’s confidence score of 52.5% might not seem very high, it is important to evaluate that score in light of the underlying rate
at which customers purchase electronic tuners.

For instance, suppose that a total of 18,500 of the transactions in the database included sales of electronic tuners. Then the probability of a
randomly selected record including the purchase of an electronic tuner is 0.185 (18,500/100,000 = 0.185).
So for the 20,000 customers who purchased guitar strings and picks to also purchase tuners, we would have expected those customers to
purchase only about 3,700 tuners (0.185 × 20,000 = 3,700);
but, in fact, those customers purchased 10,500 tuners.

So the antecedent in the rule “If guitar strings and guitar picks are purchased, then an electronic tuner is purchased” increases (or “lifts”) the
accuracy of our ability to identifying purchasers of electronic tuners from 18.5% to 52.5%—or
by a ratio of 2.838 (0.525/0.185 = 2.838) (lift ratio)
That is, the strength of the association between the antecedent and the consequent is higher than we would expect if they were independent
of each other.
Thus, the lift ratio of a rule is defined as the confidence of a rule divided by the estimated probability of its consequent:
Lift Ratio = Confidence/P(consequent)
The lift ratio is a measure of the usefulness of a rule. A lift ratio greater than 1.0 suggests there is some usefulness to a rule—and the greater
the lift ratio, the greater the usefulness of the rule.
Algorithms used to identify association rules first identify item sets that exceed a user-specified minimum support level. Using those
qualifying item sets, the algorithms then generate If-Then rules, retaining those that exceed a user-supplied minimum confidence level.

You might also like