Past exam of the mathematics course of the University of Cambridge 2006 iii Paper 46 4 a Solution Created 2026-10-03 Updated 2026-10-14
Write for two rows of the data matrix and . Three possible dissimilarities for continuous variables are the following.
The Euclidean distance isIt is simple and has the usual geometric interpretation when coordinates have comparable units. Its disadvantage is sensitivity to the numerical scales: a change of units or a high-variance variable can dominate it. Strongly correlated coordinates can also give repeated weight to essentially the same information. Squared Euclidean distance is useful in some methods, but is not itself a metric because it need not satisfy the triangle inequality.
The standardized Euclidean distance iswhere is the sample variance of coordinate across individuals. It measures differences in standard-deviation units and is invariant under positive coordinate rescalings when the scales are estimated consistently. It is useful for differently measured variables, but requires nonzero sample variances, ignores correlations between coordinates and can give excessive influence to a low-variance noisy variable. With fixed positive scales it is a Euclidean distance after a diagonal change of coordinates, so it is a metric.
The Mahalanobis distance iswhere is the pooled sample covariance matrix of all individuals. If is its Cholesky decomposition, then : it is Euclidean distance in whitened coordinates. It adjusts for both scales and correlations, avoiding duplicate weight for highly correlated variables, and is invariant under nonsingular affine transformations when the sample covariance matrix is transformed accordingly. No multivariate normal distribution assumption is required merely to define the distance. However, must be a positive-definite matrix; when there are too few observations or dependent coordinates, its inverse is unavailable. Estimation of can also be unstable and sensitive to outliers. These trade-offs determine whether covariance adjustment is preferable to the simpler distances.
Past exam of the mathematics course of the University of Cambridge 2007 iii Paper 47 4 a Solution Created 2026-10-03 Updated 2026-10-14
For rows , three useful choices are Euclidean distance, standardized Euclidean distance, and Mahalanobis distance:The Euclidean choice is simple, rotation invariant and appropriate when the original coordinate scales carry comparable meaning. It is sensitive to scale changes, may be dominated by a high-variance variable and gives correlated or duplicate variables repeated influence. Squared Euclidean dissimilarity is sometimes used algorithmically, but removing the square root generally loses the triangle inequality.
The standardized Euclidean choice removes marginal units using fixed positive sample scales . It gives equal marginal weight to variables, but ignores correlations and can magnify noise when an estimated variance is small. Constant variables require omission or an explicitly chosen positive external scale.
The Mahalanobis choice incorporates the full positive-definite sample covariance , so it is Euclidean distance after whitening. It accounts for both scale and redundancy and is invariant under an invertible change of coordinates when is transformed consistently. However estimating requires enough observations and can be sensitive to extreme values; inversion is unstable near singularity and unavailable when is singular. With fixed positive scales or positive-definite , all three square-root expressions are genuine metrics on the measurement space. Their different geometries encode different notions of which individuals should be considered similar.