Market Basket Analysis

Market Basket Analysis is a data mining technique used to uncover relationships between items that customers frequently purchase together. It's the technique behind the classic "customers who bought this also bought..." recommendation.

How It Works

The analysis looks at large volumes of transaction data (each "basket" being one customer's purchase) to identify patterns - for example, discovering that customers who buy bread and peanut butter also frequently buy jam.

Real-World Applications

  • Product placement and store layout optimization
  • Cross-selling and bundled product recommendations
  • Targeted promotions and discount design
  • Inventory and supply chain planning

A Simple Example

Transaction 1: {Bread, Milk}
Transaction 2: {Bread, Diapers, Beer, Eggs}
Transaction 3: {Milk, Diapers, Beer, Cola}
Transaction 4: {Bread, Milk, Diapers, Beer}
Transaction 5: {Bread, Milk, Diapers, Cola}

Looking at these five transactions, you can already spot a pattern - Diapers and Beer tend to appear together frequently, a famous real-world example uncovered through market basket analysis.

Market basket analysis doesn't imply causation - just because two items are frequently bought together doesn't mean one purchase causes the other; it simply reveals a strong statistical association.

Coming Up Next

To actually uncover these patterns mathematically, you'll need to understand Association Rules - the formal framework behind Market Basket Analysis.

Ready to Master Data Science?

Join Uncodemy's Data Science Course and build real, job-ready skills with expert mentors.

Explore Course