
Cohort Analysis
Part of Retention segmentation
A Method for Segmenting Customers by Purchase Rhythm
Use observed reorder intervals to distinguish expected gaps from genuinely unusual inactivity.
Coffee refills and furniture should not share one generic inactivity rule. For each category, calculate each repeat customer's median order gap and use the distribution of those medians to set short-, middle- and long-rhythm bands. Compare the latest gap with the customer's own history separately.
Establish a baseline by category
For each category, use completed orders by customer and product group, excluding returns and cancellations. Put each customer's orders in date order and calculate the gap between successive completed orders. Keep the gap sequence by customer and category; a single purchase provides no gap, so do not assign that customer a personal rhythm.
For each repeat customer in a category, calculate the median of their observed gaps. Sort those customer medians from shortest to longest; for n repeat customers, take the values at ranks ⌈n/3⌉ and ⌈2n/3⌉ as the cut points, rounding each rank up to the next whole number. This derives the boundaries from that category's observed gaps.
Assign a customer's median gap to short if it is at or below the first cut point, middle if it is above the first and at or below the second, and long if it is above the second. Keep tied values together, even if this makes bands uneven or leaves a band empty.
A category with a repeat pattern of about a year can have a quiet quarter within its usual range; an item replenished every few weeks has a different pattern. Recalculate the category cut points as completed orders accumulate, applying the same rule each time.
For a separate outside-range flag, compare the time since a customer's latest order with that customer's previous gaps. If it exceeds their longest observed gap, mark it as outside their observed range; otherwise, it remains within that range. This flag uses personal history, not a generic lapse period.
Use an unknown-rhythm group when a customer's history does not show a repeat pattern, or when their gaps do not settle into a consistent cadence band. Do not assign a personal rhythm from a single purchase.
Key Metrics in Purchase Rhythm Analysis
- Cut point 1 (short–middle)
- ⌈n/3⌉ rank (rounded up) of sorted median gaps
- Cut point 2 (middle–long)
- ⌈2n/3⌉ rank (rounded up) of sorted median gaps
- Outside-range flag
- Triggered when latest gap > customer’s longest observed gap
Set separate actions and exclusions
A category rhythm band shows how a customer's typical gap compares with other repeat customers in that category; the outside-range flag shows whether their latest gap exceeds their own longest observed gap. Treat both as buying-pattern signals, not proof that a customer is due to reorder.
A gift or one-time project purchase should not automatically receive a replenishment message.
Review category cut points as completed orders accumulate, applying the same calculation. Act on a known buying pattern, not a claim that a customer is “due”.



