ABC... of Market Basket Analysis

Market Basket Analysis got simplified 

Which of all different products can be bundled together to attract customers and increase the sales ?
Which product should be recommended to a customer that he is most likely to buy ?

If you have these questions in your mind, well, here we are with the solution.



Let try to understand the concept of Market Basket Analysis using a very basic daily life example:

Suppose you own a grocery shop and 200 customers had visited your shop in last week to buy various products.

On the basis of last week's data, you identified that out of 200 customers, 100 of them bought bread, 80 of them bought Butter and 50 of them buy both bread & butter; We can say 50% (100 out of 200) of the customer buy Bread, 40% (80 out of 200) customers buy Butter and 25% (50 out of 200) buy both Bread & Butter.
Venn Diagram
Let's understand the key concept support, confidence and lift of MBA using above example. 

What is Support?

In our example, 50% of the customer buy Bread, 40%  customers buy Butter and 25%  buy both Bread & Butter.

In other language, we can say that 50% of the customer support Bread, 40% customers support butter and 25% support both bread & butter



Support(Bread) = 50% and Support(Butter) =40%

Support(Bread, Butter) =50/200 = 25%


Support of an item(product) is number of customer buying that item(product).

What is confidence?

Out of 100 customers who bought bread, 50 bought butter too.

Also we can say, we are 50%( 50/100) confident that if someone would buy Bread, he would also buy Butter.

Confidence (Bread, Butter)=50%.

Confidence is conditional probability that customer buy product A will also buy product B.

What is lift?

Lift means boost/increase/kick. So, here we are referring to  increase in sale by word Lift.

Lift means % increase in sale of butter if someone buys bread. In other words, if someone buys bread what % of chance of buying butter has been increased. So,

Percentage of customers who buy Butter only = 40%

Percentage of confidence of buying butter if someone buys bread = 50%

So basically, given we bundle up Bread and Butter together,

Percentage increase = ((0.50/0.40) - 1)  = 25% or

Value of the lift would be 1.25(.50/.40) but we can interpret it that chance of buying butter has been increased by 25%.





Summarizing the mathematical formulas :

If

A: Customers who buy bread

B: Customers who buy butter

T: All  Customers


We are analyzing that how much confident we are and by how much chances can be increased of Product B if someone has product A.We also called this technique as Association Rule Mining.


Market Basket Analysis in R with example


2 comments:

Do provide us your feedback, it would help us serve your better.