Let X,Z∼N(0,Id) be two independent d-dimensional standard Gaussian vectors. Compute E[∥X−Z∥22] and SD⁡(∥X−Z∥22) as functions of d. Why does the ratio SD⁡(∥X−Z∥22)/E[∥X−Z∥22] tend to 0 as d→∞, and how does this break distance-based methods like k-NN?

Foundations, Curse of dimensionality
Level L3 Intermediate. Length Medium. Nature Mat Mathematical.

What's being asked

Whether you can prove distance concentration analytically for Gaussian vectors and connect it to the failure of Euclidean nearest neighbours in high dimensions.

Key idea

The squared distance ∥X−Z∥22 is a sum of d independent χ2-scaled terms, so its mean grows as 2d while its standard deviation grows only as 8d; their ratio 2/d→0 means all pairwise distances collapse to nearly the same value.

Steps

  1. Write the distribution of the difference vector: since X and Z are independent N(0,Id), W=X−Z∼N(0,2Id), so its coordinates W1,…,Wd are independent N(0,2) random variables.
  2. Compute the per-coordinate moments: write Wj=2 Uj with Uj∼N(0,1). Then E[Wj2]=2 E[Uj2]=2. Because Uj2∼χ12 has variance 2 (from E[Uj4]−1=3−1=2), Var⁡(Wj2)=22Var⁡(Uj2)=4×2=8.
  3. Sum over the d independent coordinates for ∥W∥22=∑j=1dWj2: E[∥X−Z∥22]=2d,Var⁡(∥X−Z∥22)=8d,SD⁡(∥X−Z∥22)=22d.
  4. Take the relative fluctuation ratio: SD⁡(∥X−Z∥22)E[∥X−Z∥22]=22d2d=2d→d→∞0.
  5. Interpret for k-NN: in high dimensions with isotropic or noisy features, almost every pair of distinct points sits at Euclidean distance ≈2d from every other point, with tiny relative separation. The nearest neighbour is barely closer than the farthest neighbour, so Euclidean distance loses discriminative power unless irrelevant dimensions are removed or the data lie on a low-dimensional manifold.

Common mistakes

How long your answer should be

Half a page; 4–5 minutes.

Last checked on 4 December 2026.

Read this

Previous in Foundations: Suppose a feature X has mean μ and variance σ2, and each entry is missing independently with probability p (MCAR). If missing entries are replaced by μ, what are the mean and variance of the imputed feature Ximp, how does this affect Corr⁡(Ximp,Y) with a target Y, and why is adding a binary missingness indicator often better?
Next in Foundations: A colleague standardises all features using the mean and standard deviation of the entire dataset, selects the 20 features most correlated with the label y, and then runs 5-fold cross-validation to tune and report the accuracy of a classifier. Is the resulting CV accuracy unbiased, how do you fix the pipeline, and how badly can full-dataset feature screening distort pure random noise?