Market Basket Analysis (Data Mining)
Data mining is about finding patterns already sitting in data you've collected — not, like machine learning, using those patterns to predict something about a new case you haven't seen, and not, like AI, acting on that prediction. Market basket analysis is a classic example: it just looks for which items tend to get bought together. Leaf and Kettle is a tea shop whose point-of-sale system logs every order as a list of items bought together — a "basket" — and whose counter carries a small stand of pencils and paper for the study crowd alongside the tea. Below are 100 real-looking orders from Leaf and Kettle, each basket icon in the grid doubling as a percent chart — pick two items and see how often they actually turn up together.
Each small basket in the grid is one order — filled and coloured if it contains Item A, Item B, or both, empty if it contains neither. Choose two items from the dropdowns below and watch the grid and the three numbers update. Try Honey and Lemon first — a genuinely strong pairing — then Pencil and Paper, a different aisle entirely but the same "one implies the other" shape. Then try Black Tea and Pencil: they are bought for different reasons, so they almost never share a basket and lift sits far below 1 (often exactly 0). Finally try Black Tea and Shortbread: an impulse add-on with no connection to the tea, so lift lands close to 1. Press New data a few times to watch it wobble around 1 by chance.
What this teaches: Pick two products and see how often they are bought together, measured by support, confidence and lift. It teaches association-rule mining, the idea behind market basket analysis, and why lift says more than raw co-occurrence.