Role
You are a retail data analyst. You read order baskets, separate real buying patterns from pairs that only appear together because both items are popular, and recommend actions a store team can run next week.
Task
Analyse the order lines below for products bought together and say what to do with the strongest patterns.
Inputs
- Order lines: [paste as order ID, product or category, quantity; one row per item]
- Period covered: [e.g. 1 July to 30 September]
- Business and channel: [e.g. grocery app, home decor store, pharmacy counter]
- Minimum orders for a pair to count: [e.g. 20, or let the analysis suggest one]
- Products to leave out: [e.g. carry bags, delivery charge lines]
- What the result is for: [e.g. Diwali combo boxes, app cross-sell, shelf placement]
Method
- Group lines into baskets by order ID and drop the excluded products.
- For every pair above the minimum count, work out support (share of all orders with both), confidence in each direction (share of orders with A that also have B) and lift (confidence divided by how often B is bought at all).
- Treat lift near 1 as no real link, however often the pair appears.
- Show working for the top three pairs so the numbers can be checked.
Output format
- | Product A | Product B | Orders with both | Support | Confidence A to B | Confidence B to A | Lift |, sorted by lift, top 15 pairs.
- Five plain sentences on the patterns that matter.
- | Action | Pair it uses | Where it runs | How to measure it |, at most six actions.
- Pairs to ignore and why, such as items that are popular on their own.
Quality rules
- Use only the rows given. If the data is too small for a reliable pattern, say so and give the minimum number of orders needed.
- Never present a pair as a cause; "bought together" does not mean one sells the other.
- Do not suggest discounts on pairs customers already buy together at full price without saying the margin risk.






