Exercises — Choosing K (elbow method, silhouette score)
Two symbols carry this whole page, so let us fix them in plain words before anything else. First, one letter you will meet everywhere:

Look at the figure: is the short amber spread inside the home pile, is the long cyan reach to the nearest rival pile. When cyan is much longer than amber, is near .
Level 1 — Recognition
Exercise 1.1 (L1)
Below are four inertia readings from running K-Means Clustering with . Fill in the "drop" (how much inertia fell) for each step.
| K | Inertia |
|---|---|
| 1 | 12000 |
| 2 | 8000 |
| 3 | 3600 |
| 4 | 3200 |
Recall Solution 1.1
The drop is just the previous inertia minus the current inertia.
- :
- :
- :
Notice inertia only ever falls as grows — that is a mathematical guarantee, because more centres means every point can sit closer to some centre.
Exercise 1.2 (L1)
A point has and . Without computing, is this point well-clustered, ambiguous, or misclassified? Then compute .
Recall Solution 1.2
Home distance () is much smaller than rival distance (), so it is well-clustered ( near ).
Level 2 — Application
Exercise 2.1 (L2)
Using the table from Exercise 1.1, identify the elbow and justify it in one sentence.
Recall Solution 2.1
Drops: . The drop collapses from to between and , so the elbow is at — beyond it, extra clusters barely tighten the piles.
Exercise 2.2 (L2)
A point sits near a border: , . Compute and state in words what its value tells you.
Recall Solution 2.2
Close to means ambiguous — is almost equally close to its home cluster and to the neighbour, so it sits on the overlap boundary. (Had and been exactly equal, would be precisely — a perfect tie.)
Exercise 2.3 (L2)
Three points have silhouettes . Compute the overall silhouette score for this tiny dataset.
Recall Solution 2.3
One negative point (, likely misplaced) drags the average down from what the good point alone would give.
Level 3 — Analysis
Exercise 3.1 (L3)
You get these silhouette averages:
| K | Avg silhouette |
|---|---|
| 2 | 0.70 |
| 3 | 0.66 |
| 4 | 0.48 |
Silhouette says . The elbow curve (same data) bends clearly at . Which do you report, and why is the silhouette peak here not decisive?
Recall Solution 3.1
Report . Silhouette is biased toward fewer clusters: cutting data into two big blobs is the easiest way to make every point far from "the other side", so often wins the raw number. The elbow's honest bend at plus a still-healthy silhouette of (only below the peak) means captures real structure without the coarseness of . See Bias-Variance Tradeoff: is high-bias (too coarse).
Exercise 3.2 (L3)
Prove in words why inertia can never increase when you raise from to .
Recall Solution 3.2
Take the best solution for . Now add one more centre placed exactly on top of an existing one. Every point can keep its old assignment, so inertia is unchanged. But K-means will only move a point to a new centre if that lowers its squared distance. Therefore the optimal inertia is the inertia. Since it can only stay equal or fall, inertia is monotonically non-increasing in — this is why raw inertia can never pick by itself.
Exercise 3.3 (L3)
A cluster contains exactly one point. What is for that lonely point, and why does this break the cohesion formula?
Recall Solution 3.3
The cohesion formula divides by . With , that is — undefined. There are no "other points in the same cluster" to measure closeness to. By convention silhouette sets for a singleton cluster: with no home neighbours, we cannot say the point fits well or badly.
Level 4 — Synthesis
Exercise 4.1 (L4)
Two clusters, each with two points on a line:
- with centroid
- with centroid
(a) Compute total inertia. (b) Compute and for the point at , then . Distances are absolute differences on the line.
Recall Solution 4.1
(a) Inertia. Squared distance of each point to its centroid:
- :
- :
(b) Silhouette of . = average distance to other points in . Only one other point (), so we divide by : . = average distance to points in the nearest other cluster , dividing by the full : . Strongly well-clustered, as expected — the two clusters are far apart on the line.
Exercise 4.2 (L4)
Same two clusters as 4.1, but now suppose someone forces : one big cluster with centroid . Compute the new inertia and comment on what the elbow between and looks like.
Recall Solution 4.2
Squared distances to : , , , . From to inertia crashes from to — a drop of . Any further split () can only shave off a tiny bit more. That huge drop then flat line is the elbow: it screams .
Level 5 — Mastery
Exercise 5.1 (L5)
You must pick for a customer dataset. You have three signals:
- Elbow bends at .
- Silhouette: .
- Business team insists there are exactly 3 meaningful segments and will act on them.
Design a defensible decision and justify each vote. Then say what one extra diagnostic you would run before committing.
Recall Solution 5.1
Voting system (the parent's best-practice workflow):
- Elbow → votes .
- Silhouette → raw max is , but that is the fewer-clusters bias; at is only below and still solidly positive.
- Domain → votes , and it is actionable.
Decision: . It sits between the elbow () and the silhouette peak (), keeps a healthy silhouette, and is the only value the business can operationalise — a tie-breaker that matters because clustering exists to serve a downstream task (see Hyperparameter Tuning).
Extra diagnostic: plot the per-point silhouette diagram for . If only a handful of points go negative and the three clusters have comparable sizes, is confirmed. Many negatives or one tiny cluster → reconsider (perhaps two segments truly overlap, hinting DBSCAN).
Exercise 5.2 (L5)
Given per-point silhouettes for a run — cluster sizes with values , , — compute (a) each cluster's mean silhouette, (b) the overall silhouette, and (c) diagnose which cluster is problematic and what you would do.
Recall Solution 5.2
(a) Per-cluster means.
(b) Overall (average over all points, so here ):
(c) Diagnosis. has a negative mean — its points are, on average, closer to a rival cluster than to home. This cluster is not real: its members are probably absorbed into or scattered noise. Action: try , or move to a density method like DBSCAN that can label those three points as noise instead of forcing a cluster.
Recall Explain to a 12-Year-Old
Elbow method asks "when does adding another toy box stop making my room tidier?" Silhouette asks "does each toy feel like it's in the right box, or does it wish it were in the box next door?" You trust neither alone — you let the graph, the score, and common sense vote.