# Kenya Supermarket Report

What would you learn if you collected discarded supermarket receipts from Nairobi shoppers? That’s what Emmanuel Kens, Anthony Otieno, and I decided to find out. We got a bunch of street kids and paid them to collect the receipts on our behalf. A few months later we had 1,465 receipts enough for a sample size that accounts for parameters such as;

• location
• time
• day
• retail chain vs independent
• anchor tenant

(Snippet of the data below)

Using stratified sampling methodology , we undertook to perform a market-basket analysis on the dataset. A market-basket analysis seeks to figure out which items are bought together – this gives a glimpse into the purchase behavior of shoppers. There is an infamous story about Walmart conducting a market-basket analysis and discovered that on Friday afternoons, young American males who buy diapers also bought beer. This led them to moving the beer shelf next to the diapers shelf and thus sales skyrocketed.

The Data and Algorithm
We thus put ourselves to task of replicating the analysis. Despite the details in the receipt, the data our had one major drawback – the variation in product names across different supermarkets made it almost impossible to identify the same product. So we opted to create categories to identify the products such as; food, snack, beverage, disposable assets, fixed assets et cetera.  Factoring data entry and data transformation, the final dataset had been significantly culled to make it ingestible by algorithms.

Next – the best choice of algorithm for this kind of work is the apriori algorithm. It falls under the broader category of association mining which seeks to find association rules among variables. In apriori, the algorithm produces rules and ranked them by two metrics; support(how frequent a rule  occurs) and confidence(the degree to which a conclusion is right). Without further ado, let’s jump into the data.

The Customer
The data generated 1 million rules, most were obvious, but we are on the hunt for non-obvious rules which have high support and confidence values. The first rule was – on a weekday at a supermarket retail chain outside a mall, shoppers would spend less than Kshs 1,540 buying not more than 3 items. This rule had a support of 0.61 and confidence of 0.79, which means the rule covers 61 percent of the data and the conclusion is true 79 percent of the time. Digesting the insight, it shows us that supermarkets that don’t exist within a mall have 61 percent of their customers buying less than 3 items and spending Kshs 200 on average.

But what do these customers buy? The second rule of interest shows this band of customers purchase one type of item on the same average price range during weekdays in middle income locations outside malls. We had created a variable known as ‘variation’ which represented how much variation in product type a shopper has made. Example, buying rice, sugar, flour would results into a variation of 1 since all of products are food items. Buying rice, red bull and book results into a variation of 3 since the receipt has food, beverage and a disposable asset.

Using the above explanation, your typical shopper is inclined towards one type of product.  A receipt (basket), may have 30 items but all of them are food items. What does this tell us about the shopping behavior? It is mostly errand based, i.e a single purchase is either office supplies, house food items, office beverage et cetera. This means we have rare mixed-baskets for every purchase. However, we observed that people who buy fixed assets and other important items wouldn’t necessarily throw the receipt away. So take this conclusion with a pinch of salt.

The Bourgeoise
An old adage was debunked by the data – the rich buy assets, the middle class buy liabilities and poor basic needs . This is in deed changing. In the data, we segmented locations by high, middle and low income areas, and contrasted product bought as either low end  or high end versions i.e purchasing Red Bull or Snapps counts for high end version while Coca-Cola is low-end. In the “middle class”, 49 % percent of their purchase were food items and 56% of this are “the low end version”.

Another myth to bust is the use of mobile money. MPESA is a giant but it is yet to dominate retail purchase. From our data, a paltry 3.6% of the transactions were made by MPESA. In this, Bob Collymore was right when he mentioned that 90% of transactions still happen in cash thereby creating room for more players to provide mobile money solutions. Long live cash! Cards were used 1.8% of the time.

We got access to Q1 sales from Sokowatch, a Nairobi based fast consumer goods distribution company that aims to be a data-driven and intelligence distributor for emerging markets. Sokowatch predominately operates in mid to low income areas, these include; Umoja, Kayole, Donholm, Kibera, Baba Dogo, Kawangware among others. In their sales (shown below), the greatest improving category is assets, these include toothbrush, steelwool, pencils et cetera. It is a signal that the poor don’t just buy food, they are increasingly  purchasing other items including consumables (shoe shine, toothpaste, tissue paper) which has had a steady rise. However, they have less preference for snacks with have been dwindling in sales volume.

Economics of a Supermarket
Through the data we were able to reconstruct the sales of Karrymart supermarket. Located at KTDA Building along Moi Avenue, the single store supermarket is situated on one of the busiest foot path in the Central Business District and operates on 24 hours basis. On a typical weekday, the supermarket does 2,350 transactions with a value of about Kshs 360,000. This translates to about Kshs 10.8 million in revenue a month.

Without cost of goods, this revenue would attract a 23 percent profit margin which translates to Kshs 2.4 million. Digging into the business – it employs about 60 people (businessdaily) and using the industry’s average salary of kshs 25,000 ,the business is on the red with a wage bill of Kshs 1.5 million a month. This leaves Kshs 900,000 in profits. Including the rent drives the margins further down. This shows us how razor thin margin is the retail business and the bane of it is the cost of labour. Whoever automates first wins the game – that’s why Amazon is the king in this business.

Why Nakumatt Failed
The Anschluss forced upon Nakumatt by Tuskys was inevitable, not because of corporate governance but because of market orientation.  Data from Karrymart shows which items  have the highest sales volume and greatest profit margins.

1. Cooked Food – 43%
2. Mineral Water – 38%
3. Bakery – 34%
4. Dental Care – 25%
5. Dispensed Milk – 24%

You’ll notice Nakumatt does not have 3 out of the top 5 items. These are cooked food, bakery  and dispensed milk. All their major competitors (Tuskys and Naivas) have a food section and bakery. They missed this train a while back and it is simply market forces squeezing them out. Nakumatt Moi avenue which sits a few meters from Karrymart doesn’t offer these goods – it is natural for their customers to drift.

Dispensed milk features among the top 5 products in sales and margin. From Nakumatt’s  list of creditors, Brookside Dairy Limited and New KCC feature on top 2 with a combined loan of Kshs 740 million as shown below (businessdaily).  Letting a 3rd party install and run a milk vending machine within their stores would have cured Nakumatt of its dairy debt while having income that doesn’t go through their own sales.

Cover Photo by NeONBRAND on Unsplash

1. Interesting piece Orwa..chance Jumia have incorporated some of the ideas you shared in their business model?

Like

1. Thank you. Glad you found it useful. Implementation is a complex process, it needs careful review on how insights fit into existing operations.

Like

2. Data mining is crucial for every organization and is key to survival. Companies that offer this service and data analysis as well will provide a much needed service. Thanks for the insights.

Like

3. Data mining is crucial for the survival of businesses and companies that offer this as well as data analysis will have provided a much needed service. Thanks for this Orwa

Like

1. You are welcomed.

Like

4. Proper analysis this, keep up the good job.

Like

1. Thank you.

Like

5. Excellent work. Very informative. Keep it up.

Like

1. Thank you Samson.

Like

6. Very informative Chris. I like the statistical analysis and very articulate explanation. Is it possible to get a hold of the data? Thanks

Like

7. Can you share the data?

Like

1. Hi Vukosi,

Like

8. Very interesting findings. Some comments, I don’t think that having a milk machine would have much impact on Nakumatt fortunes. Consumers buy packed/processed milk just as much at supermarkets that also have machines. Nakumatt also had a bakery at some supermarkets, which were recently operated by Unga (Ennsvalley). Also could you extrapolate on the Coca Cola buyers’ paragraph?

Like

1. Thank you. Dispensed milk has better margins tan packed/processed milk, it could have given them more profits to plug other holes. Most of their stores don’t have a bakery – Junction, Moi Avenue, Galleria ….

The Coca-Cola paragraph was a comparison of the type of drink/beverage people opt to buy. Is it an expensive drink or cheap (i.e Coca-Cola vs Red Bull)

Like

9. […] (@blackorwa) has a blog on Kenya supermarket buyers, deciphering consumer patterns and habits of Nairobi shoppers by […]

Like

10. Great piece Orwa!!

Like

1. Thank you Kim.

Like

11. very informative keep up the good work

Like

1. Thank you.

Like

12. I go to tusks cause of the bakery and end buying other items. It’s the same with the milk. Next time analyze this effect statistically.

Like

13. Great piece of blog Orwa. Heko. Am a beginner in data mining and would you share the codes in R programming for this great article. Thank You

Like

1. Thank you for the kind words. Yes, I can certainly share the code. Allow me time to prepare the code in a notebooks

Like

1. sawa. Am waiting for your responce ASAP. can email danmbekenya254@gmail.com.
Asante.

Like

14. have used Association rule in your Analysis. Pleasure to know.

Like

15. Some super interesting research

Like

1. Thank you, Mungai.

Like

16. I appreciated what we did here. I enjoyed every little bit some of it. I am always trying to find informative information this way. Thanks for sharing around.

Like