How Ripple works
The model makes the numbers. The agent explains them. The web gives context. This page shows the model, and the evidence that it is right where it claims to be, and wrong where it says so.
The model
One row of data is one week × city × customer segment. Everything the simulator shows comes from this equation and its posterior.
Why each part is there
Every term earns its place by preventing a specific wrong answer.
| Part | Why it is there | What breaks without it |
|---|---|---|
| Negative Binomial | Weekly unit counts are overdispersed: the variance is much larger than the mean. | A Poisson model calls normal week-to-week variation a surprise, and every interval is far too narrow. |
| Log-log price term | The coefficient on log price is the elasticity: a 1% price rise changes demand by that many percent. | A linear price term means nothing at a different price level and can predict negative demand. |
| Elasticity per segment, partially pooled | Students and retirees do not respond to price alike. Pooling lets a thin segment borrow strength. | Pooled: every offer looks the same for everyone. Unpooled: a small segment is driven by noise. |
| Promo deal-signal lift | Being on promotion lifts demand beyond the price cut itself. | The price term alone understates a promotion, then overstates the discount needed next time. |
| Post-promo dip | A promotion pulls purchases forward from the following week. | Promotions look better than they are, because borrowed sales are never paid back. |
| City effect on traits | A city with no history still gets a forecast, with honest uncertainty from tau. | New-city questions become unanswerable. |
| Customer-mix offset | Volume scales with who lives there, so a different mix needs no refit. | A student-heavy city is forecast as if it had the average mix. |
| Fourier seasonality | Yearly shape with few enough parameters to extrapolate. | Season is confounded with the promotion calendar and the promo lift absorbs it. |