learn-data-literacy-with-phoebe / Session 7 of 8
Learn Data Literacy with Phoebe · Session 7 of 8

ML basics II: segment and understand customers

Session 6 predicted the future; today we understand the present. Clustering finds the customer groups you did not know you had, sentiment analysis reads ten thousand reviews before lunch, and CLV puts a price tag on every other decision you make. The algorithms find the shapes - naming them and acting on them stays gloriously human.

🟠 Stretch Execs & business leaders Builds on Sessions 5-6 45 min live + self-study
0-3 · Welcome 3-18 · Concepts 18-40 · Apply-along 40-45 · Q&A
Part 0

Why this session exists

Session 6 was supervised learning: history came with answers attached. Today the answers are missing on purpose. Nobody labels customers "bargain hunter" or reviews "secretly furious" - yet those structures are in your data, waiting. This session covers the three unsupervised-and-adjacent tools every leader ends up buying: clustering, sentiment analysis, and customer lifetime value. Same rules as always: executive intuition, no math, no code. And the same honest boundary: recommendations, search and GenAI are out of scope by design - they belong to the future AI literacy course.

Live - presented in session Self-study - read after class ★ Apply-along - interactive, everyone plays Real cases: Tesco Clubcard, airline sentiment, Harrah's
★ What you walk out with today Three durable instincts: how k-means actually works (four moves you can mime with your hands), the division of labor that governs all applied ML (algorithm finds the shape, humans name it and act), and the CLV:CAC ratio - the one number that tells you whether growth is building a business or burning one.
Part 1 · finding the groups

Unsupervised learning: finding structure without labels 5 min live

No right answers to learn from - so the algorithm does the only thing it can: group what is similar. Feed it customers described by numbers (orders per year, basket size, recency) and it hands back clusters. Whether those clusters mean anything is where you come in.

1 · Drop k pins (k = 3) 2 · Assign to nearest pin 3 · Move pin to its center 4 · Repeat until still converged - groups are stable Rings = the k pins (cluster centers). Assign, move, repeat - that loop is the entire k-means algorithm.
🔍 Click to zoom - k-means in four moves; you will drive this loop yourself in Apply-along 1
Livek-means in plain words, and the k question3 min▶
  • The whole algorithm: drop k pins on the map of your customers, assign each customer to the nearest pin, move each pin to the center of its crowd, repeat until nothing moves. That is it - no magic, just tidy averaging in a loop.
  • Choosing k is a judgment call. The elbow method gives a statistical hint (add clusters until the improvement flattens), but the real test is managerial: every segment must be nameable and actionable, or it is noise. If you cannot brief marketing on segment 4 in one sentence, you have too many segments.
  • One-line alternative: hierarchical clustering builds a family tree of similarity (the dendrogram) - you cut the tree at the number of branches you want. Same ends, different route.
  • RFM × clustering - the power combo. Session 5's recency, frequency and monetary scores make superb clustering inputs. Rules gave you the grid you designed; clustering finds the shapes you did NOT think to look for - the "big basket but fading" pocket no grid cell captured.
Real world

Tesco Clubcard, run with dunnhumby, is the founding legend of retail clustering. Loyalty-card baskets were clustered into shopper types - price-sensitive families, fine-food loyalists, convenience top-uppers - and the segments reshaped store ranging, promotions and mailings. The famous result: coupon redemption rates competitors could not touch, and a chairman who admitted dunnhumby knew Tesco's customers better than Tesco's own veterans did. The clusters did not sell anything - the actions built on them did.

Part 2 · reading text at scale

Sentiment analysis: reading text at scale 4 min live

Your customers write to you constantly - reviews, tickets, tweets - and no human team can read it all. Basic sentiment analysis is the triage nurse: crude, fast, and good enough to tell you where it hurts.

10,000 reviews raw, unread text Words counted bag-of-words, no grammar Sentiment scored pos / neg per review Themes ranked "battery" up, "screen" down One product decision Where it breaks: "Great, my flight is delayed AGAIN" scores positive - sarcasm and context beat word counting. That failure line is exactly where the future AI literacy course picks up. Today's tools are the honest 80%.
🔍 Click to zoom - the triage pipeline from unread text to one ranked decision
LiveThe basic recipe, and where it honestly breaks3 min▶
  • Step 1 - the lexicon: count positive and negative words from a dictionary. "Love, fast, perfect" versus "broken, refund, never". Crude, transparent, surprisingly useful.
  • Step 2 - bag-of-words + a simple classifier: treat each review as a bag of word counts and let naive bayes learn which words make a review likely-negative ("refund" is a lot of evidence, "the" is none). Still no grammar, still fast, noticeably smarter.
  • What it buys you: triage at scale. Thousands of reviews and tickets sorted by pain, themes ranked by frequency and negativity, releases compared before and after. Direction, not poetry.
  • Where it breaks: sarcasm, negation and context. "Great, delayed again" reads as positive; "not bad at all" reads as negative. When the stakes need real understanding, that is the AI literacy course's turf - do not buy a hedge trimmer and expect a forester.
Real world

Airlines mine tweets and reviews to route service recovery in real time - a spike of angry mentions on one route pages the ops team before the morning report exists. Product teams run the same trick per release: sentiment by theme, this version versus last, tells them whether "battery" complaints actually fell after the fix. Nobody reads 10,000 tweets; everybody reads the ranked themes.

The exec move When shown a sentiment dashboard, ask "sorted by which themes?" A single overall score ("sentiment is 72!") is a vanity metric; sentiment BY THEME, trended across releases, is a to-do list.
Part 3 · the master number

CLV: the metric that prices every other decision 6 min live

Customer lifetime value answers the only question marketing budgets really turn on: what is a customer worth over their whole relationship with you? Get CLV roughly right and acquisition spend, retention offers and even the churn threshold from Session 6 all price themselves.

The workhorse formula (one customer, worked) AOV $80 avg order value × 4 orders / yr purchase frequency × 30% margin profit, not revenue × 3 years expected lifespan = CLV $288 lifetime profit CAC $95 cost to acquire one CLV : CAC ≈ 3.0x healthy - the rule of thumb Under 1x: losing money on every customer Around 3x: healthy growth engine Way over 5x: maybe underinvesting in growth Payback period is the sibling question: how many months until a new customer repays their CAC?
🔍 Click to zoom - the CLV formula and the 3x rule; Apply-along 2 puts sliders on every box
LiveHistoric, predictive, and the honest middle3 min▶
  • Historic CLV - what a cohort actually spent. True but backward-looking; your 2019 customers tell you about 2019.
  • Predictive CLV - what customers WILL spend, modeled. Forward-looking but only as good as its assumptions.
  • Cohort-based CLV - the honest middle. Track what each acquisition cohort spends over time (Session 5's curves) and project the curve forward gently. Most businesses should live here before buying anything fancier.
  • Name-drop tier: BG/NBD + Gamma-Gamma (Fader & Hardie) - the classic probabilistic models your DS team would reach for to predict who is still "alive" as a customer and what they will spend. Names to recognize, not math to learn.
  • CLV:CAC with the 3x rule of thumb - and its sibling, payback period. Below 1x you lose money on every customer you win; hovering near 5x or above, you may be growing too timidly.
Real world

Harrah's casino built its Total Rewards program on CLV - and the data said something nobody expected: the glamorous high-rollers were not the most valuable customers. Mid-tier locals - teachers and retirees visiting weekly - out-valued them over a lifetime, and the entire marketing budget was reshaped around them: offers, comps, even floor layout. It became the flagship case in Davenport's Competing on Analytics, and the lesson generalizes: until you compute CLV, your gut is spending the budget on the wrong customers.

Self-studyProduct analytics: the product team's funnel + cohort toolkit2 min read▶

Product teams run Sessions 5-7 thinking against the product itself. Three terms complete your vocabulary:

MetricThe question it answersThe exec use
ActivationDid the new user reach the first moment of real value?The retention lever that pays earliest - fix activation before buying ads
Feature adoptionWho actually uses the thing we shipped, and how often?Kills the "we launched it so it worked" illusion in roadmap reviews
Path analysisWhat routes do users actually take (versus the one we designed)?Finds the detours and dead ends - the funnel's free-range cousin

All three are funnels and cohorts wearing product clothes - you already know how to read them.

Apply-along 1 of 3

Run k-means with your own hands ★ 10 min · everyone clusters

Sixty customers plotted on two axes: orders per year and average basket. You are the algorithm now - assign, move, repeat.

Look at the raw cloud first. Can you SEE groups before any algorithm runs? (Usually: sort of. That fuzziness is why we bother.)

Click assign - every customer joins its nearest pin. Then click move - each pin walks to the center of its crowd.

Alternate assign, move, assign, move until nothing changes. Count your rounds - convergence usually arrives embarrassingly fast.

Now the human part: name the three segments that emerged. In this data they are roughly bargain-occasional, frequent-regular, and big-basket-rare. Write one action per segment.

The debrief The algorithm found the shape; YOU supplied the names and the actions. That division of labor is the whole story of applied ML - machines are magnificent at similarity and hopeless at meaning. A segment without a name and an action is just a colored blob.
Apply-along 2 of 3

Price a customer with the CLV calculator ★ 8 min · everyone prices

Every slider is one lever of the workhorse formula. Watch which levers move the verdict - the answers surprise most rooms.

Read the baseline customer: AOV $80, 4 orders a year, 30% margin, 3-year lifespan, CAC $95. Check the verdict - roughly 3x, healthy.

Challenge 1: marketing wants to double acquisition spend, pushing CAC to $150. Move the slider - is the engine still healthy?

Challenge 2: instead, invest the same energy in retention and stretch lifespan from 3 years to 4. Compare the two end states side by side.

Say the conclusion out loud: which lever would you fund this quarter, and what would you tell the team that owns the other one?

The debrief Retention moves CLV linearly and quietly - an extra year of loyalty compounds without a press release. Acquisition cost moves the ratio loudly and immediately. The 3x rule keeps the argument honest: it converts "we should spend more on growth" from an opinion into an arithmetic claim anyone can check.
Apply-along 3 of 3

Segment reality check ★ 4 min · everyone audits

Write down the 3 customer segments your company ACTUALLY treats differently today - different offers, different service, different anything.

For each: is it defined by data (RFM scores, cluster membership) or by folklore ("enterprise means big logo")?

The uncomfortable test: if every segment gets the same email, you have zero real segments - and Session 5's RFM grid plus today's clustering is your gap list, in priority order.

Pick the one segment you would treat differently FIRST if the clusters existed, and note what the treatment would be. That is your ask for the data team.

After the session

This week ◐ 25 min total

Check yourself

Three questions before you go 🎯 ◐ 90 seconds

1 · What does k-means need from a human being before its clusters are worth anything?

Unsupervised means no labels needed - not no humans needed. Choosing k is a judgment call, and a cluster without a name and an action is noise. The algorithm finds similarity; meaning is your department.

2 · "Great, my flight is delayed again." Why does basic sentiment analysis misread this tweet?

Lexicon and bag-of-words methods count words without reading meaning, so sarcasm, negation and context defeat them. They remain great for triage at scale - and that failure line is where the AI literacy course begins.

3 · Your CLV:CAC ratio comes back at 0.8. What is the data telling you?

Below 1x, each acquired customer is a small loss you then scale with the marketing budget. The rule of thumb: ~3x is healthy; far above 5x may mean you are underinvesting in growth you could afford.

Source material

Concepts covered & their origins

The working 80% of each idea, credited to its canon - the deep end stays optional and the boundary stays honest.

✓k-means clusteringthe four-move loop, choosing k, nameable-and-actionable test - Part 1 + Apply-along 1
◐Hierarchical clusteringone-liner: the dendrogram family tree, cut where you like
✓RFM × clusteringSession 5's scores as inputs; rules give the grid, clustering finds the shapes - Part 1
✓Sentiment analysis basicslexicon → bag-of-words + naive bayes; sarcasm as the honest limit - Part 2
✓CLV: formula + cohort methodAOV × frequency × margin × lifespan; CLV:CAC 3x rule - Part 3 + Apply-along 2
◐BG/NBD + Gamma-Gamma (Fader & Hardie)names only - the probabilistic CLV models your DS team would use
◐Product analyticsactivation, feature adoption, path analysis - self-study card
✗Recommendations & search rankingnot covered by design - that is the future AI literacy course

Session 7 cheat sheet · pin this

k-means recipeDrop k pins → assign each point to nearest → move pins to their center → repeat until still. The whole algorithm, no math required.
Choosing kElbow method hints; management decides. Every segment must be nameable and actionable or it is noise - if you cannot brief it in one sentence, merge it.
The division of laborAlgorithms find shapes; humans name them and act. RFM rules give the grid you designed; clustering finds the pockets you did not think to look for.
Sentiment recipe + limitLexicon → bag-of-words + naive bayes. Great for triaging thousands of reviews by theme; breaks on sarcasm and context - that is the AI course's turf.
CLV workhorseCLV = AOV × frequency × margin × lifespan. Historic looks back, predictive guesses, cohort-based is the honest middle. BG/NBD + Gamma-Gamma = the fancy names.
CLV:CACUnder 1x = losing money per customer. ~3x = healthy. Far over 5x = maybe underinvesting. Retention moves CLV quietly; CAC moves the ratio loudly.