The business problem
An online retailer keeps changing its complaint-handling process. Complaints fall after each change, then return. The team needs to know whether its fixes helped or whether it is tackling the wrong part of the business.
Working example 06 Bayesian change-point analysis
“We have tried several solutions, but the problem keeps returning.”
An online retailer has made three fixes to complaint handling in two years. Each seemed to work, then complaints returned. The team is planning a fourth fix.
The business context
An online retailer keeps changing its complaint-handling process. Complaints fall after each change, then return. The team needs to know whether its fixes helped or whether it is tackling the wrong part of the business.
The solution compares complaints with order volume, so a busy period is not automatically treated as worse service. It looks for a lasting change in the complaint rate, checks the periods around previous fixes and compares the timing with an operations log. Matching dates suggest what to investigate; they do not by themselves prove the cause.
Explore the evidence
104 synthetic weekly observations plus a dated log of fixes and operational events. Orders are stored in thousands, so complaints divided by this field gives complaints per 1,000 orders. Generating a new history replaces the observations. The hidden rate used to generate complaints is excluded because a real investigation would not know it.
All records are illustrative and generated in your browser. Browse every row using the table controls. Displayed decimals are rounded; calculations use full precision.
How it works
y_t ~ Poisson(λ · e_t), e_t = 1 or orders_tBF = p(y_before) · p(y_after) / p(y_before ∪ y_after)p(τ | y) ∝ p(y₁…y_τ) · p(y_τ₊₁…y_T)Try it
| Week 14 | Price list updated |
| Week 40 | Warehouse system upgrade |
| Week 66 | Switched to a new courier |
| Week 90 | New packaging supplier |
Fixes are marked in purple; the detected change point in navy.
Posterior probability for each possible change week.
Comparison of the weeks before and after each fix.
| Fix | Change | Bayes factor | Evidence |
|---|
Interpretation
When fixes are triggered by spikes, the next measurement is almost always lower: spikes are, by definition, unusual. That makes every fix look effective. Measuring the right thing removes the illusion, and a change-point search points to a cause nobody was investigating.