sapien
← All articlesJournal11 min read

Customer Segmentation Analysis: Methods and Example

Learn how to group customers, check the assignment rules and choose different offers. A twelve-record example shows summaries, later outcomes and cutoff changes.

Solid and outlined figures considering separate refill pouches, a bottle, home storage and shared replenishment.

Customer segmentation analysis groups customers using relevant evidence, checks how those groups differ in a decision that matters, and defines how to assign customers before tailoring an offer.

About this example: If you run a subscription business, your account team may need to help a first repeat purchase or make replenishment easier for established buyers. The analysis must identify customers before the intervention and explain why the offers should differ. The twelve illustrative customer records below let you inspect assignment and evaluation separately.

How to do customer segmentation analysis

The twelve customer records below and copyable CSV record orders completed in the previous 90 days, average order value in dollars and whether the customer renewed in the subsequent period. Use the values to reconstruct the analysis, not to forecast renewals.

All twelve customer records

Renewal is coded 1 for renewed and 0 for did not renew. Every row has example_status=fictional. Retain renewal separately from the past-order inputs used to assign the group.

Customer

Recorded values

F01

Orders in previous 90 days: 1

Average order value, USD: 20

Renewed in subsequent period: 0

F02

Orders in previous 90 days: 1

Average order value, USD: 30

Renewed in subsequent period: 0

F03

Orders in previous 90 days: 1

Average order value, USD: 40

Renewed in subsequent period: 1

F04

Orders in previous 90 days: 1

Average order value, USD: 30

Renewed in subsequent period: 0

F05

Orders in previous 90 days: 2

Average order value, USD: 25

Renewed in subsequent period: 1

F06

Orders in previous 90 days: 2

Average order value, USD: 35

Renewed in subsequent period: 0

F07

Orders in previous 90 days: 3

Average order value, USD: 45

Renewed in subsequent period: 1

F08

Orders in previous 90 days: 3

Average order value, USD: 35

Renewed in subsequent period: 0

F09

Orders in previous 90 days: 4

Average order value, USD: 30

Renewed in subsequent period: 1

F10

Orders in previous 90 days: 4

Average order value, USD: 40

Renewed in subsequent period: 1

F11

Orders in previous 90 days: 5

Average order value, USD: 50

Renewed in subsequent period: 1

F12

Orders in previous 90 days: 6

Average order value, USD: 40

Renewed in subsequent period: 0

Copy the complete customer CSV

customer_id,orders_last_90_days,average_order_value_usd,renewed_next_period,example_status
F01,1,20,0,fictional
F02,1,30,0,fictional
F03,1,40,1,fictional
F04,1,30,0,fictional
F05,2,25,1,fictional
F06,2,35,0,fictional
F07,3,45,1,fictional
F08,3,35,0,fictional
F09,4,30,1,fictional
F10,4,40,1,fictional
F11,5,50,1,fictional
F12,6,40,0,fictional

The business question is whether an account team should offer replenishment convenience or help with a first repeat purchase. Define the groups using past orders only:

  • Starter: one order in 90 days.
  • Occasional: two or three orders.
  • Frequent: four or more orders.

Average order value describes the groups. Later renewal is a held-out outcome; it is never an input to these rules.

Group

Details

Starter

Customers: 4

Mean order value: $30

Subsequent renewals: 1 of 4

Occasional

Customers: 4

Mean order value: $35

Subsequent renewals: 2 of 4

Frequent

Customers: 4

Mean order value: $40

Subsequent renewals: 3 of 4

For Starter, the mean is ($20 + $30 + $40 + $30) ÷ 4 = $30. The renewal pattern is a property of this example dataset. Four customers per group cannot establish a dependable commercial response.

Order count is an assignment variable, average order value describes the resulting groups, and later renewal is an evaluation outcome. If you create “loyal” customers by including future renewal, then show that loyal customers renew more, the apparent validation is circular.

Keep an input cutoff and a reproducible customer-level record. A group should be assignable when the business needs to act. If guest or marketplace purchases are absent, mark that coverage issue; otherwise Starter may describe tracking rather than the customer’s activity. One recorded order in this window does not establish a first-ever purchase; confirm purchase history before choosing a first-repeat task.

Related guides: key-driver analysis.

Investigate what the Starter label means before activating it

Assignment: one completed order in the prior 90 days; four accounts. Profile: mean order value USD 30; one later renewal. Question: what happened after the most recent delivery and before the next order opportunity?

Offer choice: compare replenishment help with usage support once timing, unused stock or experience explains the stalled repeat. Owner: the account team, using reachable customer identifiers. Evaluation: subsequent repeat orders in a new period with intervention exposure and comparison conditions recorded. The historical 1/4 renewal count motivates the question; it does not select a proven intervention.

One previous order can mean several different situations: the product has not run out, usage was difficult, the buyer bought elsewhere, or the first occasion was not recurring. These are hypotheses to investigate, not findings from the twelve rows. A replenishment reminder serves only some of them.

Ask about the time between the most recent delivery and the next order opportunity, then map the explanation to a feasible intervention. Usage support may be more useful than a reminder when unused stock remains. The analysis makes the recruiting rule explicit; the needs work explains the offer difference.

Keep the existing rule while investigating. Redefining Starter after seeing which people like a reminder would turn the group into the desired result. When you decide to change the rule, save a new version and explain why the information improves assignment.

Evaluate the grouping in a future period

The order-count rule is simple enough to assign without looking at renewal. Save the 90-day input cutoff, each customer’s order count and the group version. The subsequent renewal period must begin after that cutoff; using future information to revise the original assignment would leak the outcome into the grouping.

Analysis stage

Details

Define

Input allowed: Past orders and intended business decision

Output to retain: Starter/Occasional/Frequent cutoffs

Assign

Input allowed: Records available at the cutoff

Output to retain: Customer-level group and unknown cases

Describe

Input allowed: Order value and source coverage

Output to retain: Group distributions and actual bases

Evaluate

Input allowed: Later outcomes or new evidence

Output to retain: Differences with uncertainty and context

Activate

Input allowed: Feasible reach and candidate action

Output to retain: Delivered intervention and future comparison

The renewal gradient of one, two and three renewals out of four does not prove that differentiated offers cause renewal. It describes the later outcome of these groups. To evaluate the intervention, record its exposure and an appropriate comparison among eligible customers.

A consistent segment rule is useful only if the team can reach its members and offer something meaningfully different. A simple rule may be enough when it helps the account team identify a real task and reliably provide the right support.

Use the boundary problem to choose an update rule

Changing Frequent from four to five orders moves F09 and F10 out of that group, shrinking it from four customers to two. This sensitivity check leaves four-order customers unassigned until you specify where they go. Check whether their needs differ from the remaining frequent buyers before adopting a complete replacement rule. Keep full distributions and the buying cycle in view.

An offer that changes every time an order crosses a cutoff may create a worse customer experience than a stable rule. Consider the purchase window and update cadence the business can operate. A name should describe what the rule measures: “four-plus completed orders” is more defensible than “high-value loyalists” when loyalty has not been defined.

Choose the least complicated rule that supports the action. Complexity is valuable when it adds a need or reachability distinction that a simpler scheme misses, rather than when it produces more colorful segment names.

Customer segmentation with clustering: when it is worth it

Use clustering when multiple relevant variables resist a simple rule. Decide how to scale variables, handle missingness and compare alternative group counts. K-means, for example, groups numeric observations around centroids and favors certain geometries; it is not a universal fit for mixed survey and transaction data. See the official scikit-learn clustering documentation for algorithm assumptions.

Fit the grouping on one dataset, document it and inspect a separate period or sample. Do not select the version solely because it tells the most attractive story. A statistical separation score also does not prove that customers need different offers.

Ask which variables the model uses, why they matter to the decision and how they were scaled. Agree how missing values are handled. Check the group count and algorithm against the business task as well as how clearly they separate the records mathematically.

Review examples from each group, boundary cases and a later period or held-out sample. Then ask whether the groups can be assigned from data available before the action. A statistical cluster is a starting point for interpretation, not proof that its members need the same message.

A shorter assignment tool needs its own check

The order-count rule above should use actual order records wherever those records are available. Predicting a customer's count from a short questionnaire would add avoidable error. A different problem arises when a research segmentation uses a long needs questionnaire that the business cannot repeat during signup. A shorter tool may help assign future customers, but it needs checking against the saved research rule before it routes an offer or service.

Consider a separate hypothetical onboarding decision. A full research questionnaire assigns people to planning-led or flexibility-led groups. A three-question shortcut returns one of those labels or “unassigned.” The following constructed counts describe 100 eligible people, each with both the full-rule label and the shortcut output. They are not additional records from the twelve-customer example or results of a study. Assume the shortcut and its abstention rule were fixed using other development records, before these 100 were evaluated.

Shortcut output

Full rule: planning-led

Full rule: flexibility-led

Planning-led

30

10

Flexibility-led

15

30

Unassigned

5

10

Full-rule total

50

50

The full rule supplies a reference assignment, not a statement of each person's true identity. Agreement with it does not validate the original groups, their needs or the benefit of a tailored offer. This check asks whether the shortcut reproduces a particular saved definition.

The shortcut assigns 85 of 100 people and abstains for 15. Of those assigned, 60 agree with the full rule: 60/85 = 70.6%. That is agreement among assigned cases. Across everyone evaluated, 60/100 receive an agreeing assignment; neither number should be presented as the other. A tool that leaves difficult cases unassigned can improve agreement among the remainder while covering fewer people.

For the planning-led route, 30 of the 40 people sent there match the reference: 75% precision against that rule. The tool finds 30 of the 50 reference planning-led cases: 60% recall. Fifteen go to flexibility-led and five remain unassigned. These two measures answer different questions: who enters the route, and how much of the reference group it captures. The official scikit-learn documentation defines precision and recall using those respective denominators. The reference groups' 50/50 mix is an example input, not an estimate of signup composition. Check performance in the intended deployment audience before carrying these percentages into staffing plans.

The error has to matter in the actual workflow. Suppose a planning-led assignment reserves a 20-minute specialist onboarding slot. The ten flexibility-led reference cases sent there reserve 200 minutes under that planning assumption. That is a resource implication of the route, not measured wasted time or proof that those people couldn't benefit. The fifteen planning-led reference cases routed to flexibility-led create a different question: what support would they receive instead? Keep unassigned customers on a usable general route rather than silently treating them as flexibility-led.

For this example, keep the full rule for specialist routing while revising the shortcut and testing it in a bounded pilot. The table does not establish that automatic routing is useful enough to justify its errors. A low-cost optional email could support a different decision from a scarce appointment, even with the same assignments.

The saved rule must survive deployment

Ask for the exact short questions, scoring version, missing-answer treatment and reason a case becomes unassigned. Report the complete assignment table and coverage by important groups, not only one overall agreement score. Test on people and, where relevant, a later period excluded from development. Reusing the same customers across development and evaluation can leak information. Scikit-learn's evaluation guidance explains why testing and repeatedly tuning on the evaluation records overstates performance on unseen cases.

Check which inputs will actually exist at signup. If the shortcut needs answers collected after onboarding, its apparent agreement cannot support earlier routing. Keep the research rule and operational tool separately versioned, with an owner and a general route for missing or uncertain cases. Then evaluate the tailored action itself. Reproducing a segment label and improving a customer's experience remain separate tests.

The acceptance test for the account team

A usable handoff names the assignment rule or model version and the real source base. Include the defining variables, needs evidence, unknown cases and reachable identifiers, followed by the proposed action and next evaluation. For Starter, the brief above points to investigating the next order; confirm first-purchase status before calling it a first-repeat problem. For frequent buyers, the question is whether replenishment fits how they already buy.

Accept the grouping when another person can reproduce it, the business can identify members in time and the proposed offer difference has a reason beyond the label. Reject or simplify it when those conditions fail. This is what the analysis must deliver before activation.

Use our segmentation guide and our behavioral segmentation guide, or discuss your segmentation question with Sapien.

Related guides: buyer personas; loyalty program research.

← Back to all articles