Interview Prep
Interview questions, roadmaps and practice sets
Tutorials
Free tutorials on 30+ topics
Blog
Career guides, skills and interview tips
Free PDFs
Notes, cheat sheets and question banks
Certificates
Free skill tests and course certificates
Tools & Whiteboard
Free tools you can use right in the browser
Practice Tests
Mock tests, MCQs and quick Q&A
Free LMS
Learn on the Uncodemy LMS
Choose the best training program according to your career.
Improve the performance of your business with our innovative Industrial Training Program.
Read More →
Our instructor-led training classes are designed to make you an expert.
Read More →
Real-life case studies are a great way to demonstrate your practical knowledge.
Read More →
Explore blogs, latest technologies and industry updates with practical examples.
Read More →Browse all available training programs and choose the right one for your career.
Read More →Know more about who we are and what we stand for.
Discover our mission to equip individuals with essential IT skills and industry expertise.
Read More →
Free tutorials, interview questions, tools and calculators to help you learn.
Explore →Learn, practice and plan your career — bilkul free.
Book a free video counselling session and pick the right course for you.
Read More →Why does a supermarket put biscuits near the tea aisle, and how does it know how many cartons of milk each store needs tomorrow? Both answers come from business analytics: using sales, stock and customer data to make everyday retail decisions. Below are the use cases retail analysts work on most, with the data each needs and one fully worked market-basket example.
| Use case | Question it answers | Main data | Typical method |
|---|---|---|---|
| Market basket analysis | Which products are bought together? | Bill-level (transaction) data | Association rules: support, confidence, lift |
| Demand forecasting and replenishment | How much of each item will each store sell next week? | Daily sales by SKU and store, promotions, festivals, weather | Time-series models, gradient-boosted trees |
| Assortment planning | Which products should each store stock? | Sales, margin, local customer profile, shelf space | Product contribution analysis, clustering of stores |
| Pricing and markdowns | What price, and when to discount slow stock? | Price history, sales response, stock age | Price elasticity, markdown optimisation |
| Store performance | Why does one store outperform another? | Footfall, bills, average bill value, conversion | KPI dashboards, benchmarking, variance analysis |
| Customer segmentation and loyalty | Who are our best customers and who is drifting away? | Loyalty-card or app purchase history | RFM analysis, clustering, churn models |
| Staffing | How many staff do we need each hour? | Hourly footfall and bill counts | Forecasting by hour and day of week |
| Shrinkage and loss | Where is stock disappearing? | Stock counts vs system stock, returns, voids | Exception reports, anomaly detection |
A neighbourhood store has these ten bills (a small made-up sample so the maths is easy to follow):
| Bill | Items |
|---|---|
| 1 | bread, butter, milk |
| 2 | bread, butter |
| 3 | milk, tea |
| 4 | bread, milk |
| 5 | bread, butter, eggs |
| 6 | tea, biscuits |
| 7 | bread, butter, milk, eggs |
| 8 | milk, biscuits |
| 9 | bread, eggs |
| 10 | tea, milk, biscuits |
Three measures describe a rule such as "bread → butter":
Lift above 1 means the items are bought together more often than chance; below 1 means less often. Here are three rules computed the same way (the short script below prints them):
['bread'] -> ['butter']: support=0.40 confidence=0.67 lift=1.67
['tea'] -> ['biscuits']: support=0.20 confidence=0.67 lift=2.22
['milk'] -> ['bread']: support=0.30 confidence=0.50 lift=0.83
bills = [
{"bread", "butter", "milk"}, {"bread", "butter"}, {"milk", "tea"},
{"bread", "milk"}, {"bread", "butter", "eggs"}, {"tea", "biscuits"},
{"bread", "butter", "milk", "eggs"}, {"milk", "biscuits"},
{"bread", "eggs"}, {"tea", "milk", "biscuits"},
]
n = len(bills)
def support(items):
return sum(items <= b for b in bills) / n # items is a subset of the bill
def rule(a, b):
s_ab = support(a | b)
conf = s_ab / support(a)
lift = conf / support(b)
return s_ab, conf, lift
for a, b in [({"bread"}, {"butter"}), ({"tea"}, {"biscuits"}), ({"milk"}, {"bread"})]:
s, c, l = rule(a, b)
print(f"{sorted(a)} -> {sorted(b)}: support={s:.2f} confidence={c:.2f} lift={l:.2f}")
Reading the result: tea → biscuits has the highest lift (2.22), so placing biscuits near tea, or a combo offer, is worth testing. Milk → bread has lift below 1: milk buyers are slightly less likely than average to buy bread, despite both being common. That is why lift matters: two popular items will often appear together just because both are popular.
On real data with thousands of products, analysts use the Apriori or FP-Growth algorithms (for example in the Python library mlxtend) to find rules above a minimum support and lift, then check them with store teams before acting.
Running out of a product loses the sale and sometimes the customer; overstocking ties up cash and, for fresh items, ends in waste. Forecasts are made per item per store, usually daily or weekly, and must handle:
The forecast feeds a reorder rule: order enough to cover expected demand until the next delivery plus safety stock for uncertainty.
A simple decomposition explains most differences between stores:
Sales = Footfall × Conversion rate × Average bill value
If Store A and Store B have similar footfall but A sells more, the gap is in conversion (more visitors buy) or bill value (each buyer spends more). Each points to different fixes: queue length and stock availability for conversion; cross-selling, assortment and pack sizes for bill value. A dashboard that shows these three numbers by store and week is often the first project a retail analyst builds; see building a sales analytics dashboard for a portfolio version.
Price elasticity estimates how demand changes with price. Staples like rice and oil tend to be less sensitive than discretionary items, but you measure it from your own sales data rather than assume it. Markdown analytics decides when and how much to discount ageing stock (end-of-season apparel, near-expiry food) to clear it while keeping as much margin as possible.
With loyalty-card or app data, retailers group customers by recency, frequency and spend, spot customers who are drifting away, and personalise offers. The same RFM method is shown with code in how data science is used in e-commerce. Customer data must be handled under India's Digital Personal Data Protection Act, 2023, so consent and purpose limits matter.
More general examples are in how businesses use analytics to improve revenue. Uncodemy's business analytics course covers SQL, Excel, Power BI and statistics with retail-style projects, and includes Dedicated Placement Support.