Operations Analytics
Lesson opener
In one line: Operations analytics matches supply with demand — forecasts, elasticity, inventory, and capacity — so service and cost stay in balance.
Why it matters: Marketing growth that ops cannot fulfil becomes stockouts, overtime, and margin loss.
Before this lesson: Descriptive analytics; Prescriptive analytics for newsvendor/order quantity.
Goal
Match supply with demand profitably under uncertainty (inventory, staffing, capacity).
Demand forecasting
- Use historical demand at the right grain (SKU-week, store-day)
- Include seasonality (day of week, holidays)
- Measure error: MAPE, RMSE — compare models on holdout period
Price elasticity
Forecasting asks how demand moves with time; elasticity asks how it moves with price.
Price elasticity of demand = % change in quantity demanded ÷ % change in price.
Example intuition: raise price 10% — if demand drops only 2%, demand is inelastic (price hike can make sense); if it drops 15%, demand is elastic (volume loss likely wipes out the gain).
- |E| > 1 — elastic: Hold or lower — buyers leave when price rises
- |E| < 1 — inelastic: Raise can work — volume barely moves
- |E| = 1 — unit elastic: Revenue roughly flat either way
Worked example (SKU P12): Price ₹500 → ₹550; weekly demand 1,000 → 850 units.
- %ΔQ = (850 − 1,000) / 1,000 = −15%
- %ΔP = (550 − 500) / 500 = +10%
- E = (−15%) / (+10%) = −1.5 → |E| = 1.5 > 1 → elastic
Takeaway: Do not push another price increase on P12 — volume falls faster than price rises. Hold (or test a cut) and rely on the forecast for stocking, not on a richer unit price.
Inventory
| Concept | Meaning |
|---|---|
| Lead time | Delay from order to receipt |
| Safety stock | Buffer for demand variability |
| Reorder point | When to place order |
| EOQ | Economic order quantity (balance holding vs ordering cost) |
Capacity
- Utilization = busy time / available time
- Too high → queues, poor service; too low → wasted fixed cost
Risk and reward
- Expected value — probability-weighted outcomes
- Standard deviation — spread of outcomes
- Service level — % of demand met from stock (e.g., 95%)
Sample: weekly demand summary
import pandas as pd
ops = pd.read_csv("data/operations.csv")
weekly = ops.groupby(["product_id", "week"]).agg(
demand=("units_demand", "sum"),
fulfilled=("units_fulfilled", "sum"),
).assign(fill_rate=lambda x: x["fulfilled"] / x["demand"])Teacher walkthrough: fill rate then elasticity
All figures illustrative.
Step 1 — Measure service. From operations.csv, compute fill rate = fulfilled / demand by product-week.
Step 2 — Find chronic underperformers. SKUs with fill rate < 90% for 3+ weeks.
Step 3 — Separate demand shock vs supply failure. Rising demand + flat receipts → capacity/lead-time; flat demand + falling fulfilled → warehouse/process.
Step 4 — Price check. For a candidate price hike, compute elasticity (as in P12 example). If |E| > 1, do not "fix margin" with another increase.
Step 5 — Prescribe. Safety stock or expedite for supply-limited SKUs; hold price on elastic SKUs; feed order qty to Prescriptive.
Failure example: forecast without fill rate
Symptom: Forecast accuracy looked fine (low MAPE) while customers saw empty carts on bestsellers.
Diagnosis: Error metric on aggregate demand hid SKU-level stockouts; no fill-rate KPI in the pack.
Correction: Add fill rate and stockout hours beside MAPE; review at SKU-week grain.
Validation: Ops review blocks on any top-20 SKU with fill rate < 95% even if MAPE is green.
Guided practice
Demand 800, fulfilled 720. Fill rate? If elasticity on the same SKU is −1.5, do you raise price to "cover" stockouts?
Complete solution: Fill rate = 90%. No — raising price on an elastic SKU cuts volume further; fix supply/safety stock first.
Independent practice
Acceptance criteria:
- Fill rate (or service level) for at least one product with grain stated.
- Understock vs overstock tradeoff in one paragraph.
- Four-week forecast approach sketched (method + error metric).
- One SKU classified elastic/inelastic with a pricing takeaway.
Common mistakes
- Celebrating forecast MAPE while fill rate is red.
- Safety stock without stating service-level target.
- Price increases on elastic SKUs to mask supply failure.
- Capacity utilisation at 98% treated as success (queues explode).
Practice
Do this now (click):
Checklist
- [ ] I calculated fill rate or service level for a product
- [ ] I explained understock vs overstock tradeoff
- [ ] I sketched one forecasting approach for next 4 weeks
- [ ] I classified one SKU as elastic or inelastic and stated a pricing takeaway
- [ ] Acceptance criteria above are met