Skip to content

MODULE 6 · LESSON 32 · Practical business analytics

Customer behavior

Distinguish transactions from people and construct a behavior metric with a defined observation window.

By Laurence Svekis · Self-paced · All worked data is synthetic unless you supply your own source.

Try the practice ↓

PredictInspectCalculateCheckExplainTransfer

Your starting point

Prerequisites: Use the ideas and vocabulary from lesson 31; revisit its worked examples if needed.

Definition: Customer behavior analytics describes recorded actions such as visits, purchases or returns. A customer metric requires an identity rule and a time window. Repeat purchase rate concerns customers with repeated purchases, not simply the share of rows containing a repeated label.

Define identity carefully

A person may use several devices or accounts, and a shared account may represent several people. An identifier in a table is an operational label, not perfect knowledge of identity. Do not infer demographics or personal characteristics that the source does not contain. Use aggregate, non-sensitive examples and state the limits of the identity method.

Use a cohort and a window

A repeat-purchase comparison depends on how long each customer had an opportunity to return. Customers acquired yesterday cannot be fairly compared with customers observed for a year without aligning the window. A cohort groups units by a shared entry period or event. Define eligibility, follow-up time and what counts as a repeated action before calculating the rate.

Separate behavior from motivation

A customer who stops buying may have switched suppliers, completed a one-time need or simply not yet needed another purchase. Recorded actions do not reveal intent automatically. AI summaries can invent motives that sound plausible. Keep descriptive behavior separate from explanations that would require interviews, experiments or additional authorized data.

Two worked examples

Orders versus repeat customers

Customers A, A, B and C appear in four order records within a fixed month. There are three distinct customer IDs and one repeat purchaser, A. The repeat-customer rate is 1 ÷ 3, about 33.33%, not 2 ÷ 4 merely because A appears in two rows.

Unequal follow-up

Cohort X was observed for twelve weeks and cohort Y for two weeks. X has more returning customers, but it also had more time to return. Compare a common two-week window or explain that the observed rates answer different exposure periods. The raw difference does not establish a better customer experience.

Where this becomes useful

A small service wants to understand repeat bookings. An aggregate cohort table can support planning without exposing names, contact details or speculative personal profiles. Protect privacy while defining the behavior precisely.

Make an attempt

Use Table Explorer to construct or import a tiny fictional order table with customer IDs and dates. Count records and unique IDs separately, then write a repeat-purchase definition with an equal observation window before calculating it.

Open the accompanying interactive lab →

Misconception check

Claim: A transaction record reveals why a customer acted.

Inspect the correction

It records an action under a measurement system. Motivation requires separate evidence and should not be invented.

Independent application

Design a fictional repeat-booking analysis with anonymous IDs, a cohort rule and a fixed follow-up window. Calculate counts and a rate, document the identity limitations, and write a conclusion that does not infer unmeasured motivations.

Completion records practice and self-review. It is not certification of statistical competence.