Do popular product pairs stay popular? A market basket analysis example

We followed one UK giftware retailer’s leading product pairs into the next year. Their later rankings tell only part of the story.

Original analysis of historical invoice records from one UK giftware retailer, 2009–2011.

Abstract

In this historical market basket analysis example from one UK giftware retailer, seven of the 20 leading product pairs in 2009–2010 remained in the next year’s top 20. All 20 original pairs still appeared together and met the later ranking’s minimum counts. A lower position therefore did not mean that co-purchase had stopped.

We analyzed 19,645 eligible invoices from December 2009–November 2010 and 18,877 from December 2010–November 2011 in Online Retail II. The source covers one UK giftware retailer with many wholesale customers. We ranked pairs by how often they appeared together, kept the original shortlist fixed, and checked it against a separately selected later top 20. The practical implication is to review dated pair evidence before reusing it in a campaign brief. These records do not measure whether recommending or bundling products causes additional sales.[1][2]

Imagine a merchant preparing a new product collection. Last year’s planning document already has a list of items customers often bought together. Reusing that list is an easy starting point, especially when a creator needs a brief and the campaign deadline is approaching. But what should the team check before carrying those pairings forward?

We approached that question through a historical case. We selected the first year’s leading pairs and compared those same pairs with the second year’s records. The list changed substantially at the top, while the original pairs continued to appear together.

That distinction is the useful part of the example. Market basket analysis can show which products share an invoice. Turning the result into a cross-selling strategy also requires understanding the dates, the denominator and the business decision the numbers are meant to inform.

A pairing returns to the planning desk

Conceptual generated illustration of two archive trays holding giftware-pair cards, with generic heart and strawberry boxes, a blank notebook and a pencil in front.
Conceptual generated illustration of a merchant reviewing a product pairing across planning periods. The objects do not reproduce the retailer’s catalog or encode the study results.

Seven pairs stayed in the top 20. All 20 still appeared together.

Only seven of the original 20 product pairs appeared in the next year’s independently ranked top 20. That is 35.0% of the shortlist. Yet both products in every original pair still appeared in later eligible invoices, and every pair still met the same minimum counts for inclusion in the ranking.

These observations answer different questions. Staying in the top 20 means a pair remains near the front of a competitive list. Appearing together means there is still evidence of co-purchase. A product pair can meet the second condition while falling well down the ranking.

We selected the original pairs using invoices dated December 1, 2009 through November 30, 2010. We then kept that list unchanged and followed the same product codes through December 1, 2010 to November 30, 2011. The later top 20 was selected afresh from all eligible pairs in the later year, including pairs outside the original list.[2]

The comparison uses 19,645 eligible invoices in the first year and 18,877 in the second. Invoices with only one qualifying product remain in those totals. Before exploring the complete lists below, consider what happened to the first year’s leading pair.

The leading trinket-box pair shows why the denominator matters

The first year’s leading pair was the Sweetheart ceramic trinket box, product 21231, and the Strawberry ceramic trinket box, product 21232. The analysis plan specified the original number-one pair as the worked example before its later results were calculated.

The two boxes appeared together on 766 of 19,645 eligible invoices in the first year, or 3.9%. In the later year they appeared together on 320 of 18,877, or 1.7%, and ranked 153rd among eligible pairs. The pair had moved far down the list while still appearing together hundreds of times.

Now narrow the question to invoices containing the Sweetheart box. In the later year, 492 eligible invoices included it, and 320 of those also included the Strawberry box. Dividing 320 by 492 gives 65.0%. That percentage describes co-purchase within the Sweetheart-box invoices. It does not describe the share of all invoices containing both products.

Reversing the question changes the denominator. The Strawberry box appeared on 791 later invoices; 320 also contained the Sweetheart box. The result is 40.5%. Neither direction establishes which item was chosen first. These are two views of the same unordered pair.

One trinket-box pair, four explicit denominators

The worked example is the original rank-1 pair: Sweetheart ceramic trinket box (21231) and Strawberry ceramic trinket box (21232). Each percentage uses the base named in its row.

Data table: trinket-box product shares and conditional co-purchase shares with exact bases
MeasureFirst-year numeratorFirst-year baseFirst-year shareLater numeratorLater baseLater share
Sweetheart box among all eligible invoices96019,6454.9%49218,8772.6%
Strawberry box among all eligible invoices1,58219,6458.1%79118,8774.2%
Strawberry box among invoices with Sweetheart76696079.8%32049265.0%
Sweetheart box among invoices with Strawberry7661,58248.4%32079140.5%
All values concern the same fixed pair. First year: December 2009–November 2010; later year: December 2010–November 2011. The two conditional directions do not imply purchase order, product exposure or a causal effect.

The product counts also changed. The Sweetheart box appeared on 960 eligible invoices in the first year and 492 in the second; the Strawberry box appeared on 1,582 and 791. Those counts supply context for the lower joint count. The records do not explain why the products appeared less often.

For a merchant, this separates two decisions that can otherwise be blurred. A broad campaign may need to consider a pair’s share of all eligible invoices. A suggestion shown beside one specific product raises a narrower question about invoices already containing that product. Historical co-purchase can inform which idea to examine, but neither percentage estimates the extra sales a suggestion would create.

A claim such as “this recommendation converts at 65%” would therefore misread the evidence. We have no recommendation exposure, campaign assignment or comparison group here. The observed 65.0% is 320 out of 492 historical invoices, not a conversion rate for an intervention.

Explore both complete product-pair lists

The first table keeps all 20 original pairs in their original order. “Together” counts eligible invoices containing both products. The share divides that count by all eligible invoices in the relevant year: 19,645 in the first year and 18,877 in the second. Open the supporting tables to inspect individual product counts and the independently selected later list.

The complete original shortlist, followed into the later year

All 20 original pairs are shown in their first-year order. Both products remain observed, every pair still meets the later minimum counts, and seven remain in the later top 20.

Show all 20 original pairs and their later results
Data table: all original product pairs, joint counts, shares and later ranks
Product pair (original rank)Together: first yearFirst-year shareTogether: later yearLater-year shareShare changeLater rank
1. Sweetheart ceramic trinket box (21231) + Strawberry ceramic trinket box (21232)7663.9%3201.7%-2.2 percentage points153Outside the later top 20
2. Red hanging heart tealight holder (21733) + White hanging heart tealight holder (85123A)7423.8%4682.5%-1.3 percentage points44Outside the later top 20
3. Retrospot cupcake cases, pack of 72 (21212) + Teatime cupcake cases, pack of 60 (84991)7263.7%4252.3%-1.4 percentage points58Outside the later top 20
4. Retrospot cupcake cases, pack of 72 (21212) + Pink paisley cupcake cases, pack of 60 (21977)6623.4%4082.2%-1.2 percentage points68Outside the later top 20
5. Red Retrospot jumbo bag (85099B) + Strawberry jumbo bag (85099F)6423.3%5212.8%-0.5 percentage points21Outside the later top 20
6. Pink jumbo bag with white spots (22386) + Red Retrospot jumbo bag (85099B)5973.0%8044.3%1.2 percentage points1In the later top 20
7. Suki jumbo storage bag (21931) + Red Retrospot jumbo bag (85099B)5943.0%6923.7%0.6 percentage points3In the later top 20
8. White-finish wooden picture frame (82482) + Antique-white wooden frame (82494L)5712.9%5162.7%-0.2 percentage points23Outside the later top 20
9. HOME letter blocks (21754) + LOVE letter blocks (21755)5582.8%2921.5%-1.3 percentage points199Outside the later top 20
10. Pink paisley cupcake cases, pack of 60 (21977) + Teatime cupcake cases, pack of 60 (84991)5552.8%3331.8%-1.1 percentage points138Outside the later top 20
11. Red spotty lunch bag (20725) + Black skull lunch bag (20727)5532.8%6093.2%0.4 percentage points6In the later top 20
12. Red spotty lunch bag (20725) + Pink Retrospot lunch bag (22384)5422.8%5853.1%0.3 percentage points8In the later top 20
13. Red spotty Charlotte bag (20724) + Pink-and-white spotty Charlotte bag (22356)5402.7%4862.6%-0.2 percentage points35Outside the later top 20
14. Red Retrospot jumbo bag (85099B) + Black-and-white Baroque jumbo bag (85099C)5242.7%5593.0%0.3 percentage points13In the later top 20
15. Red spotty lunch bag (20725) + Red Retrospot jumbo bag (85099B)5182.6%5633.0%0.3 percentage points11In the later top 20
16. Red spotty lunch bag (20725) + Suki lunch bag (22383)5152.6%6323.3%0.7 percentage points5In the later top 20
17. Strawberry ceramic trinket box (21232) + White hanging heart tealight holder (85123A)5122.6%2411.3%-1.3 percentage points394Outside the later top 20
18. Small wicker heart (22469) + Large wicker heart (22470)5042.6%4802.5%0.0 percentage points40Outside the later top 20
19. Red spotty lunch bag (20725) + Woodland lunch bag (20726)4962.5%5082.7%0.2 percentage points26Outside the later top 20
20. Antique-white wooden frame (82494L) + White hanging heart tealight holder (85123A)4942.5%3191.7%-0.8 percentage points154Outside the later top 20
First year: December 2009–November 2010, 19,645 eligible invoices. Later year: December 2010–November 2011, 18,877. Together means both product codes occur on the same eligible invoice. Shares use all eligible invoices, including single-product invoices. Changes use unrounded shares; a displayed 0.0 can hide a small change. Product names are readable descriptions of the source labels; the unchanged product codes identify the records.

Read the count, share and later rank together. A count describes the number of invoices containing a pair; the share also accounts for the different number of eligible invoices in each year. Rank describes its position against other qualifying pairs. None of these measures tells us whether a promotion worked.

The cutoff was unambiguous in both years. The final selected pair had no equally counted pair left outside the list. Changing the tie-break at the later cutoff therefore leaves the overlap at seven. This is a check of the ranking rule, not a statistical confidence interval.[3]

How often each product appeared, with or without its partner

Individual product counts for the same original 20 pairs. A and B follow the product order in each row; they do not indicate which product was bought first.

Show individual product counts for all 20 original pairs
Supporting data table: both product marginals for all original pairs
Product pairProduct A: first yearProduct B: first yearProduct A: later yearProduct B: later year
Sweetheart ceramic trinket box (21231) + Strawberry ceramic trinket box (21232)9601,582492791
Red hanging heart tealight holder (21733) + White hanging heart tealight holder (85123A)1,0123,1787032,180
Retrospot cupcake cases, pack of 72 (21212) + Teatime cupcake cases, pack of 60 (84991)1,7701,2751,265788
Retrospot cupcake cases, pack of 72 (21212) + Pink paisley cupcake cases, pack of 60 (21977)1,7701,0991,265829
Red Retrospot jumbo bag (85099B) + Strawberry jumbo bag (85099F)1,8991,0152,019788
Pink jumbo bag with white spots (22386) + Red Retrospot jumbo bag (85099B)1,0161,8991,1862,019
Suki jumbo storage bag (21931) + Red Retrospot jumbo bag (85099B)1,1271,8991,1302,019
White-finish wooden picture frame (82482) + Antique-white wooden frame (82494L)8991,0781,066925
HOME letter blocks (21754) + LOVE letter blocks (21755)1,2711,052756612
Pink paisley cupcake cases, pack of 60 (21977) + Teatime cupcake cases, pack of 60 (84991)1,0991,275829788
Red spotty lunch bag (20725) + Black skull lunch bag (20727)1,4741,0601,5071,212
Red spotty lunch bag (20725) + Pink Retrospot lunch bag (22384)1,4741,0031,5071,051
Red spotty Charlotte bag (20724) + Pink-and-white spotty Charlotte bag (22356)981821978704
Red Retrospot jumbo bag (85099B) + Black-and-white Baroque jumbo bag (85099C)1,8999362,019888
Red spotty lunch bag (20725) + Red Retrospot jumbo bag (85099B)1,4741,8991,5072,019
Red spotty lunch bag (20725) + Suki lunch bag (22383)1,4741,1001,5071,241
Strawberry ceramic trinket box (21232) + White hanging heart tealight holder (85123A)1,5823,1787912,180
Small wicker heart (22469) + Large wicker heart (22470)9361,0211,159895
Red spotty lunch bag (20725) + Woodland lunch bag (20726)1,4748931,507965
Antique-white wooden frame (82494L) + White hanging heart tealight holder (85123A)1,0783,1789252,180
Counts use the same eligible invoice populations as the main table. Every original product remains observed later. A product can appear in several rows because it belongs to more than one pair. Do not add these counts to estimate distinct invoices.

The later shortlist answers a separate question: which pairs were most common together in the second year under the same eligibility and ranking rules? It is not a rearrangement of the original 20. Every eligible later pair could enter it.

Keeping the two lists separate prevents a subtle change of question. If we replaced the original list with the later winners, the report would describe a new shortlist without showing what happened to the one a team might have carried forward. Both views are useful: one audits an earlier choice, while the other identifies candidates for a new review.

The independently selected later top 20

These pairs are ranked across all eligible pairs in December 2010–November 2011. The list is not restricted to the original shortlist or its product codes.

Show all 20 pairs in the later shortlist
Supporting data table: complete later shortlist with joint and individual product counts
Product pairLater rankInvoices with bothInvoices with product AInvoices with product B
Pink jumbo bag with white spots (22386) + Red Retrospot jumbo bag (85099B)1Also in the original shortlist8041,1862,019
Green Regency teacup and saucer (22697) + Rose-pattern Regency teacup and saucer (22699)27339741,025
Suki jumbo storage bag (21931) + Red Retrospot jumbo bag (85099B)3Also in the original shortlist6921,1302,019
Vintage red paisley jumbo shopper (22411) + Red Retrospot jumbo bag (85099B)46531,1182,019
Red spotty lunch bag (20725) + Suki lunch bag (22383)5Also in the original shortlist6321,5071,241
Red spotty lunch bag (20725) + Black skull lunch bag (20727)6Also in the original shortlist6091,5071,212
Green Regency teacup and saucer (22697) + Pink Regency teacup and saucer (22698)7601974726
Red spotty lunch bag (20725) + Pink Retrospot lunch bag (22384)8Also in the original shortlist5851,5071,051
Green Bakelike alarm clock (22726) + Red Bakelike alarm clock (22727)9584910975
Pink Regency teacup and saucer (22698) + Rose-pattern Regency teacup and saucer (22699)105677261,025
Red spotty lunch bag (20725) + Red Retrospot jumbo bag (85099B)11Also in the original shortlist5631,5072,019
Black skull lunch bag (20727) + Suki lunch bag (22383)125591,2121,241
Red Retrospot jumbo bag (85099B) + Black-and-white Baroque jumbo bag (85099C)13Also in the original shortlist5592,019888
Vintage doily jumbo bag (23203) + Red Retrospot jumbo bag (85099B)145551,1832,019
Red spotty lunch bag (20725) + Spaceboy lunch bag (22382)155391,5071,112
Red spotty lunch bag (20725) + Blue car-pattern lunch bag (20728)165331,5071,103
Apple-pattern jumbo bag (23199) + Red Retrospot jumbo bag (85099B)175319432,019
Scandinavian blue paisley jumbo bag (21928) + Red Retrospot jumbo bag (85099B)185267812,019
Blue car-pattern lunch bag (20728) + Suki lunch bag (22383)195251,1031,241
Black skull lunch bag (20727) + Pink Retrospot lunch bag (22384)205241,2121,051
Later-year denominator: 18,877 eligible invoices. Each product appears on at least 50 invoices and each pair together on at least 20. Ranking uses joint count, then codes. The last selected pair occurs together on 524 invoices, with no equally counted pair omitted at the cutoff. Product A is the first named product in each row, and B is the second; this order does not indicate which was bought first.

The complete later table includes each product’s individual invoice count as well as the joint count. These counts do not establish that the products make a sensible bundle. Descriptions identify the recorded products; they are not evidence of compatibility, margin, stock availability or a shared customer need.

Use the evidence to sharpen a campaign brief

For a merchant planning a collection or cross-sell campaign, this case supports a practical question: what evidence would justify carrying an old pairing into the next brief? The answer needs a date, a defined set of invoices and a clear reason for the proposed placement.

Start by preserving the shortlist that informed the earlier decision. Keep its product identifiers and the period used to select it. When new records arrive, follow those same pairs before replacing them with current favorites. That makes a change in the evidence visible and gives colleagues a shared basis for discussing it.

Then connect the evidence to the actual placement. A collection page, a product-page suggestion and a creator demonstrating several products are different uses of a pairing. Ask what the customer will see, which product brings them into the experience, and what question the content should answer. Co-purchase records alone do not settle those editorial choices.

Creators can use the same distinction when reviewing a brand brief. A claim that two products are often bought together should come with its period and base. Ask whether the claim concerns all orders or only those containing one named item. That clarification helps a script describe the evidence accurately without promising a result the brand has not measured.

Before choosing the final products, the team still needs current information about stock, pricing, product fit and the proposed offer. Those are inputs for the business to supply, not explanations we can recover from this historical archive. If a campaign goes ahead, evaluate its effect using an appropriate comparison and the business’s existing measurement setup.

Carry the evidence into the next brief

Conceptual generated infographic showing a folder of product cards, a magnifying glass over an open book and paired cards, and a creative board with a pencil.
  1. Keep the original list

    Retain the product identifiers, selection dates and reason for choosing each pair.

  2. Check later evidence

    Follow the same pairs and compare counts, denominators and position under a consistent rule.

  3. Prepare the brief

    Combine the evidence with current product information and define the proposed placement.

Conceptual generated planning illustration. The steps suggest a workflow; the study did not test its effect on sales.

The worksheet below turns that discussion into a brief that can be reused. Complete the evidence review first, then transfer the selected idea into the linked social media campaign template. This keeps the reason for choosing a pair attached to the creative work without treating the old ranking as a recommendation engine.

Copy this worksheet before reusing a product pair

Use this template for one proposed pairing. It is an ungated planning aid, not a scoring system. Enter your own dates and counts; the historical trinket-box figures are an explanation of the method, not suggested targets.

1. Decision and placement: [collection, product-page suggestion or creator brief] · [customer question the content should answer] · [person responsible for the choice]. Describe what will be shown and why the pairing is being considered.

2. Original evidence: [product A identifier and name] · [product B identifier and name] · [start and end dates] · [what qualifies as an invoice or order in this analysis]. Keep the original pair even if its later position changes.

3. Later evidence: [later start and end dates] · [all eligible invoices] · [invoices with A] · [invoices with B] · [invoices with both]. Use the same definitions across periods and retain one-product invoices in the all-invoice base.

4. Comparison: [original and later joint counts] · [joint count ÷ all eligible invoices for each period] · [later rank under the same rule]. If you add an anchor-product percentage in your own analysis, name the anchor and show its denominator. Record unavailable information as unavailable rather than filling it with zero.

5. Commercial check: [current stock and pricing] · [reason the products belong together in this placement] · [open question for the merchant or creator]. Keep this business judgment separate from the historical calculation.

6. Next decision: [retain, reconsider or gather more information] · [reason supported by the evidence] · [owner and next review date]. If you test a campaign, state separately how you will assess its effect. A change in a pair’s rank is not a campaign result.

A completed brief should let another person trace the proposed pairing back to its evidence and understand what still needs checking. It should also remain usable when the ranking changes: the record of the original decision is part of the review, not something to overwrite.

How we built and checked this market basket analysis

We used Daqing Chen’s Online Retail II dataset from the UCI Machine Learning Repository. Its source describes transactions from one UK-registered non-store giftware retailer, with many wholesale customers, from December 1, 2009 to December 9, 2011. Our comparison uses the two complete December–November periods and leaves the final partial December outside the analysis.[1]

An analytical basket is one eligible numeric invoice with at least one qualifying product. Each distinct product counts once per invoice, regardless of quantity, repeated lines or worksheet overlap. A repeated customer can contribute several invoices. Missing customer identifiers do not by themselves remove an invoice, because this question concerns product pairs rather than unique people.[2]

We use a conservative positive-product cohort. An invoice is excluded if an in-scope product line has a nonpositive or invalid quantity or price, or if specified identifier and timestamp checks fail. Cancellation-prefixed invoices cannot create a basket. We do not link cancellations back to earlier invoices or claim that the remaining records represent fulfilled orders. The package documents product-code scope and all exclusions.[2]

In the first year, 23,269 numeric invoices minus 3,624 excluded invoices left 19,645 eligible invoices. In the later year, 21,192 minus 2,315 left 18,877. An invoice can fail more than one check, so the exclusion reasons overlap; their individual counts must not be added together. These are invoice counts, separate from the source’s line-record count.[2]

For a pair to enter either year’s ranking, it must appear together on at least 20 eligible invoices, with each product appearing on at least 50. These were fixed display-support choices, not significance tests. We rank by joint invoice count, then product codes for ties. All original pairs remain in the later comparison whether or not they satisfy those later floors.

We fixed the periods, selection rule, outputs and worked-example choice before examining the pair results. Two separately written calculations reproduced the complete lists, counts, shares and tie checks. Results describe this historical archive; they are not estimates for today’s retailers or a representative sample of consumers.

Market basket analysis and checking patterns in later data are established practices. Our contribution is this reproducible audit of a specific dated shortlist, with every selected pair retained. It does not introduce a new algorithm or claim the first study of changing product associations.[4][5]

No sign-up required. The files contain aggregate product-pair results and the English technical method. They contain no invoice identifiers, customer identifiers or raw transaction records. Source data are available separately from UCI under CC BY 4.0.[6]

Sources and notes

  1. Daqing Chen, Online Retail II, UCI Machine Learning Repository, DOI 10.24432/C5CG6D. Source coverage is December 1, 2009–December 9, 2011; one UK-registered non-store retailer selling giftware, with many wholesalers. UCI reports 1,067,371 invoice-line records and documents missing values. Influence IQ calculated the aggregate results shown here.
  2. Influence IQ protocol and reproduction package. The first period is December 1, 2009–November 30, 2010; the second is December 1, 2010–November 30, 2011. Eligibility is calculated within each period after a source-level identity/date integrity check. Product quantities do not weight pairs; single-product invoices remain in the denominator. Exact counts, fractions, exclusions and source hashes are included; invoice and customer records are not.
  3. The ranking uses joint invoice counts, then normalized product codes to resolve ties. Both selected cutoffs have one pair and no omitted equally counted pair. The later-cutoff overlap range is therefore seven to seven. Percentages and percentage-point changes are calculated from exact fractions, then rounded independently to one decimal. A displayed 0.0 change can hide a small change; subtracting rounded shares may give a different result.
  4. Published work on the conflict-aware CAR2DS recommendation framework uses UCI retail data and includes temporal relevance and stability. It is relevant prior work, not validation of the campaign effectiveness of the pairs shown here. Our contribution is the defined historical shortlist audit.
  5. The 2026 sparse-transaction association-rule study in Mathematics, volume 14, article 3598, evaluates rules in a strictly later period and discusses shortlist stability. Later-period evaluation is an established principle, not a method invented by this article.
  6. Online Retail II is distributed under Creative Commons Attribution 4.0. This article credits the source and identifies Influence IQ’s aggregate transformations. The technical package links to the original dataset for readers who wish to reproduce the analysis; it does not redistribute the raw workbook.

Article text, table labels and the worksheet are available in ten languages. The source product codes are unchanged; the technical reproduction package is in English. Every edition describes the same historical UK retailer and analysis periods.

Continue the review