Time to next order and a churn score
Use a churn score to rank customers, not to say who a contact would keep. Frozen after one year, it understated churn by 4 to 9 points on later dates, and handling still-quiet customers properly did not close that gap.
Main limitation One wholesaler-heavy UK gift-ware seller, orders only, no contacts recorded, so every net figure is a scenario.
Churn means no order within 180 days of the date. Percent of customers in the band, with 95% intervals.
Show the data
| Score band | December customers | Mean score | Observed | Interval | June customers | Mean score | Observed | Interval |
|---|---|---|---|---|---|---|---|---|
| under 20% | 828 | 10% | 11% | 9% to 14% | 979 | 9% | 9% | 7% to 11% |
| 20% to 40% | 987 | 31% | 40% | 35% to 45% | 993 | 30% | 32% | 27% to 38% |
| 40% to 60% | 1,061 | 50% | 63% | 58% to 67% | 1,459 | 52% | 56% | 53% to 60% |
| 60% to 80% | 1,334 | 67% | 76% | 74% to 79% | 875 | 65% | 73% | 68% to 77% |
| 80% or more | 15 | 83% | 93% | 72% to 100% | fewer than 11 |
Intervals come from resampling customers, refitting the model and rescoring, so band membership moves between draws. The December band of 80% or more holds only 15 customers; the same band in June is under 11 and withheld.
A churn score tells you who is likely to leave. It does not tell you who a contact would keep. The score and the holdout have to run together. Here a survival model, which treats a customer still quiet at the end of the data as not yet known instead of gone, was frozen on orders up to November 2010 and scored on later dates it never saw. The survival form is not what ranks: the same features ranked about as well with no survival handling (AUC 0.77 to 0.78). A score of 60% should mean 60% churn, and this one read low at all four dates; a refit at June, the one date refit, moved that date's gap from 3.6 low to 1.2 high. In the base case a contact pays at 4.2 extra orders per 100, and a random half of all 2,358 quiet customers can only tell a lift of 5.7 points or more from no lift, so one date's holdout cannot confirm a contact pays.
| Ranking against days since the last order +0.08 and +0.05 AUC AUC is the chance that a customer who churned scores above one who did not. 1 December 2010: 0.78 against 0.70 (interval +0.07 to +0.10). 1 June 2011: 0.78 against 0.73 (+0.03 to +0.06). The score was frozen on orders before both dates. | Churn understated 8.7 and 3.6 points December: mean score 43% against 52% observed (interval 6.2 to 11.1 points low). June: 40% against 43% (1.3 to 6.0). December missed the 5-point bar I set in advance. | Handling censoring, no season term in either 10.7 against 11.1 points How far the gap moved from December to June: the survival model against the shortcut of counting censored as churn, 0.4 points apart (interval 0.0 to +0.7, added after the results). The shortcut also sat closer at December and March (3.6 and 1.2 low, against 19.1 and 17.1), and June cannot be told apart (7.5 high, 8.3 low). The season term, learnt on one autumn, cut the move to 5.1; handling censoring did not. I predicted the shortcut would read at least 10 points high at December and June; that missed. | Contact rule, assumed response £5.8K against £4.9K June net margin, the rule against contacting everyone quiet, in the base case: stated £5 a contact, £300 order, 40% margin, an assumed 10% persuaded. With the same share everywhere, this win is close to true by construction. If a contact moves the further-gone less, everyone quiet wins: £3.8K against £1.9K. |
Terms used on this page
- Time to next order
- Days from a date to the customer's next sale, followed for at most 180 days.
- Censored
- Still quiet when the follow-up ends. We know the customer had not ordered yet, and nothing after that. It is not the same as gone.
- Churn
- Here only this: no order within 180 days of the date (90 at the September date). The data has no account to close.
- Churn score
- The model's probability of churn for one customer on one date.
- Survival model
- A model of the chance of ordering in each short step of time, given no order so far. This one is a discrete-time hazard model: a logistic regression on customer-steps of 10 days.
- Quiet customer
- Bought in the past year, but nothing in the last 90 days (the first part's definition).
- AUC
- The chance that a customer who churned scores above one who did not: 0.5 is a coin toss, 1 is perfect.
- Level and gap
- The level is whether the score's percentages match what happened. The gap is the mean score minus observed churn, in points: negative means the score reads low.
- Calibrated
- Of customers scored about 60%, about 60% churn. Mean band error is the customer-weighted average gap across the score bands. The calibration slope is 1 when scores spread as far as the outcomes do; above 1, they are bunched too tightly.
- PSI
- Population stability index: how far the customers moved across bins between two dates. Under 0.10 is usually read as stable, above 0.25 as a large shift.
- Persuaded share
- Of customers who would otherwise place no order, the share who place one because of the contact. It is not in the data.
- Break-even lift
- Extra orders per 100 contacts that pay for the contacts: cost over one order's margin.
- Holdout
- A random group that gets no contact. The gap between it and the contacted group is what the contact caused.
One customer the two lists disagree on
On 1 June 2011, one customer had last ordered about 190 days before, usually about 90 days apart, under 5 orders and about £800 in the past year. Quiet for about twice their own usual gap, so "contact everyone quiet" reaches them. The score is 32%, below the rule's 41.7%, so the rule leaves them out. They ordered again about 180 days after the date, with no contact recorded.
One customer proves nothing. Across the group: of the 588 quiet customers below the threshold, 63% ordered again, against 34% of the 1,770 above it. And 477 customers not yet quiet are above it; 48% of them ordered again. What a contact would have done for any of them, the orders cannot say.
This customer was chosen by a rule set before any fit: nearest the median score among quiet customers below the threshold. Counts are in bands and the rest rounded. The key is not shown here, though the exact score in the results file matches one row of the public scored table, which holds hashed keys only.
Who will order next
Frozen on orders before December 2010, the score held an AUC of 0.76 to 0.78 across four later dates; days since the last order alone gave 0.70 to 0.73.
That matches the 0.78 of the model trained out of fold at the June date in part four, with this one frozen six months before it. But the survival form is not what ranks. Every arm on the same six features lands within 0.01 at each date. One reading of the fit, added after the results: the odds of an order in a step rise 52% per standard deviation of past orders and 37% of past revenue, and move only 4% for days since the last order and 9% for the customer's own rhythm once those are in. These features overlap and no arm drops one, so this does not measure what each contributes. Among quiet customers, where the first part's list works, the score reached 0.67 at June against 0.62.
| AUC for churn | December 2010 | March 2011 | June 2011 | September 2011 (90 days) |
|---|---|---|---|---|
| Days since the last order | 0.695 | 0.718 | 0.729 | 0.707 |
| Survival model | 0.779 | 0.777 | 0.776 | 0.764 |
| Survival model, no season term | 0.779 | 0.779 | 0.777 | 0.763 |
| Censored counted as churn | 0.777 | 0.773 | 0.774 | not scored |
| Complete follow-up only | 0.778 | 0.781 | 0.778 | not scored |
| Survival model minus days since the last order | +0.070 to +0.099 | +0.045 to +0.073 | +0.032 to +0.061 | +0.042 to +0.070 |
| Quiet customers only: days since the last order | 0.596 | 0.600 | 0.619 | 0.595 |
| Quiet customers only: survival model | 0.659 | 0.693 | 0.673 | 0.673 |
Whether 60% means 60%
At December and June the bands are in the right order, but the score read low: by 8.7 points at December, in every band, and by 3.6 at June.
A contact rule reads the score as a probability, so this matters more than the ranking. The likeliest cause is the training year. Every customer landmark from July 2010 on is censored early, so the later steps lean on orders in the run-up to the peak, and my landmarks start in March, so no January or February is in the training hazards. A refit that adds those months moved June's gap from 3.6 low to 1.2 high, which fits that reading, but no test here isolates it.
The shortcuts have no season term, so the fair test of censoring sets them against the survival model without one. Like for like, handling censoring did not help the level: of the three arms on the same features, the survival model read furthest off at all three dates on the point estimates. Counting censored as churn came closer at December and March, by 15.5 and 15.9 points (intervals +14.6 to +16.4 and +14.3 to +16.8), and cannot be told apart from it at June (+0.8, interval −3.2 to +5.0). It lifts the mean score by about 16 points at each date, which most likely offsets the low reading at the first two and overshoots at the third. Keeping only the landmarks with full follow-up, the usual fix, is right about censoring and drops every landmark from July on; it too came closer, by 2.6 to 3.3 points, with each interval above zero. Every arm without the term moved about 11 points from December to June, and the term cut that to 5.1 (5.7 less, interval −6.6 to −4.7). Handling censoring stays the sound method, since the shortcut counts a customer followed for 30 days the same as one followed for 180, but this data did not reward it. These paired comparisons were added after the results.
| Arm | December 2010 | March 2011 | June 2011 | Moved, December to June (interval) |
|---|---|---|---|---|
| Survival model, no season term | −19.1 | −17.1 | −8.3 | +10.7 (+8.8 to +12.7) |
| Censored counted as churn | −3.6 | −1.2 | +7.5 | +11.1 (+9.1 to +13.1) |
| Complete follow-up only | −16.5 | −13.8 | −5.0 | +11.5 (+9.2 to +13.7) |
| Recency table | −25.7 | −19.9 | −13.8 | +11.8 (+9.1 to +14.8) |
| Survival model, with the season term | −8.7 | −6.3 | −3.6 | +5.1 (+2.9 to +7.2) |
| Date and arm | Mean score | Observed churn | Gap, points | Interval | Mean band error, points | Slope |
|---|---|---|---|---|---|---|
| 1 December 2010: Survival model | 43.1% | 51.8% | −8.7 | −11.1 to −6.2 | 8.7 | 1.09 |
| 1 December 2010: Survival model, no season term | 32.7% | 51.8% | −19.1 | −21.2 to −17.0 | 19.1 | 0.99 |
| 1 December 2010: Recency table | 26.1% | 51.8% | −25.7 | −28.4 to −23.1 | 25.7 | 1.45 |
| 1 December 2010: Censored counted as churn | 48.2% | 51.8% | −3.6 | −5.4 to −1.8 | 4.5 | 1.18 |
| 1 December 2010: Complete follow-up only | 35.3% | 51.8% | −16.5 | −19.6 to −13.4 | 16.5 | 1.07 |
| 1 March 2011: Survival model | 45.1% | 51.4% | −6.3 | −9.1 to −3.8 | 6.4 | 1.11 |
| 1 March 2011: Survival model, no season term | 34.3% | 51.4% | −17.1 | −19.6 to −14.9 | 17.1 | 1.02 |
| 1 March 2011: Recency table | 31.5% | 51.4% | −19.9 | −23.2 to −16.5 | 19.9 | 1.69 |
| 1 March 2011: Censored counted as churn | 50.3% | 51.4% | −1.2 | −3.2 to +0.6 | 2.7 | 1.18 |
| 1 March 2011: Complete follow-up only | 37.6% | 51.4% | −13.8 | −17.0 to −10.6 | 13.8 | 1.14 |
| 1 June 2011: Survival model | 39.8% | 43.4% | −3.6 | −6.0 to −1.3 | 3.6 | 1.09 |
| 1 June 2011: Survival model, no season term | 35.1% | 43.4% | −8.3 | −10.6 to −6.2 | 8.3 | 1.07 |
| 1 June 2011: Recency table | 29.5% | 43.4% | −13.8 | −18.7 to −9.1 | 14.2 | 1.81 |
| 1 June 2011: Censored counted as churn | 50.9% | 43.4% | +7.5 | +5.7 to +9.4 | 7.5 | 1.25 |
| 1 June 2011: Complete follow-up only | 38.4% | 43.4% | −5.0 | −8.2 to −2.0 | 6.4 | 1.13 |
| 1 September 2011: Survival model | 46.1% | 50.3% | −4.3 | −6.1 to −2.4 | 4.3 | 1.11 |
| 1 September 2011: Survival model, no season term | 51.0% | 50.3% | +0.7 | −1.1 to +2.4 | 2.6 | 1.22 |
| 1 September 2011: Recency table | 51.8% | 50.3% | +1.5 | −0.5 to +3.4 | 5.2 | 1.39 |
The curves show the same thing over time. Predicted against observed share still quiet, frozen score, 1 June 2011:
| Score band | Customers | Still quiet at 30 days | At 90 days | At 180 days |
|---|---|---|---|---|
| under 20% | 979 | 57% against 54% | 27% against 25% | 9% against 9% |
| 20% to 40% | 993 | 79% against 79% | 54% against 59% | 30% against 32% |
| 40% to 60% | 1,459 | 88% against 89% | 71% against 77% | 52% against 56% |
| 60% to 80% | 875 | 92% against 95% | 80% against 88% | 65% against 73% |
| 80% or more | fewer than 11 |
The same score across the dates
The ranking held and the score bands barely moved, though days since the last order did. What customers did next moved too: observed churn fell from 52% to 43% between the two dates.
Between December and June the AUC changed by −0.003 (interval −0.021 to +0.013). Score bands without the season term moved a PSI of 0.016, and 0.081 with it, because that term moves the score on purpose. Of the features, only days since the last order moved much (PSI 0.33, past the usual 0.25 line, with quiet customers up from 1,365 to 2,358), with the customer's rhythm next (0.12) and the others at 0.004 or less: December sits right after the peak, June long after it. A monitor on the score's bands alone would have stayed quiet while the level moved.
The gap moved +10.7 points between the dates without the season term (interval +8.8 to +12.7) and +5.1 with it (+2.9 to +7.2). So one term learnt on one autumn removed about half of the swing. That is some evidence for season over year, and it is thin: one autumn and two dates still cannot separate them. The term also cut the other way at 1 September 2011, whose 90 days sit wholly inside those months: the score read 4.3 low with the term and 0.7 high without it (interval −1.1 to +2.4). A refit at June, on orders up to May 2011, brought the mean band error to 1.5 points with about the same AUC. Refit or recalibrate on a schedule, and watch the gap, not only the ranking.
| Date | Customers | Observed churn | Mean score | Gap, points | Mean band error, points | AUC |
|---|---|---|---|---|---|---|
| 1 December 2010 | 4,225 | 51.8% | 43.1% | −8.7 | 8.7 | 0.779 |
| 1 March 2011 | 4,248 | 51.4% | 45.1% | −6.3 | 6.4 | 0.777 |
| 1 June 2011 | 4,315 | 43.4% | 39.8% | −3.6 | 3.6 | 0.776 |
| 1 September 2011 (90 days) | 4,312 | 50.3% | 46.1% | −4.3 | 4.3 | 0.764 |
| 1 June 2011, refit on orders before it | 4,315 | 43.4% | 44.6% | +1.2 | 1.5 | 0.779 |
A contact rule from a stated cost and order value
Contact when score x persuaded share x order value x margin reaches the cost. With my stated inputs that is every customer above 41.7%. The best list then depends on an input the orders cannot supply.
Stated, not measured: £5 a contact (an email and a small voucher; US$6.50 at the first part's assumed US$1.30 per pound), a £300 order (the training year's median order, £303.79, rounded), and the first part's assumed 40% margin, so one extra order is worth £120. Assumed: 10% of would-be non-returners persuaded. Each observed non-returner on a list is won with the assumed share, for one order's margin; returners are assumed unchanged. So who stayed away is measured, and the net figures are scenarios.
- If a contact moves everyone alike, or moves those near the line most, the rule wins at both dates. June: £5,805 against £4,878 (paired difference £438 to £1,308, added after the results). This win is close to true by construction: with the same share everywhere, the better list is the one with more non-returners per contact, and that is what a ranking gives.
- If a contact moves the further-gone less, everyone quiet wins at June: £3,791 against £1,897 (paired difference −£3,277 to −£1,077). At December the gap cannot be told from zero (−£990 to £319). Under that assumption the list the score recommends is the wrong one, with the same score and the same customers.
- Knowing the pattern is what pays. Under that last pattern, a list set by band from the true response nets £5,188 at June, against £1,897 for the rule. That is an upper bound, because a real test measures the response with error. Only a holdout can show which pattern holds. That flip is arithmetic, not a finding about these customers.
| List | Contacted | Stayed away (measured) | Net: Same everywhere | Net: Middle moves most | Net: Further gone, less moved |
|---|---|---|---|---|---|
| 1 December 2010: Everyone quiet | 1,365 | 73% | £5,139 | £8,155 | £2,233 |
| 1 December 2010: High-value list (part one) | 157 | 57% | £283 | £565 | £991 |
| 1 December 2010: The rule | 2,334 | 71% | £8,178 | £15,508 | £1,936 |
| 1 December 2010: The rule, quiet customers only | 1,171 | 77% | £4,933 | £7,859 | £1,019 |
| 1 December 2010: If the pattern were known | £8,350 | £16,273 | £7,280 | ||
| 1 June 2011: Everyone quiet | 2,358 | 59% | £4,878 | £12,629 | £3,791 |
| 1 June 2011: High-value list (part one) | 330 | 33% | −£354 | −£132 | £582 |
| 1 June 2011: The rule | 2,247 | 63% | £5,805 | £15,007 | £1,897 |
| 1 June 2011: The rule, quiet customers only | 1,770 | 66% | £5,226 | £12,719 | £1,943 |
| 1 June 2011: If the pattern were known | £5,925 | £15,750 | £5,188 |
Persuaded share by score band, low to high. Same everywhere: 10%, 10%, 10%, 10%, 10%; Middle moves most: 5%, 10%, 20%, 10%, 2%; Further gone, less moved: 20%, 20%, 10%, 5%, 2%. "If the pattern were known" contacts a band when its mean score x its share x £120 reaches the cost.
| One input moved | Threshold | Rule contacts | Rule nets | Everyone quiet nets |
|---|---|---|---|---|
| Contact cost £1 | 8% | 3,844 | £18,392 | £14,310 |
| Contact cost £5 | 42% | 2,247 | £5,805 | £4,878 |
| Contact cost £20 | above 100% | 0 | £0 | −£30,492 |
| Persuaded share 5% | 83% | fewer than 11 | not shown | −£3,456 |
| Persuaded share 10% | 42% | 2,247 | £5,805 | £4,878 |
| Persuaded share 20% | 21% | 3,298 | £26,134 | £21,546 |
| Order value £150 | 83% | fewer than 11 | not shown | −£3,456 |
| Order value £300 | 42% | 2,247 | £5,805 | £4,878 |
| Order value £600 | 21% | 3,298 | £26,134 | £21,546 |
| Margin 30% | 56% | 1,387 | £1,588 | £711 |
| Margin 40% | 42% | 2,247 | £5,805 | £4,878 |
| Margin 50% | 33% | 2,687 | £10,670 | £9,045 |
Run the score and the holdout together
The first part already sized a holdout on all quiet customers. Randomize inside each score band instead, and the same test also reads what a contact adds by band.
In the base case a contact pays at 4.2 extra orders per 100. The smallest lift detectable on one date's customers is above that in every group: 5.7 points for all quiet customers, as the first part found, and 4.4 to 8.8 by band. So one date can show a large effect but cannot confirm a contact only just pays.
Those sizes tell a lift from no lift, which is not the same as showing it pays. At 2,215 a side, a measured 4.2 points reads 1.3 to 7.1: a contact did something, and it may or may not pay. Showing a lift clears break-even is a harder test. With the same power and significance level, a true lift of 10 points takes 1,135 a side, which fits inside all quiet customers; 8 points takes 2,628; and 6 points takes 11,472, far beyond the 4,315 active customers at this date. These sizes were added after the results. So pool several months of newly quiet customers, or raise the bar for what counts as worth doing. The cheaper the contact against the order, the lower the break-even and the larger the test needed to confirm it.
| Group, 1 June 2011 | Customers | Ordered again | Per arm, 50/50 | Smallest lift told from no lift, points | Per arm to tell a break-even lift from no lift |
|---|---|---|---|---|---|
| Everyone quiet | 2,358 | 41% | 1,179 | 5.7 | 2,215 |
| Score band under 20% | 979 | 91% | 489 | 4.4 | 570 |
| Score band 20% to 40% | 993 | 68% | 496 | 7.9 | 1,882 |
| Score band 40% to 60% | 1,459 | 44% | 729 | 7.3 | 2,240 |
| Score band 60% to 80% | 875 | 27% | 437 | 8.8 | 1,869 |
| Score band 80% or more | fewer than 11 |
What I expected, and what happened
15 of 18 predictions held and 3 missed.
The three misses are the useful ones. I expected the score to be within 5 points at December; it was not. I expected ignoring censoring to overstate churn at both dates; it read low at one and high at the other. I expected contacting everyone quiet to lose money at June if a contact moves the further-gone less; it stayed above zero. Several held predictions were easy: a ranking gain over one feature, and the rule's win when a contact moves everyone alike, are close to safe bets.
| Prediction | Result | Estimate | Note |
|---|---|---|---|
| June: survival model AUC at least 0.03 above recency | Held | +0.047 | |
| December: survival model AUC at least 0.03 above recency | Held | +0.084 | |
| June: survival model AUC within 0.03 of the out-of-fold logistic regression of part four (0.784) | Held | 0.776 | |
| June, quiet customers: survival model AUC at least 0.02 above recency | Held | +0.055 | |
| June: survival model mean band error at most 5 points | Held | 3.6 points | |
| December: survival model mean band error at most 5 points | Missed | 8.7 points | the score read low in every band at this date |
| Recency table has a larger mean band error than the survival model at both dates | Held | +10.6 points | |
| Without the season term, the overall gap at June minus the gap at December is at least +5 points | Held | +10.7 points | |
| The season term at least halves that difference (ratio of absolute differences at most 0.5) | Held | 0.47 of the difference | just inside the band |
| Censored counted as churn overstates churn by at least 10 points at both dates | Missed | −3.6 points | it read low at December and high at June, not high at both |
| Complete follow-up only has a larger absolute gap than the survival model at June | Held | +1.4 points | it held by setting an arm with the season term against one without: like for like, complete follow-up came closer than the survival model without the term at June |
| PSI of the no-season score bands between December and June under 0.10 | Held | 0.016 | |
| Survival model AUC at June and December differ by at most 0.02 | Held | +0.003 | |
| Base case at June: at least 10% of quiet customers below the threshold and at least 100 not-yet-quiet customers above it | Held | 25% of quiet; 477 not yet quiet | |
| Under "Same everywhere", the rule nets more than everyone quiet at both dates | Held | £927 | close to a safe bet: under this pattern the list with more non-returners per contact wins |
| Everyone quiet nets above zero under "Same everywhere" at both dates and below zero under "Further gone, less moved" at June | Missed | £3,791 under "Further gone, less moved" at June | above zero under that pattern too: its share of 20% in the low bands reaches quiet customers the rule leaves out |
| Break-even lift is below the smallest detectable lift of the all-quiet test and of every score band at June | Held | +0.3 points | a thin margin in the lowest band |
| Refit at June has a smaller absolute gap than the frozen survival model, with an AUC within 0.01 | Held | +2.4 points; AUC 0.002 apart |
What a team should do with this
My call: ship the score as a ranking, keep a refit on the calendar, and set no contact budget from it until a holdout inside the score bands has measured what a contact adds.
- Use the score to rank, and check its level before reading it as a probability. The ranking lasted at least six months here without a refit. The level was off from the first date and moved from date to date, and every threshold rests on the level.
- Handle censoring because the method is sound, and test the level anyway. Treat customers still quiet as censored, then compare on later dates, arm against arm with the same terms. This data did not reward it: the shortcut came closer at two of three dates and overshot at the third, most likely through offsetting errors, so a good date is not a pass either way.
- Watch the gap between score and outcome, not only the population. Band shares looked stable while the level moved by several points. Refit or recalibrate on a schedule that includes the peak and the lull.
- Write the contact rule with its inputs in view. Cost, order value and margin are a finance sign-off. The persuaded share is a guess until a test replaces it, and the list changes with it.
- Randomize inside score bands from the first campaign. Every band keeps a holdout, the lift is read by band, and the threshold is reset from what the test measures. Without that, a campaign aimed at high scores is credited for whoever came back anyway.
Limits
- One wholesaler-heavy UK gift-ware seller, and orders only. No contact is recorded, so nothing here estimates what a contact adds. The patterns are assumptions, and their net values are arithmetic. It says nothing about customers of other businesses.
- One training year, so the season term rests on one autumn. Landmarks start in March and follow-up ends at the cutoff, so January and February are not in the training hazards, and only the four earliest landmarks have the full 180 days of follow-up.
- Visible history is shorter in training (90 to 335 days) than at the later dates (365). Orders and revenue are scaled to a year, but that is an approximation, and customers who bought before the data starts are invisible until they order again.
- Churn is one window, not a verdict on the customer: seasonal wholesalers sit in it often. One order's margin is a low value for a kept customer, and a flat order value ignores how much orders differ.
- Dates are reported apart and never pooled. Time to the next order is one event per date, not a model of repeat buying. Bands under 11 customers are withheld, and the top band in December holds few.
How this was checked
The protocol was committed unchanged before the fit, and no order after the cutoff was read until the fitted model was committed. The later dates use the first part's populations unchanged: the same 4,225 and 4,315 customers, the same tiers, the same quiet flags and the same outcome for every customer, and recency's AUC equals part four's figure to every digit.
Tests run a positive control on data with a known hazard, where the survival model must land on the truth and counting censored as churn must miss it, and a broken censoring rule that must fail that recovery. They also check the landmark tables and risk sets on small constructed customers, replay every date's measures and the contact values from the published customer table with no download.
Use this at your company
To run the same check on your own customers, paste this prompt into an AI assistant along with your data.
This method comes from Diogo Travassos's study "Time to next order and a churn score" (https://diogotravassos.dev/retail-win-back/time-to-next-order.html). If you can open links, read it first: it works the method through end to end, with its checks. The steps below stand on their own if you can't. Help me build a churn score from order history that handles customers who are still quiet, check it on later dates, and set a contact rule without confusing who may leave with who a contact would keep. Data: order lines with customer id, order id, order date, quantity and unit price, cancellations included. Steps: 1. Before fitting anything, write down the training cutoff, the later dates to score, the churn window, the features, the score bands, the contact cost, the order value, the margin and what you expect, with ranges. 2. From each monthly date before the cutoff, take every active customer, build features from earlier orders only, and record the time to the next order. A customer with no order by the cutoff is censored at that point, not counted as gone. 3. Fit a discrete-time hazard model on customer-steps, with a baseline by time since the date, the features and a term for the peak season. Freeze it. 4. Compare on every later date, one date at a time: days since the last order alone, the frozen score, and the same features with censored counted as churn. Judge censoring only between arms with the same terms. Report AUC, and predicted against observed churn by score band, with intervals from resampling customers. 5. Report drift: how far the score bands and each feature moved between dates, how far the gap between predicted and observed moved, and what a refit changes. 6. Contact rule: contact when score x persuaded share x order value x margin reaches the cost. The persuaded share is an assumption until a holdout measures it, so show the list and its net value under at least three response patterns, and say where the best list changes. 7. Size a random holdout inside each score band, and compare the smallest detectable lift with the break-even lift (cost over order margin). Size it twice: to tell a lift from no lift, and to show a lift clears break-even. Checks: no feature may read an order on or after its date; withhold any band under 11 customers; label anything added after seeing results; never call a net value a finding while the response is assumed. Report: for each date, whether the ranking and the level held, the list the rule gives against contacting everyone quiet, and the holdout that would settle what a contact adds. In your report, say which study you followed and link it: https://diogotravassos.dev/retail-win-back/time-to-next-order.html
Method and checks
Set in advance
The cutoff, the dates, the arms, the features, the score bands, the stated contact inputs, the response patterns, the resampling and 18 predictions with their bands were written down before any model was fitted: DESIGN-survival.md and protocol-survival.json. Before that, the only look at the training months was their line count, active customers per landmark and the median order. Nothing in the protocol changed afterwards. The later orders were not new to the study: earlier parts had published return rates and AUCs at December and June and monthly counts across the year, and the design lists what was known when it was written. The model never read those orders, but its features and the predictions were chosen knowing those published figures.
Data and time to next order
- The first part's cleaning, unchanged, and its population at each date: positive net revenue and a sale in the 365 days before it.
- Training: 9 monthly landmarks from 1 March to 1 November 2010, 25,671 customer-landmarks of 3,901 customers, 182,012 customer-steps of 10 days, 15,235 next-order events. Follow-up ends at 1 December 2010, so 7,820 customer-landmarks are censored before 180 days.
- Features from lines before each date only: days since the last order, orders and net revenue per year, days since the last order over the customer's own mean gap, a one-order-day flag, and mean units per line (logs, standardized on the training rows).
The arms
- Survival model: logistic hazard on customer-steps with a piecewise baseline (0 to 30, 30 to 60, 60 to 90, 90 to 120, 120 to 180 days), the features, and the share of the step's days in September to November (odds ratio 1.63, 1.91 in the refit). The score is the product of 1 minus the hazard over the steps.
- The same without the season term. Days since the last order, for AUC. A Kaplan-Meier table by recency band, for calibration. Two logistic regressions on the same features, one with "no order seen" as churn on all landmarks, one on the four landmarks with full follow-up. A refit at June on 51,153 customer-landmarks.
- Proportional hazards check, training rows only: adding recency times time gains 0.10 on the likelihood-ratio statistic and moves scores by 0.1 points on average. It has no pass mark.
Intervals
95% percentile intervals from 500 joint resamples of customers: each draw reweights customers across the training rows and the later dates, refits every arm and rescores it. So they show both which customers trained the model and which were scored.
Added after the results
The paired intervals on the rule minus everyone quiet, on the same resamples. The like-for-like comparison of the arms with no season term, with its paired intervals, and the holdout sizes for showing a lift clears break-even, in results-survival-added.json. The explanation that two errors offset at December and March, the training year as the likeliest cause of the low reading, and the reading of the odds ratios are readings, not tested claims. None of these is scored, and no fit, score, prediction or value in results-survival.json changed.
Reproduce it
make survival rebuilds the frozen model from the public download, and make survival-score scores the later dates and renders this page, with the packages in requirements.lock. The tests replay the measures from the published table with no download. No key is needed.
Reproduce itThe designThe protocolThe frozen modelThe resultsAdded after the resultsThe scored customers (CSV)Part one: win-backPart two: lifecycle accountingPart three: subscription lifecyclePart four: customer segments