From the exploration on : Uniforms in a Ball, it could be interesting to derive a general formula for the volume of the n-ball. There are plenty of methods readily available online; one which however is of great curiosity is when we derive this volume from the properties of the Dirichlet distribution, establishing and elegant link between geometry and probability. The Dirichlet distribution is an extension into various dimensions of the Beta distribution. In Bayesian statistics, the Beta is a reasonable prior when we want to study a proportion, if there are multiple proportions to study, the Dirichlet comes in handy.

NOTE: This section is simply me rewriting my lecture notes from a mathematical statistics class taught at the University of Toronto by Professor David Brenner.

Lets quickly go over the Gamma distribution and how it relates to the Beta distribution. Say:

$$

X \sim Gamma(\alpha , \beta) \text{ then } f_{X}(x) = \frac{\beta ^ \alpha}{\Gamma (\alpha)}x^{\alpha -1} e^{-\beta x}

$$

with:

$$

\Gamma(\alpha) = \int_{0}^{\infty}t^{\alpha -1} e^{-t}dt

$$

and say:

$$

Z \sim Beta(\alpha , \beta) \text{ then } f_Z(z) = \frac{\Gamma (\alpha + \beta)}{\Gamma (\alpha) \Gamma (\beta)} z^{\alpha -1} (1-z)^{\beta -1}.

$$

Is there any way to construct a beta distribution out of gamma distributions? We will find that there is indeed a way, and from there we can generalize the Beta to the Dirichlet. Say we have \(X \sim Gamma(\alpha , 1)\) and \(Y \sim Gamma (\beta , 1)\) where \(X\) and \(Y\) are independent. We can therefore obtain the joint distribution of \(X\) and \(Y\) which is :

$$

f_{X,Y}(x,y) = \frac{1}{\Gamma(\alpha) \Gamma(\beta)} x^{\alpha -1} y^{\beta -1} e^{-(x+y)}.

$$

There seems to be a resemblance between this expression and the Beta distribution, in fact defining \(Z = \frac{X}{X+Y}\) and \(V = X + Y\), we obtain the joint distribution (using change of variables)

$$f_{Z , V}(z , v) = \frac{\Gamma (\alpha + \beta)}{\Gamma (\alpha) \Gamma (\beta)} z^{\alpha -1} (1-z)^{\beta -1} \frac{1}{\Gamma(\alpha + \beta)} v^{\alpha + \beta -1} e^{-v}.

$$

Here we notice that \(Z\) is independent from \(V\) given their joint distribution is separable and we find that:

$$

Z \sim Beta(\alpha , \beta).

$$

Allowing us to conclude that given \(X \sim Gamma(\alpha)\) and \(Y \sim Gamma(\beta)\), \(\frac{X}{X + Y} \sim Beta(\alpha , \beta)\).

From here we can make an extension to Dirichlet. Take \(X_i \sim (p_i), \forall i \in {1 , \cdots , n+1}\), denote \(\boldsymbol{X} = (X_1 ,\cdots , X_n)’\) and \(T = \sum_{i = 1}^{n+1}X_i\) then \(\boldsymbol{U} \sim D_n(p_1 , \cdots , p_n ; p_{n+1})\) and \(\boldsymbol{U} \stackrel{\text{d}}{=} \boldsymbol{X}/ T\) and from a similar argument as for the Gamma and Beta case, we can find that \(\boldsymbol{U}\) and \(T\) are independent, I would like to stress one point which I think is worth pointing out: the distribution \(\boldsymbol{X}/T\) is independent of its denominator, which is certainly a very unique property!

The support for the Beta distribution is \([0,1]\) and similarly for the Dirichlet, each coordinate can be at most 1, hence the support is the n-dimensional simplex \(T^n\), that is:

$$

T^n = \{ \boldsymbol{u} \in \mathbb{R} | \boldsymbol{u} > 0 , \boldsymbol{1′} \boldsymbol{u} <1\}

$$

The Dirichlet distribution can be expressed on its support as :

$$

f_U(u) = \frac{\Gamma (\sum_{i=1}^{n+1} p_i)}{\prod_{i=1}^{n+1} \Gamma (p_i)} \prod_{i=1}^{n}u_i^{p_i -1}(1-\sum_1^n u_i)^{p_{n+1} -1}

$$

The method to obtain this is similar as to the one in one variable.

Now back to things that relate to uniforms! The Dirichlet allows us to define distributions on the simplex, but how does this relate to the ball?

$$

\boldsymbol{X} \sim unif(B^n) \Leftrightarrow \text{ for $A \subset B^n$ }P(\boldsymbol{X} \in A) = \frac{vol(A)}{vol(B^n)}

$$

It is therefore important for us to be able to evaluate \(vol(B^n)\) We will notice something interesting, for some point in \(B^n\) its square is in \(T^n\), perhaps we can therefore find a link between the uniform on a ball, and the Dirichlet. Take \(\boldsymbol{X} \sim unif(B^n)\) and \(Y_i = X_i^2\), we can then obtain:

$$

P(\boldsymbol{Y} \leq \boldsymbol{t}) = P(\boldsymbol{X} \in [- \boldsymbol{t}^2 , \boldsymbol{t}^2]).

$$

The subset we are evaluating is a rectangle, hence we have :

$$

F_{\boldsymbol{Y}}(\boldsymbol{t}) = \frac{2^n \prod^n_1 t_i^{1/2}}{vol(B^n)}.

$$

Now we get the distribution:

$$

f_{\boldsymbol{Y}}(\boldsymbol{t}) = \frac{\prod_1^n t_i^{1/2 – 1}}{vol(B^n)},

$$

which is Dirichlet with \(p_i = 1/2\) for \(i \in [1 , \cdots , n]\) and \(p_{n+1} = 1\), noting that \(vol(B^n)\) is simply the normalizing constant for the distribution. We immediately get:

$$

vol(B^n) = \frac{\Gamma (1/2)^n}{\Gamma (n/2 +1)} = \frac{2 \pi^{n/2}}{n\Gamma(n/2)}.

$$

We see that as we take the limit of \(vol(B^n)\) goes to 0 as \(n\) goes to infinity! This confirms our intuition developed in the previous section!