Dimensional Higher Dimensions Simulation

Why volume escapes to the corners in high dimensions.

Space

Random points fill the cube [-1,1]n. The picture shows each point's first two coordinates (a slice shadow); green = inside the unit ball in all n dimensions.

Live measurements

Samples0 Ball volume Vn (formula)- Monte Carlo estimate- Ball / cube fraction- Volume in outer shell- Corner distance sqrt(n)- Check (|MC-formula| < 4 sigma)-
The science

The volume of the unit n-ball is Vn=πn/2/Γ(n/2+1). It peaks near n=5 (5.26) and then falls toward zero, while the enclosing cube [-1,1]n grows as 2n: almost all of a high-dimensional cube lies in its corners.

Shell fraction: the share of the ball within thickness ε of the surface is 1−(1−ε)n; for n=20 and ε=0.1 it is 88%. The corner of the cube is at distance √n from the centre while the ball has radius 1.

Independent check: the simulation samples uniform points in the cube; the hit rate p=Vn/2n must match the Gamma-function formula within a binomial error sqrt(p(1-p)/N). For large n the hit rate is tiny, so the estimate gets noisy: that is itself the "curse of dimensionality".

Simplification: the 2D picture is only a shadow of the first two coordinates.