Asymptotic value of an integral related to distances in a unit n-ball In trying to find out  the pdf of  the range $T$ of  euclidean distances of $m$ randomly and uniformly chosen points  from the origin in an $n$-dimensional unit ball, I have obtained the following :
$$ f(t)=m^2.n(n-1)\int_0^{1-t} u^{m-1}(u+t)^{m-1}[(u+t)^m-u^m]^{n-2}du.$$
From the geometry of the n-dimensional ball, it is intuitively expected that the average range and variance should approach zero.That requires computing the integrals:
$$E(T)=\int_0^1tf(t)dt  $$ and
$$E(T^2)=\int_0^1t^2f(t)dt.$$
How do I evaluate the above integrals in, say, Mathematica; and is it possible to find the analytical expressions for them in the cases when both $m,n$ approach infinity?
 A: This question is interesting because within its analysis lies a precise, quantified statement of the "curse of dimensionality."
In $n$ dimensions, the volume of a region scaled by a factor $r \ge 0$ is multiplied by $r^n.$  Since the proportion of points in a unit ball $B^n$ at a distance $r$ from its origin are those within a ball of radius $r,$ which is the unit ball scaled by a factor of $r,$ the chance that a uniformly chosen point within the unit ball is within distance $r$ of its origin is
$$F(r) = r^n,\quad 0 \le r \le 1.$$
The question concerns the distribution of the range of $m$ independently chosen uniform points in $B^n$ as both $m$ and the dimension $n$ grow large.  It models what can happen in datasets of $m$ observations having $n$ factors where both $n$ and $m$ are large.
To study this, let's first look separately at the distributions of the largest and smallest distances.
The maximum
Let $Y$ be the largest of $m$ such distances. The chance $Y$ does not exceed a given value $r \le 1$ is the chance that all $m$ distances are $r$ or less, whence
$$F_Y(r) = \Pr(Y\le r) = F(r)^m = r^{mn},\quad 0 \le r \le 1.$$
As $m$ and $n$ grow large, this obviously converges to $0$ for any fixed $r\lt 1.$  Thus, the limiting distribution of the maximum is $1:$

As either the number of points or the dimension of the space they are in grow large, the largest distance almost surely approaches $1:$ that is, there is at least one point arbitrarily close to the boundary.

The minimum
Let $X$ be the smallest of $m$ distances to the origin in $B^n.$  Analogous reasoning establishes
$$F_X(r)=\Pr(X \le r) = 1 - \Pr(X \gt r) = 1 - (1 - F(r))^m = 1 - (1 - r^n)^m,\quad 0 \le r \le 1.$$
Setting $Z = X^n,$ this shows
$$F_Z(z) = \Pr(Z \le z) = \Pr(X \le z^{1/n}) = 1 - (1 -z)^m,\quad 0 \le z \le 1.$$
Its derivative
$$f_Z(z) = F_Z^\prime(z) = m(1-z)^{m-1} = \frac{1}{B(1,m)} z^{1-1}(1-z)^{m-1}$$
is recognizable as the density of a Beta$(1,m)$ variable.  In terms of the Beta function
$$B(a,b) = \int_0^1 x^{a-1}(1-x)^{b-1}\,\mathrm{d}x = \frac{\Gamma(a)\Gamma(b)}{\Gamma(a+b)}$$
we may immediately write
$$E[X^k] = E\left[\left(Z^{1/n}\right)^k\right] = \frac{B(1+k/n, m)}{B(1, m)} = \frac{\Gamma(1+k/n)\Gamma(m+1)}{\Gamma(m+1+k/n)}$$
for any positive number $k.$
When  $n$ is sufficiently large and $k=1$ or $k=2,$ we may approximate expressions of the form $\Gamma(a + k/n)$ with the derivative
$$\Gamma(a + k/n) = \exp(\log\Gamma(a + k/n)) \approx \exp(\log(\Gamma(a)) + \psi(a) k/n)) = \Gamma(a) \exp(\psi(a)k/n).$$
where $\psi(a)$ is the derivative of $\log \Gamma$ (the digamma function).  Consequently, still for large $n,$  the crucial asymptotic approximation is

$$E\left[X^k\right] \approx \frac{\exp(\psi(1)k/n)}{\exp(\psi(m+1)k/n)}= \exp(-H_{m+1} k/n) \approx m^{-k/n}$$

where $H_m = 1 + 1/2 + \cdots + 1/m \approx \log(m).$
This shows immediately that there are four regimes to consider as $m$ and $n$ grow large:

*

*When $(1/n)\log(m) \to \infty,$ so that the number of points $m$ is increasing faster than the exponential of the dimension $n,$ both the expectation (for $k=1$) and second moment (for $k=2$) shrink to zero, whence the variance shrinks to zero, too.  In this case, the minimum almost surely approaches zero.


*When $(1/n)\log(m) \to 0,$ so that the number of points is increasing slower than $\exp(n),$ the expectation and the second moment both converge to $1.$  This implies the variance also converges to $0$ and we conclude the minimum almost surely approaches $1.$


*When $(1/n)/\log(m)$ does not converge, then neither can the expectation nor the variance of $X$ converge.  Obviously there cannot be a limiting distribution, but possibly a suitably standardized version of $X$ could converge.  This covers a lot of complicated ground, so I won't pursue this possibility further.


*Suppose, finally, that $(1/n)/\log(m)$ converges to some value $\delta$ as $(m,n)\to(\infty,\infty).$  This implies the expectation converges to $e^{-\delta}$ and the second moment converges to $e^{-2\delta},$ whence the variance converges to $e^{-2\delta} - \left(e^{-\delta}\right)^2 = 0.$  Thus, the distribution of the minimum distance is approaching a nonzero constant value $e^{-\delta}.$
As $m$ grows large, the dependence between the minimum and maximum of the distances grows ever weaker.  Consequently, we can find the limiting distribution of the range by simple subtraction:


*

*If $m$ and $n$ grow large in such a way that $m\gg e^n,$ the range of distances in the ball approaches $1$ in distribution.

*If eventually $m \ll e^n,$ the range approaches $0$ in distribution and almost all distances become arbitrarily close to $1:$ nearly all the points lie near the surface of the ball.

*When eventually $m \approx e^{n\delta}$ for some number $\delta \gt 0,$ the range approaches $1 - e^{-\delta}$ while the maximum approaches $1.$


It is worth remarking on the generality of this analysis.  The initial derivation of $F$ based on scaling applies to any region $\mathcal R$--not just a ball--that is star-shaped with respect to a point in its interior.   (This means the result of scaling the region by any factor $0\le r \le 1$ is a subset of the region itself.)  All convex regions are star-shaped with respect to any of their interior points, for instance.
The meaning of "distance" is now subtly different but useful: we say a point $x$ has a "distance" $r$ when $x$ is in the $r$-scaled version of $\mathcal R$ (with respect to its distinguished point) but $x$ is not in the $r$-scaled version for any smaller value of $r.$  The three key conclusions retain their original interpretations; in particular, in the cases where the "distances" are almost surely $1,$ the points must be almost surely near the boundary $\partial \mathcal R.$
In this sense, balls are not special.  The relevant geometry is that associated with dimension alone, rather than any particular domain.  This implies the analysis is quite general and applies to any dataset whatsoever, to the extent we might conceive of it as being one in a series of ever larger datasets contained with a series of domains in $\mathbb R^n$ of increasing dimensions.
