GOOGLE COLAB WORKSHEET
1. Complete the Market Basket Analysis using the instructions and data files on LEARN. Then insert
(copy and paste or screenshot) ONLY the df2 output in the space below (2 MARKS).
2. “Analyze” the results from Question 1 (3 MARKS).
In this small set of 10 shopping trips, people bought Oranges in exactly 8 baskets, Apples in exactly 8
baskets, and Bananas in exactly 8 baskets. Berries appeared in exactly 6 baskets, and Grapes
appeared in exactly 6 baskets. Pears were bought in only 1 basket (or possibly 2 at most, but far
below the level needed to show up in the main patterns).The clearest patterns involve groups of
these fruits being bought together. Pairs such as Oranges and Apples, Oranges and Bananas, Apples
and Bananas, and Grapes and Bananas each appeared together in exactly 6 of the 10 trips. Several
larger combinations like Oranges plus Apples plus Bananas, or Grapes plus Bananas plus Apples each
showed up in exactly 4 of the 10 trips. All the association rules the computer found describe
combinations that occurred in exactly 4 out of the 10 trips. Because the settings required perfect
reliability (100% confidence), every rule means that in this data, whenever the first fruit or group of
fruits was bought, the second fruit or group was bought every single time. The lift numbers (which
compare how often these pairs or groups actually happened versus what you'd expect from random
choices) range from about 1.11 to around 1.67 in most cases, with a few higher. This shows these
fruits were bought together noticeably more often than chance would suggest. Overall, the main
pattern is that shoppers who picked Oranges, Apples, or Bananas almost always picked at least one
or two of the others in the same trip, and Grapes or Berries often came along with them too. Pears
stayed separate and rare, with no real connection to the other fruits in these results.
3. Provide marketing “Insights” for the results (4 MARKS)
The association analysis results highlight actionable marketing opportunities for a fruit retailer by
revealing natural customer buying habits. Retailers can capitalize on the frequent pairing of Oranges,
Apples, and Bananas, appearing together in pairs in 6 out of 10 transactions and in larger
combinations in 4 out of 10, by offering bundled promotions such as a discounted three-fruit pack or
a buy two get the third cheaper deal to encourage bigger purchases per visit and raise average
transaction value (Graphite Note, 2025). The patterns where Grapes consistently pair with Bananas
or Apples, and Berries often join the main group, support placing these fruits next to each other on
shelves or at checkout areas to make it easy for shoppers to add related items, naturally promoting
cross-selling and expanding basket sizes (NeenOpal, n.d.; Datategy, 2025). Since these combinations
happen more often than would occur by chance, retailers can use simple in-store signs or digital
suggestions like "Customers who bought Grapes also bought Bananas" to reinforce the habits and
drive extra sales on complementary fruits (Datacentricity Hub, 2025). For Pears, which show up in
only one or two baskets with no strong connections, retailers could run a low-cost test by placing
them in small displays near the popular core fruits to check if better visibility sparks new pairings,
while generally giving them less shelf space to focus on the high-performing cluster of Oranges,
Apples, Bananas, Berries, and Grapes (Applexus Technologies, 2021). By applying these tactics
including bundling the core fruits, smart product placement, gentle cross-selling prompts, and
targeted handling of low-affinity items, retailers can align their marketing and store setup with real
customer patterns to boost sales, improve efficiency, and create a smoother shopping experience in
the fruit section.
4. Cite your sources for Q3 in APA 6th edition Format (1 MARK)
Applexus Technologies. (2021). Market basket analysis in retail and CPG analytics to increase revenue.
https://www.applexus.com/blogs/market-basket-analysis-in-retail-and-cpg-analytics-to-increaserevenue
Datacentricity Hub. (2025). Understanding market basket analysis for retail strategies.
https://datacentricityhub.blog/2025/05/05/understanding-market-basket-analysis-for-retail-strategies
Datategy. (2025). Boost sales with AI-powered market basket analysis.
https://www.datategy.net/2025/06/10/boost-sales-with-ai-powered-market-basket-analysis
Graphite Note. (2025). The commercial power of item basket analysis: Turning patterns into revenue.
https://graphite-note.com/the-commercial-power-of-item-basket-analysis-turning-patterns-intorevenue
NeenOpal. (n.d.). How market basket analysis helps retailers unlock cross-selling opportunities.
https://www.neenopal.com/how-market-basket-analysis-helps-retailers-unlock-cross-sellingopportunities.html