# Curse of Dimensionality: hypercube inside a hypersphere

Exercise 2.5 of Izenman's Modern Multivariate Statistical Techniques:

Consider a hypercube of dimension $r$ and sides of length $2A$ and inscribe in it an $r$-dimensional sphere of radius $A$. Find the proportion of the volume of the hypercube that is inside the hypersphere, and show that the proportion tends to $0$ as the dimensionality $r$ increases. In other words, show that all the density sits in the corners of the hypercube.

Let $C$ be the volume of the hypercube, and $S$ be the volume of the hypersphere. Then $$\dfrac{C}{S} = \dfrac{(2A)^r}{2\pi^{r/2}A^r/[r\Gamma(r/2)]} = \dfrac{2^{r-1}r\Gamma(r/2)}{\pi^{r/2}}\text{.}$$ Does this really tend to $0$? If so, I don't see it and I don't think this would be true... since (I would think it's obvious that) $r\Gamma(r/2) > \pi^{r/2}$ for large $r$... or am I wrong?

• I don't know the answer to your problem, but you might try Stirling's approximation if you haven't already. – Jesse Madnick Mar 22 '16 at 19:20
• You are computing the ratio $C/S$ of the volume of the whole hypercube to that of the whole hypersphere. This is not what the question asks... it asks for the ratio $C^\prime/C$, where $C^\prime$ is the volume of the intersection of the hypercube and the hypersphere. – Clement C. Mar 22 '16 at 19:22
• @ClementC. I suppose I'm misinterpreting "inscribed" (since I haven't taken geometry in years and took it to mean that the hypercube is contained in the hypersphere). What does it mean here? – Clarinetist Mar 22 '16 at 19:24
• I really think there's a typo in the question. "inscribe it in" should be "inscribe in it". You're poking the sphere into the cube.The sphere is inside the cube. The part of the cube that's not in the sphere has most of the volume. – Ethan Bolker Mar 22 '16 at 19:41
• Yes. (Now more characters to make a legal comment.) – Ethan Bolker Mar 22 '16 at 19:45

The question is which part of the hypercube volume $C$ is also inside the hypersphere, i.e. in $S\cap C$. Since the hypersphere is fully contained in the hypercube, $S\cap C=S$. So according to Wikipedia you want
$$\frac{V(S)}{V(C)} =\frac{A^r\frac{\pi^{r/2}}{\Gamma(\frac r2+1)}}{(2A)^r} =\left(\frac{\sqrt\pi}{2}\right)^r\cdot\frac1{\Gamma(\frac r2+1)}$$
Now $\frac{\sqrt\pi}2\approx0.886<1$ and $\lim_{x\to+\infty}\Gamma(x)\to+\infty$ so yes, this does tend to zero.
Since $\Gamma\left(\frac r2+1\right)=\frac r2\Gamma\left(\frac r2\right)$ the formula for $V(S)$ agrees with what you used, except that for $r=0$ you'd have $\Gamma(0)$ undefined. But for $r\to\infty$ that's irrelevant.