Menu
numiqo
Statistics made easy

Statistics made easy

8th revised edition (March 2026) - many illustrative examples - only €8.99

Free sample

Market Basket Analysis (Association Analysis)

Author: Dr. Hannah Volk-Jesussek
Updated:

Load example data

Market basket analysis (also called association analysis) is a key method for uncovering relationships between items. It looks for combinations of items that frequently occur together in transactions. In other words, it helps retailers identify relationships between items that customers buy.

What does Association Analysis do?

Let's say you have set up your own online clothing store. Your goal is to achieve the highest possible revenue.

Market Basket Analysis

To achieve the highest possible sales, you want every customer to buy as much as possible. One way to encourage this is to suggest additional products. The key question is: Which product should you recommend? This is where market basket analysis or association analysis comes into play.

Association Analysis

Market basket analysis answers the question: How likely is it that a customer buys product A if they already have product B in their basket?

Market basket analysis tells you which products are often bought together. So if a customer already has jeans and shoes in the shopping cart, how likely is it that they will also buy a shirt, socks, or a t-shirt?

Market Basket Analysis Example

To calculate a shopping cart analysis, you need a list of past purchases where you can see which products were bought together in one transaction.

Market Basket Analysis data mining

You list the products and each row is a transaction. In this example, you have the products jeans, shirt, jacket, and shoes.

Market Basket Analysis sample data

Each row is a transaction or purchase. "1" means bought, "0" means not bought. So the first person bought jeans, shirt, and shoes.

Now, to get results we can interpret, let's first calculate a market basket analysis using numiqo for this data. To do this, go to the market basket analysis calculator in numiqo and copy your data into the table.

Now we can specify a minimum support and a minimum confidence. For this data, numiqo returns these association rules:

Association rules

Association rules have the form Lhs → Rhs. The left-hand side (Lhs) is the antecedent, and the right-hand side (Rhs) is the consequent. A rule describes how often the consequent is present in transactions that contain the antecedent; it does not mean that the antecedent causes the consequent.

Market Basket Analysis results interpretation

We look at the results of the basket analysis using the first set of association rules.

Market basket analysis Interpret results

Frequency

The frequency in the results table tells us how many transactions contain all the products under Lhs and Rhs. In our case, how many transactions contain both shirt and shoes?

So let's just count through how many transactions both occur in, which is 8 transactions.

Support

The support is the proportion of all transactions that contain both the antecedent and the consequent. So we divide their joint frequency by the total number of transactions.

There are 19 transactions in total, so we get 8/19, which is equal to 0.42. The observed proportion of transactions containing both shirt and shoes is therefore 42 percent.

Confidence

Confidence is the proportion of transactions containing the antecedent that also contain the consequent. It answers: Among transactions with the products under Lhs, what proportion also have the products under Rhs?

In our example this means: How likely is it that if shirt occurs in the cart, then shoes are also in the cart? We can calculate this by dividing the frequency of shirt and shoes by the frequency of shirt.

Lift

Finally, lift compares the confidence of a rule with the overall support of the consequent. A lift of 1 means no association, a value above 1 means that the items occur together more often than expected under independence, and a value below 1 means they occur together less often than expected. In our example, a lift of 1.27 means that shoes occur 1.27 times as often among transactions containing shirt as they do among all transactions. This is not the same as comparing transactions with and without shirt.

Market Basket Analysis and Data Mining

Shopping cart analysis is a method from the field of data mining. Depending on how much data is available, the analysis can be very computationally intensive.

However, with the Apriori algorithm, there are very effective methods to efficiently determine the association rules.

Critical Note on the Market Basket Analysis

Let's say your market basket analysis shows that if a person buys jeans and shoes, there is a high probability that they will also buy a shirt. Now you suggest a shirt to all customers who buy jeans and shoes. This increases the probability that a shirt will be bought under this condition, and a future market basket analysis will be biased.

Also interpret rules cautiously. Confidence can be high simply because the consequent is common, which is why lift should be considered as well. Very rare items can produce unstable rules, and searching many possible rules can reveal patterns that occurred by chance. Results also assume that transactions are suitable independent units; repeated purchases by the same customer may require additional consideration. Validate important rules with new data or a controlled test before using them for decisions.


Statistics made easy

  • many illustrative examples
  • ideal for exams and theses
  • statistics made easy on 464 pages
  • 8th revised edition (March 2026)

Only €8.99

Free sample
numiqo

"Super simple written"

"It could not be simpler"

"So many helpful examples"

Cite numiqo: numiqo Team (2026). numiqo: Online Statistics Calculator. numiqo e.U. Graz, Austria. URL https://numiqo.com