We consider a random vector $\vec{v} = \left(x_{1}, x_{2}, \dots, x_{n}\right)$ built from $n$ real random variables drawn from a real continuous uniform distribution $\mathcal{U\left(a, b\right)}$, $a$ and $b$ being the same for all $x_{i}$.

What is the distribution $D$ of the $L^{2}$-norm of such random vectors $\vec{v}$: $\left\lVert\vec{v}\right\rVert_{2} = \sqrt{x_{1}^{2}+x_{2}^{2}+\dots+x_{n}^{2}}$?

In other words, what is the analytical expression of the distribution obtained through this numerical experiment:

# Packages
import numpy as np
import random as rd
import matplotlib.pyplot as plt

# Parameters
a = 5
b = 20
n = 10
count = 100000

# Compute a random norm
def random_norm(a, b, n):
    v = [rd.uniform(a, b) for i in range(0, n)]
    return sum([x ** 2 for x in v]) ** (1./2.)

# Generate random vectors and compute their norm
norms = [random_norm(a, b, n) for i in range(0, count)]

# Plot the resulting distribution
plt.hist(norms, 100)
  • 2
    $\begingroup$ Here is an answer for the distribution of a single squared uniform: math.stackexchange.com/questions/305997/… I would be surprised if there were a neat expression for the square root of their sum. $\endgroup$ – Christoph Hanck Feb 8 at 10:42
  • 1
    $\begingroup$ For the (simpler, special) case $a=0,$ the distribution of the sum of uniforms is derived and described at stats.stackexchange.com/questions/41467/…. Your case generalizes this a little, but the same complexities apply: in particular, when $a\ge 0,$ the distribution can be described only in a piecewise fashion with $n+2$ components; when $a\lt 0,$ it might get even more complicated. $\endgroup$ – whuber Feb 8 at 12:53
  • $\begingroup$ This is a generalization of stats.stackexchange.com/questions/317095/… which do have an answer $\endgroup$ – kjetil b halvorsen Feb 9 at 17:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.