# Market Basket Analysis: What is it?

> Market Basket Analysis identifies products purchased together. A practical guide with support, confidence, lift, and real retail examples.

Source: https://www.erathos.com/en/blog/market-basket-analysis
Em português: https://www.erathos.com/blog/market-basket-analysis
Published: 2023-03-17
Category: Business Intelligence & Analytics

![Product association chart for Market Basket Analysis with support and confidence metrics](https://cms-media.erathos.com/E1LKt7cBMn3OEDwBcZnNWsHqWc-1.png)

Market Basket Analysis is a [data mining](https://www.techtarget.com/searchbusinessanalytics/definition/data-mining) technique used to analyze relationships and interactions between consumer data. It is primarily applied in retail to understand customer behavior patterns, extracting actionable insights to drive sales.

Part of this analysis involves processing large volumes of data to identify the main product combinations chosen by consumers at a given store, as well as their preference for one or more product lines and items.

## How Market Basket Analysis is Used

Market Basket Analysis (or "MBA") emerged from the need to understand consumers' shopping preferences. This type of analysis was accelerated by the adoption of digital point-of-sale systems, which replaced manual inventory and purchasing logs.

Today, it is possible to collect a high volume of highly complex and precise data regarding what is sold in one or more stores, allowing for more detailed analyses of all the scenarios involved in choosing specific items.

Data mining helps generate insights into transactional and relational elements within the analyzed scenario. This practice is used across companies in various sectors to boost sales by extracting key insights from available data and leveraging them for critical decision-making, such as: promotions, determining the best product bundles to offer, store layout optimization, and even deciding whether to continue stocking certain product lines.

This analysis helps identify consumer purchasing habits by using statistical and mathematical techniques to find associations between items in customers' shopping carts. This reveals their preferences across diverse sales channels, from small convenience stores to large e-commerce platforms.

## Types of Market Basket Analysis

**Predictive Analysis**: This type of analysis considers items purchased sequentially to enable effective product cross-selling.

**Descriptive Analysis:** Even though the main goal of Market Basket Analysis is to extract insights from consumers' shopping baskets, descriptive techniques are applied during data collection: who bought what, when, how much was spent, etc.

**Differential Analysis**: Differential market basket analysis compares data from different stores or sellers, as well as purchases from different customer groups on distinct dates and times, alongside other variables relevant to understanding sales drivers. This dataset helps identify consumption patterns that support sales, enabling data analysts to pinpoint the exact factors driving revenue.

### Using Algorithms for Market Basket Analysis

Algorithms and programming languages that support [association rules](https://towardsdatascience.com/a-gentle-introduction-on-market-basket-analysis-association-rules-fa4b986a40ce) are commonly used for MBA, as they feature mechanisms that help capture the frequency of items occurring together in a dataset and seek to find their relationship with others that occur more frequently than expected. Some algorithms that rely on these rules and can be applied to this analysis include:

- Apriori
- AIS
- SETM
- NBMiner
- Opusminer
- RKEEL

### Examples of Market Basket Analysis in Action

A great way to conceptualize something that seems abstract is to look at everyday examples. One of the most famous nowadays is online retail and marketplaces, which use algorithms to understand their consumers' preferences and offer the most relevant products based on their needs or tastes.

Examples of this analysis can be seen in popular e-commerce platforms in Brazil, such as Mercadolivre, Magazine Luiza, and Amazon, which include sections on their websites showing potential customers the most purchased items, as well as items frequently bought together with what is currently in their shopping cart.

Another clear example is its use in marketing to deliver more personalized ads to consumers, showcasing products they are highly likely to enjoy.

A famous example of highly accurate MBA usage involved the major US retailer Target, which sparked [a controversy](https://www.forbes.com/sites/kashmirhill/2012/02/16/how-target-figured-out-a-teen-girl-was-pregnant-before-her-father-did/?sh=2917c8966668) by predicting a teenager's pregnancy before her own father knew. By analyzing the purchasing patterns of its pregnant customers, the retailer was able to identify common products in their baskets and created a statistical model capable of even predicting the baby's estimated due date.

But this doesn't just happen in online stores. We frequently see the fruits of this analysis in brick-and-mortar stores as well. For example: if a bookstore notices that customers often buy a specific book along with pens or a certain bookmark, they will place these items near the books to streamline the customer journey, increasing both average order value (AOV) and store productivity.

Market Basket Analysis is a prime example of how a well-defined data strategy and culture can help boost sales and improve customer relationships.

Major retail companies [already leverage](https://erathos.com/blog/ciencia-de-dados-nos-negocios/) this strategy to guide decision-making, driven by the need to deeply understand their customers to offer what they are looking for quickly and efficiently.

Want to learn more about how to be data-driven? Partner with Erathos and start your data journey today!
