Market Basket Analysis

Market Basket Analysis, also known as affinity analysis, is a modeling technique used to identify which items are likely to be purchased together. It assumes that customers buy a subset of items (like "milk" and "bread") from a larger collection. Marketers use the information about which items customers have taken together to understand purchasing patterns, often represented by a rule such as Milk => Bread.

How is MBA used

This analysis is used to make practical business decisions. A common use is deciding the location and placement of items inside a store; for example, keeping bread and butter next to each other to tempt a customer to buy both. It is also used to create special combo offers, design the layout of an e-commerce catalogue, and manage inventory based on product demands. Furthermore, it can compare results between various stores or different customer demographic groups.

Applications of MBA

Frequent Itemsets

A frequent itemset is a set of items whose support (the frequency of its appearance in transactions) is greater than or equal to a pre-specified minimum support threshold. These sets of items, which appear together at least a certain number of times, are used to generate association rules. Finding them often involves a level-wise search (finding frequent-1 items, then frequent-2, and so on) and relies on the monotonicity principle: if a set of items is frequent, then all of its subsets must also be frequent.

Closed Itemsets

An itemset is considered closed if none of its immediate supersets have the same support count as the itemset itself. This means that if you add another item to the set, the new, larger set must appear less frequently in the transactions. If an itemset is both closed (no superset has the same support) and frequent (meets the minimum support threshold), it is known as a closed frequent itemset.

Association Rules

Association rules are used to find interesting relationships among items in a given data set. They work by examining transactions, such as shop carts, to find which items are commonly purchased together.

The rules have the general form:

$$ I_1 \rightarrow I_2 $$

Where I1 and I2 are sets of items, and the rule is read as: "Given that someone has bought the items in the set I1, they are likely to also buy the items in the set I2." This knowledge can be used in advertising or for placing goods in stores.