# What is the expected 2-norm of a uniform point in the standard m-cube?

I want to compute the integral

$\int_{[0,1]^m} \sqrt{\sum_{j=1}^m u_j^2} \ du_1 \dots du_m$.

Wolfram Alpha gives an exact result for $m = 2$, but fails to do so for higher values. I am particularly interested in the asymptotics.

I'm sure the value is a standard result, but don't know where to find it (no, I don't have a copy of G&R handy).

Edit/followup: I'm also interested in the integral $\int_{p \ge 0, \sum_{j=1}^m p_j = 1} \sqrt{\sum_{j=1}^m p_j^2} \ dp_1\dots dp_{m-1}$, i.e. the expected 2-norm of a probability distribution on $[m]$ chosen uniformly at random.

-

Well, a simple asymptotic is (by probability) $\sqrt{m/3}$

This can be obtained by considering that we want the expectation of

$w = \sqrt{x_1^2 +... x_m^2} = \sqrt{y_1 +... y_2}$

with $y_i = x_i^2$, so that $\displaystyle f_y(y) = \frac{y^{1/2}}{2}$, and $E(y)=1/3$, $\sigma^2(y)=4/45$.

Then, the variable $z = (y_1 +... y_2)/m$ will approach a gaussian with $\mu_z = 1/3$, $\sigma^2_z=\frac{4}{m 45}$.

And $E(w) = \sqrt{m} E(\sqrt{z})$ which in first approximation is $E(w) \approx \sqrt{m} \sqrt{\mu_z} = \sqrt{m/3}$

One can get better aproximations with the higher moments, for example:

$E(w) \approx \mu_z^{1/2} - \frac{1}{8}\mu_z^{-3/2}\sigma_z^2 = \sqrt{\frac{m}{3}} - \frac{1}{30}\sqrt{\frac{3}{m}} = \sqrt{\frac{m}{3}}\Bigl(1 - \frac{1}{10 m}\Bigr)$

(errors aside).

Are you looking for something more precise?

UPDATE: By a similar reasoning, the additional problem (if I understand it right) gives $\displaystyle \sqrt{\frac{4}{3 m}}$

UPDATE2: About the second order approximation:

In general, when we want to find moments of $Y=g(X)$ with $g(.)$ nonlinear but smooth, we can do a Taylor expansion around its media:

$Y = g(\mu_x) + g'(\mu_x)(X-\mu_x) + \frac{1}{2!} g''(\mu_x)(X-\mu_x)^2 + ...$

So that

$\displaystyle \mu_y = E(Y) = g(\mu_x) + g''(\mu_x)\frac{\sigma_x^2}{2} +...$

This, BTW, justifies the intuitive notion that $E(g(.)) \approx g(E(.))$ if the variance is small (equality applies only if $g(.)$ is linear, of course) and allows to estimate (and to some extent correct) the error of the approximation.

-
$f_Y (y) = y^{-1/2}/2$, of course. However, to find ${\rm E}(Y)$ and ${\rm Var}(Y)$ you don't need $f_Y (y)$, as ${\rm E}(Y^n)={\rm E}(X^{2n})=\int_0^1 {x^{2n} dx} = \frac{1}{{2n + 1}}$, $n=1,2$. – Shai Covo Jan 25 '11 at 20:40
Can you please elaborate on the better approximation? – Shai Covo Jan 25 '11 at 21:13
@Shai: you're right. about the better approximation, I updated the answer – leonbloy Jan 25 '11 at 21:43
Thanks. – Shai Covo Jan 25 '11 at 21:49

As for the asymptotics, suppose that $U_i$ are i.i.d. uniform$(0,1)$ rv's. Then the integral can be written as $$I_m = {\rm E}\bigg(\sqrt {U_1^2 + \cdots + U_m^2 } \bigg) = \sqrt m {\rm E}\bigg(\sqrt {\frac{{U_1^2 + \cdots + U_m^2 }}{m}}\bigg ).$$ Since ${\rm E}(U_1^2)=1/3$, the strong law of large numbers suggests that $$I_m \sim \sqrt {\frac{m}{3}}.$$ This agrees with the upper bound of $\sqrt {m/3}$ obtained from $${\rm E}\bigg(\sqrt {U_1^2 + \cdots + U_m^2 } \bigg) < \sqrt {{\rm E}(U_1^2 + \cdots + U_m^2 )} = \sqrt {\frac{m}{3}}.$$

-