Design a profit comparison study for two competing retail locations
Statistics & ExperimentsModel answerLast updated
Plan data collection, analysis, and decision framework to reliably determine which of two side-by-side shops will be more profitable next quarter.
Two small retail shops operate next to each other at the same location, serving the same customer base during overlapping hours. You have a two-week observation window to determine which shop will generate higher profit over the coming three months, and your recommendation will guide a significant business decision.
Design a complete measurement and analysis framework that accounts for real-world complexity. Your plan should address:
-
Metric definition: Define the exact metric you'll use to compare profitability. Explain what revenue and cost components you'll include, how you'll handle differences in operating hours, and why your metric aligns with the decision at hand.
-
Data collection: Specify what data you need to collect, at what granularity, and why each piece is necessary. Consider both financial data and contextual factors that might affect sales.
-
Analysis approach: Describe how you'll isolate the true profitability difference between the two shops when they face common external factors (day of week, weather, local events) but also make independent business decisions (pricing changes, promotional discounts, operating hour adjustments). Your method should remain valid even when one shop changes its pricing mid-observation period.
-
Statistical inference: Specify the statistical model you would fit, how you'll construct confidence intervals with limited independent observations, and whether two weeks provides sufficient statistical power to detect a meaningful difference.
-
Operational safeguards: Describe how you'll detect and handle scenarios where observed sales don't reflect true demand (inventory issues, capacity constraints), and state your explicit decision rule for making the final recommendation.
The goal is a defensible, implementable plan that acknowledges uncertainty while providing actionable guidance.
Hints
Hint 1
Both shops share the same location and time period—use this simultaneity to cancel out confounding factors rather than trying to model them all explicitly.
Hint 2
Operating hour extensions and promotional periods aren't noise to remove; they're business regimes you need to estimate separately and then project forward based on which regime will persist.
Hint 3
With only 14 days, you have roughly 14 independent observations (daily aggregates), not hundreds of hourly ones—your inference approach must account for within-day correlation.
Model answer
Hard Try it yourself first — then compare your approach, complexity and edge cases.
Model Answer
Understanding the Core Challenge
This is fundamentally a forecasting problem: which shop will earn more over the next quarter? The key insight is that both shops share the same location, customer traffic, weather, and calendar events. This simultaneity is a gift—comparing them side-by-side naturally controls for these confounders without needing to model them explicitly.
The challenge lies in handling asymmetric business decisions (different hours, pricing changes, promotions) while making valid statistical inferences from limited data.
1. Metric Definition
Primary metric: Total operating profit per shop over the projection period.
Estimation unit: Contribution margin per shop-hour, defined as:
Contribution_{shop,hour} = Revenue
- Cost of goods sold (item-level)
- Transaction fees
- Variable labor for that hour
- Waste/spoilage
Fixed costs (rent, utilities, equipment) are allocated at the daily level, not per-hour, since one shop may operate longer hours.
Why this metric: We care about total profit, not per-customer or per-hour ratios. A shop operating extra evening hours with lower customer density may still add positive absolute profit. Normalizing by traffic or hours would penalize profitable business decisions.
Projection approach: Estimate contribution margins under each regime (weekday/weekend, promotional/regular pricing, pre/post pricing changes), then weight by next quarter's expected calendar mix and each shop's planned operating schedule.
2. Data Collection Requirements
| Data Element | Granularity | Purpose |
|---|---|---|
| Customer traffic | Hourly counts at entrance | Shared exposure measure |
| Transactions & basket values | Per-transaction | Revenue calculation |
| Product mix & margins | Per-item sold | Accurate COGS |
| Pricing history | SKU-level with timestamps | Detect changes, compute margins |
| Staff schedules | Hourly | Variable labor costs |
| Inventory issues | Time-stamped events | Demand censoring flag |
| Weather conditions | Hourly | Control for differential impact |
| Calendar events | Daily | School breaks, local events |
| Operating hours | Daily | Handle asymmetric schedules |
| Fixed costs | Daily/monthly | Rent, utilities allocation |
Validation: Conduct manual traffic counts twice daily to verify automated counters.
3. Analysis Approach
Core framework: A shop-by-hour panel with hour-of-study fixed effects.
Since both shops are observed simultaneously, these fixed effects absorb all common variation:
- Day-of-week patterns
- Weather impacts (at the location level)
- School calendar effects
- Shared traffic fluctuations
What remains is the profit gap between shops and how it varies across business regimes.
Handling specific complications:
-
Extended hours by one shop: Estimate the gap during overlapping hours only. Separately estimate the extending shop's contribution during its exclusive hours (net of additional labor and utility costs). Check whether sales during overlapping hours declined after the extension (evidence of cannibalization vs. genuine demand expansion).
-
Promotional discounts: Include shop×weekend interaction terms to capture regime-specific gaps. Check for demand pull-forward by examining whether post-promotion sales decline below baseline.
-
Mid-period pricing change: Use a difference-in-differences setup. The profit gap after the change minus the gap before gives the relative effect, which is exactly what matters for ranking. If the competitor also adjusts, that's already reflected in the comparison.
-
Weather differential effects: If shops differ in seating or shelter, include shop×rain interactions. Weather level effects are already absorbed by time fixed effects.
4. Statistical Model and Inference
Regression specification (for overlapping hours only):
Profit_{shop,hour} = α_hour
+ β·(ShopA)
+ γ·(ShopA × AfterPriceChange)
+ δ·(ShopA × Weekend)
+ θ·(ShopA × HighTrafficPeriod)
+ φ·(ShopA × Rain)
+ ε_{shop,hour}
Where:
- α_hour: Fixed effect for each hour-of-observation (absorbs all shared factors)
- β: Baseline profit gap per hour
- γ: Change in gap after pricing adjustment
- δ, θ: Regime-specific gaps
- φ: Differential weather sensitivity
Confidence intervals:
With only 14 days, observations within each day are correlated. Standard errors must account for this:
- Clustering: Cluster standard errors by day (14 clusters)
- Small-sample adjustment: With so few clusters, use wild cluster bootstrap (Rademacher weights, 10,000 replications) or conservative t-distribution with 13 degrees of freedom
- Paired approach: Alternatively, compute daily profit totals for each shop, take paired differences, and construct: mean ± t₁₃,₀.₉₇₅ × (SD/√14), where t₁₃,₀.₉₇₅ ≈ 2.16
Power analysis (order of magnitude):
Assumptions:
- Average daily profit per shop: $400
- Standard deviation of daily profit: $120
- Correlation between shops (due to shared traffic): 0.80
- SD of paired daily difference: √(2 × 120² × (1 - 0.80)) ≈ $76
Standard error of mean difference: 76/√14 ≈ $20 per day
Minimum detectable effect (80% power, α = 0.05): (2.16 + 0.84) × 20 ≈ $60/day
Over a 60-business-day quarter, this is $3,600—roughly 15% of quarterly profit. This is a decision-relevant magnitude, confirming 14 days provides adequate power.
Without pairing: SE would be $120√(2/14) ≈ $45, with MDE ≈ $135/day—much worse. This illustrates why the simultaneous comparison is so valuable.
Caveat: The pricing change effect alone (6 days before, 8 days after) has SE ≈ 76√(1/6 + 1/8) ≈ $40, giving MDE ≈ $120/day. This is underpowered. Make the recommendation robust to this uncertainty rather than relying heavily on the estimated price effect.
5. Operational Safeguards and Decision Rule
Demand censoring (stockouts):
- Flag any hour where a top-selling item is unavailable while traffic exceeds its median
- Re-estimate excluding censored hours, or note that observed profit understates potential
- If stockouts are frequent for one shop, report both observed and stockout-adjusted estimates
Cannibalization checks:
- Combined conversion rate: (total transactions from both shops) / (total traffic) should remain stable. If one shop's promotion increases its sales but combined conversion is flat, that indicates share-stealing rather than demand creation
- Day-after effects: Check if promotional periods are followed by below-baseline sales (demand borrowing from the future)
Data quality:
- Automated counts differing >10% from manual validation require recalibration
- Missing data for >4 hours in any day triggers exclusion of that day from analysis
Decision rule:
Recommend Shop X if:
- Estimated quarterly profit difference exceeds $2,000 in X's favor, AND
- The 95% confidence interval lower bound exceeds $1,000
If the confidence interval includes zero or the point estimate is below the $2,000 threshold, report the estimates with uncertainty and recommend deferring the decision or collecting additional data.
Sensitivity disclosures:
- State which regime assumptions (promotional pricing, operating hours) the projection relies on
- If those assumptions change, the forecast changes
- Note any data quality issues or periods excluded due to censoring
Common Mistakes to Avoid
- Normalizing away the answer: Dividing by traffic or hours can make a profitable business decision look bad if it targets lower-density periods
- Ignoring clustered errors: Treating 336 hourly observations as independent when you have 14 independent days massively understates uncertainty
- Over-controlling: Modeling weather, day-of-week, etc. explicitly when time fixed effects already absorb them
- Treating regimes as noise: Discounts and hour extensions aren't confounders—they're part of the business model you're forecasting
- Assuming experimental control: You're observing, not intervening; don't propose randomization schemes that would alter the very behavior you're trying to predict