Contents/ Part XXVII · Capstone Projects: Statistical Testing/ Chapter 171

Do Satisfied Customers Come Back?

Capstone 12. Two survey scales, both answered on a 1-to-7 grid. The responses look like measurements, but they are labels of order, and that distinction decides which correlation you are actually entitled to compute.

⏱️ ~16 min read
🧪 Spearman correlation
📊 Chapter 171

The last capstone correlated two genuine measurements: hours and scores. This one correlates two opinions recorded as numbers. A 6 really is more satisfied than a 4, but nothing says the step from 4 to 5 is the same size as the step from 6 to 7. That single fact changes which method is defensible.

The brief
Setting
A customer survey asked satisfaction and repurchase intent on 7-point scales, plus tenure in years.
The question
Does satisfaction actually track loyalty, or do satisfied customers leave anyway?
Why it matters
Retention budgets are spent on the assumption that raising satisfaction raises repurchase. If the link is weak, that money is going somewhere it does no good.
What we do
Establish that Likert numbers are ordered but not measured, use Spearman's rank correlation rather than Pearson's, treat the heavy ties as a property of the instrument, and bootstrap an interval that no formula supplies.
ρ
Spearman's rank correlation replaces each value with its rank and correlates those. It measures whether the relationship is monotonic rather than linear, needs only that the categories are ordered, and is the appropriate choice for ordinal data such as Likert scales.
The finding, up front

Satisfaction and repurchase intent are strongly associated (ρ = 0.83, p < 0.001, n = 182). Pearson's r gives a similar 0.82 here, which invites the question of why the rank method matters. The answer: renumber the same ordered answers and Pearson moves to 0.74 while Spearman stays at 0.83.

1

The Instrument, and What Its Numbers Mean

A customer survey asked two questions on 7-point scales, plus tenure. The business question is whether satisfaction actually tracks loyalty, or whether happy customers leave anyway.

Customer survey · the instrument as fielded
1
Overall, how satisfied are you with our service?
1 Very dissatisfied234 Neutral567 Very satisfied
Ordinal · 7-point Likert
2
How likely are you to buy from us again?
1 Very unlikely234 Unsure567 Very likely
Ordinal · 7-point Likert
3
How long have you been a customer?
Years, to one decimal
Continuous · numeric entry
The detail the whole chapter turns on

The answers arrive as the numbers 1 to 7, and those numbers are genuinely ordered. But nothing guarantees the spacing is equal. Is the gap between "very dissatisfied" and "dissatisfied" the same size as the gap between "satisfied" and "very satisfied"? Nobody knows, and the survey never established it. The numbers are labels of order, not measured quantities, which makes these variables ordinal rather than continuous.

2

A Grid, Not a Cloud

Cleaning removed two duplicates, two blanks, and one impossible code of 9, leaving 182 responses. Ordinal data does not scatter like continuous data: with only 7 × 7 possible answers, hundreds of people land on the same points, so an ordinary scatterplot would hide most of them behind each other. Sizing each point by how many respondents chose that pair fixes it.

A bubble grid of repurchase intent against satisfaction, both on 1 to 7 scales. Bubble size shows how many respondents gave each combination. The large bubbles run from the bottom left to the top right along a dashed diagonal, showing that dissatisfied customers report low repurchase intent and satisfied ones report high intent.
Bubble size is the number of respondents giving that pair. The mass runs from the bottom left to the top right: the relationship is clearly monotonic, going one way without reversing. Whether it is straight is a harder question, and one the rank method never has to answer.
3

The Result

Spearman's ρ
0.829
the one we report
p-value
< 0.001
2.8 × 10−47
Kendall's τ
0.710
different scale, same story
Pearson's r
0.820
for comparison only

Satisfaction and repurchase intent are strongly and monotonically associated. Kendall's tau of 0.71 is lower than rho, which is normal rather than a disagreement: tau counts concordant against discordant pairs and typically runs below rho on the same data.

Which raises the obvious objection. Pearson's r is 0.82, almost identical to Spearman's 0.83. If they agree, why insist on the rank method?

4

Because They Are Not Equally Trustworthy

The numbers 1 to 7 are a convention chosen by whoever designed the form. Suppose the same survey had been coded with different numbers that preserve exactly the same order. Every respondent said exactly the same thing; only the labels changed. Watch what each coefficient does.

Coding of the same ordered answersPearson rSpearman ρ
Equal spacing  1, 2, 3, 4, 5, 6, 70.8200.829
Stretched at the top  1, 2, 3, 4, 6, 9, 130.7410.829
Stretched at the base  1, 5, 8, 10, 11, 12, 130.7880.829
A grouped bar chart with three pairs of bars. The red Pearson bars sit at three different heights, 0.820, 0.741 and 0.788, across the three codings. The green Spearman bars are identical at 0.829 in all three.
Three red bars at three different heights; three green bars at one height. Nothing about the respondents changed between the groups, only the numbers assigned to their answers.
The whole argument, in one sentence

Pearson believes the numbers; Spearman believes only the order. Pearson inherits whatever arbitrary spacing the survey designer happened to choose, so its value depends on a decision nobody had grounds to make. Spearman uses only the ranking, which is the one thing a Likert scale genuinely establishes. The rank method is right here not because it gives a different answer, but because its answer does not rest on an unfounded assumption.

5

Ties Are Not a Problem, They Are the Design

With 182 respondents spread over just seven possible answers, enormous numbers of people share the same value. That is not a defect in the data; it is the inevitable arithmetic of a short scale.

Satisfaction level1234567
Respondents13272942322118

Rank methods are built to handle this: each tied block receives the average rank within it, which is what scipy does automatically. It is worth knowing that Kendall's tau-b carries an explicit tie correction and is sometimes preferred on short scales for that reason, though here rho and tau lead to the same conclusion.

6

The Verdict, and What Was Actually Measured

Satisfaction and stated repurchase intent move together strongly. For the business this supports treating satisfaction as a leading indicator of retention, with two caveats that materially qualify it.

7

Rank Methods in Data Science & AI

Ordinal data is everywhere once you start looking, and so is the temptation to treat it as continuous.

Where it appearsThe ordinal variables
Survey and NPS analyticsAny Likert battery, satisfaction scale, or rating question.
Ranking and search evaluationPredicted ranking against human relevance judgments.
Model-vs-human agreementAn LLM's graded judgments against a rater's, both on ordered scales.
Robust feature screeningSpearman instead of Pearson when a predictor is skewed or has outliers.
Practice note

Rank correlation is the standard tool for evaluating ranking systems, because what matters is the order the system produces rather than the raw scores behind it. It is also the safe default for feature screening: Spearman detects any monotonic relationship, including curved ones that Pearson understates, and it is far less disturbed by the kind of extreme value that moved r by 0.19 in Capstone 11. When in doubt on messy data, compute both and investigate any gap between them.

8

Estimate: Resampling Gives What No Formula Does

Rank correlations are almost always reported as bare coefficients, partly because no simple formula gives their standard error. That is not a reason to skip the interval. It is a reason to resample.

THE BOOTSTRAP, IN ONE PICTURE the 182 respondents draw 182 with replacement resample 1 resample 2 resample 10,000 recompute rho each time 10,000 values of rho throw away the lowest 2.5% and the highest 2.5% what is left is the 95% interval no formula, no distributional assumption: the data supply their own uncertainty
Chapter 73's machinery, applied to a statistic with no convenient standard error. Each resample is a plausible alternative version of the same survey, and the spread of the coefficients across them is a direct picture of how much rho would wobble if the survey were run again.
A histogram of Spearman's rho across ten thousand bootstrap resamples, centered near 0.83, with a shaded band marking the middle 95 percent from about 0.78 to 0.87.
The bootstrap distribution of rho. The shaded band is the 95% interval, roughly 0.78 to 0.87, so "about 0.83" is a fair summary and the third decimal place is not.
QuantityEstimate95% CI (bootstrap)
Spearman's ρ0.8290.779 to 0.867
Kendall's τb0.7100.659 to 0.758
The third variable the survey did collect

The form also recorded tenure, and a third variable is the difference between speculating about confounding and checking it. Tenure barely moves with either scale, and holding it constant leaves the satisfaction-loyalty correlation at 0.828 rather than 0.829. Length of relationship is not the hidden variable driving both answers.

What that settles is one candidate explanation. It does nothing about the one that actually threatens this analysis, which is that both answers came from the same person in the same mood on the same afternoon. Common-method variance is not a column in the file, so no partial correlation can adjust for it. A covariate you measured can be controlled; a covariate you did not measure cannot. That is exactly why Capstone 7 could use the word "caused" and this chapter cannot.

WHY BOTH ANSWERS COMING FROM ONE FORM IS A PROBLEM the respondent's mood never recorded, so never adjustable satisfaction answer loyalty answer the link we measured: rho = 0.83 some unknown share of that 0.83 is the two red arrows, not the green one
The confounder with no column. Tenure could be checked because it was collected. A respondent's passing mood feeds both answers, was never recorded, and therefore cannot be partialled out by any method. The fix is a design change, linking survey answers to observed repurchase, not a cleverer analysis.
🐍

The full project, step by step

The companion notebook prints the instrument from the workbook, cleans the responses with a printed audit trail, draws the bubble grid that ordinal data needs, computes Spearman's rho, Kendall's tau, and Pearson's r for comparison, then re-codes the same ordered answers three different ways to show which coefficient survives and which does not. It closes with the tie structure and why rank methods handle it. Every number here comes from its output, with a plain-language note after each result.

📓 View Notebook (code & outputs) ▶ Open in Colab ⬇ View / Download on GitHub
Read the reports & get the data

The dataset (capstone-satisfaction-and-loyalty.xlsx) holds the responses on the survey sheet plus the full Questionnaire sheet, with duplicates, blanks, and an out-of-range Likert code left in so you can practice the cleaning. Two written reports accompany it: a plain-language brief for a customer-experience lead, and a technical report with the measurement argument, the re-coding demonstration, and references.

🎓 Key Takeaways

  • Likert numbers are labels of order, not measurements: the scale establishes ranking, never equal spacing.
  • Spearman tests for a monotonic relationship, not a linear one, so it never has to assume the scale is straight.
  • The decisive demonstration: renumber the same ordered answers and Pearson moves (0.820, 0.741, 0.788) while Spearman stays fixed at 0.829.
  • Ties are the design, not a defect: 182 people on 7 levels tie constantly, and rank methods assign midranks; Kendall's tau-b corrects for them explicitly.
  • Watch what was measured: both variables are stated intentions from the same form, so common-method bias inflates ρ = 0.83. Linking to observed repurchase would be far stronger.
9

Quiz: Test Yourself

Eight questions on this capstone, from ordinal measurement to common-method bias. Answer them, hit Check Answers, and keep refining until you score 100%. Your progress is saved.