Consider a d-dimensional unit-radius hypersphere inscribed inside the hypercube [−1,1]d. Using the hypersphere volume Vd(r)=πd/2Γ(d/2+1)rd (where Γ(k+1)=k! for an integer k), what fraction of the hypercube's volume does the sphere occupy for d=2, 4 and 10, and what does this imply about uniformly sampled points in high dimensions?

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

What's being asked

Whether you can compute high-dimensional volume ratios and explain why volume concentrates in the corners of a hypercube.

Key idea

The hypercube [−1,1]d has edge length 2 and volume 2d, while the inscribed unit sphere has volume πd/2/(d/2)! for even d, so their ratio shrinks rapidly toward zero as d grows and almost all uniform points land in the corners outside the sphere.

Steps

  1. Write the volume ratio for radius r=1: the hypercube [−1,1]d has edge length 2 and volume 2d, so the ratio is ρd=Vd(1)2d=πd/22d Γ(d/2+1). For even d, Γ(d/2+1)=(d/2)!.
  2. Evaluate at d=2: ρ2=π4⋅1!≈0.7854 (78.5%).
  3. Evaluate at d=4: ρ4=π216⋅2!=π232≈0.3084 (30.8%).
  4. Evaluate at d=10: ρ10=π51024⋅5!=π5122880≈0.00249 (0.25%).
  5. Interpret: in 10 dimensions, over 99.7% of the hypercube's volume sits in the 210=1024 spiky corners at distance >1 from the centre (the corner (1,…,1) lies at Euclidean distance d). Uniform sampling therefore leaves the interior empty and puts nearly all points far from the origin.

Common mistakes

How long your answer should be

3–4 minutes: the ratio formula, the three numbers, and two sentences on corner concentration.

Read this

Previous in Foundations: Why is the predictor that minimises the expected squared loss the conditional mean E[Y∣X=x], and why is the classifier that minimises the expected 0-1 loss arg⁡max⁡kP(Y=k∣X=x)?
Next in Foundations: In positive-unlabelled (PU) learning, every labelled example is positive (s=1  ⟹  y=1), and each true positive is labelled independently of its features with constant probability c=P(s=1∣y=1,x)=P(s=1∣y=1)>0. How do you express the true posterior P(y=1∣x) in terms of the observed-label posterior P(s=1∣x) and c, and how can c be estimated from a held-out set of labelled positives?