Predictive Markdown Intelligence / Validation

Putting the Model on Trial

A 100-Store Causal Inference Experiment

The Predictive Markdown Intelligence model looked great in testing. This project answers the only question that matters: does it actually make more money than the simple rule it is supposed to replace?

Paired fashion stores representing treatment and control groups
50 treatment / 50 control
(01)

The Context

Good offline metrics are not proof of business value.

This is a direct extension of Predictive Markdown Intelligence, which built an XGBoost model to optimize markdown timing for fast-fashion retailers.

The model predicts the narrow window between discounting too early and losing profit, or too late and creating dead stock. It performed well in offline evaluation, but a model can look strong in a backtest and still lose money when tested against a real business baseline.

This project designs and executes that controlled experiment.

(02)

The Experiment Design

Treatment / 50 stores

XGBoost decides when to mark down each product using demand signals.

Control / 50 stores

The industry-standard calendar rule marks products down every three weeks.

1.8M

SKU × Store × Day rows

200 SKUs across 100 stores over 90 days.

Separate geographic regions prevented customer migration between treatment and control stores.

Capacity weights reflected store type, so flagship locations received more demand than small outlets.

Products covered tshirts, jeans, jackets, and shoes with realistic price tiers and demand patterns.

The window included 30 baseline days, 45 active experiment days, and 15 post-experiment days.

(03)

Pre-Experiment Validation

Before collecting experiment results, we verified that treatment and control were statistically indistinguishable.

Sample Ratio Mismatch

The 50/50 split was clean, with no assignment bugs.

p = 1.0

Revenue Balance

Treatment averaged $11,056/day versus $9,713/day for control. The gap was within random noise.

p = 0.32

Store Tier Distribution

Both groups had the same mix of flagship, standard, and boutique stores.

p = 0.90

Capacity Weight Balance

Both groups had similar demand potential.

p = 0.57

All p-values were above 0.05. Any later divergence can therefore be attributed to the treatment rather than a systematic pre-existing imbalance.

(04)

Difference-in-Differences

The causal estimate

DiD Effect = (Treatment After − Treatment Before) − (Control After − Control Before)

Comparing raw averages would be misleading because treatment stores started with slightly higher revenue. DiD compares each group's change, removing pre-existing differences and market trends affecting both groups.

Parallel trends held.

p = 0.76

Both groups moved together before the experiment. Their later divergence can therefore be interpreted as the treatment effect. DiD is widely used to evaluate pricing and operational experiments.

(05)

The Results

Revenue effect

+$45

per store / day · p = 0.13

More units moved, but the lift was not statistically significant.

Margin effect

−$164

per store / day · p < 0.001

A real, measurable loss on the metric that matters.

Annualized / 50 stores

−$2,994,713

95% CI [−$3.9M, −$2.1M]

The ML model lost on the metric that matters.

(06)

Why It Happened

ML discount26.5%
Calendar rule6.3%

The model discounted four times deeper. It learned its lesson perfectly. It was simply the wrong lesson.

The Tweedie objective optimized units sold, not dollars of profit kept. Inventory cleared quickly, but margin disappeared.

A $120 jacket

ML: discount to $84, sell 10 units, keep $360 margin.

Calendar: keep $120, sell 5 units, keep the same $360 margin.

The model burned through twice the inventory without creating more profit. For dead stock, it also discounted before testing whether customers would pay full price.

(07)

What This Means

Do not launch the model as-is.

The experiment turned an apparent model win into a clear business decision before the loss reached the P&L.

Fix 01 / Margin floor

Prevent discounts below cost of goods plus a 25% margin. The model recommends when; the business rule limits how deep.

Fix 02 / Segment strategy

Use aggressive ML for dead stock, the calendar rule for bestsellers, and a margin-protected hybrid for everything between.

Projected next-phase impact: turn the −$3.0M loss into an estimated +$2.5M gain.

(08)

Technical Details

Tools

Python, pandas, NumPy, statsmodels, scipy, matplotlib, seaborn, XGBoost with Tweedie loss, DuckDB, Jupyter Notebook, and Git LFS.

Statistical tests
  • Sample Ratio Mismatch check
  • Covariate balance testing with t-test and chi-square
  • Parallel trends validation
  • Difference-in-Differences regression
  • Cluster-robust standard errors
  • Bonferroni correction for multiple outcomes
Data architecture

A PostgreSQL-dialect star schema with dim_stores, dim_products, dim_experiment_assignments, and fact_daily_sales.

Demand followed a Negative Binomial distribution with capacity-weighted store splitting.