How do you show that Ward's linkage, which merges the pair of clusters that least increases the total within-cluster sum of squares, has merge cost ? How do you check it on and ?
Unsupervised learning, Hierarchical clustering
Level L3 Intermediate. Length Long. Nature Mat Mathematical.
What's being asked
Whether you can derive the increase in sum of squared errors (SSE) on merging using the decomposition of variance about two means.
Key idea
For a cluster with mean , . The merged mean is the weighted average , and the SSE increase is .
Steps
- Write . This is the increase in total SSE when the two clusters are merged.
- For points in , . Sum over . The cross term vanishes because . So . The same holds for .
- Hence .
- Substitute and . Then .
- Check: , , so . Directly, the merged mean is and , while and , so . It matches.
- Interpret: the factor penalises merging two large clusters, so Ward tends to produce clusters of similar size, unlike single linkage.
Common mistakes
- Forgetting the cross term, or not explaining why it vanishes.
- Using (not squared) in the formula.
- Applying Ward with a non-Euclidean distance. The derivation needs squared Euclidean distance and means.
How long your answer should be
One page; 6–8 minutes.
Last checked on 4 December 2026.
Read this
Previous in Unsupervised learning: How do you compute PCA from the singular value decomposition (SVD) of the centred data matrix , how are the principal directions, variances and projected coordinates read off it, and why is the SVD route preferred in practice?
Next in Unsupervised learning: A 1-D Gaussian mixture has two components with equal weights , means and , and both variances equal to 1. For the data , what are the E-step responsibilities and the updated weights and means after one EM iteration?