Normalizing continuous bivariate densities via the shell method

$\newcommand{\x}{\mathbf x}$
In this post I’m going to dust off the shell method from first semester calculus and use it to normalize a particular class of probability densities.

Consider a continuous probability density $f(\x)$ over $\mathbb R^p$ with the property that $f(\x) = g(\|\x\|_2)$ for some function $g : [0,\infty) \to [0,\infty)$. In other words, the density at a point $\x$ depends only on the distance of that point from the origin as measured by $\|\cdot\|_2$.

Think about a level set of $f$: for some $c\in\mathbb R$, this is the set
$$
L_f(c) = \{\x \in \mathbb R^p : f(\x) = c\}.
$$
I can also think of the level sets of $g$ via
$$
L_g(c) = \{r \geq 0 : g(r) = c\}.
$$
Now suppose that $r \in L_g(c)$. This means that for any $\x$ with $\|\x\|_2 = r$ I’ll have $f(\x) = g(r) = c$, so $\x \in L_f(c)$. In other words, for every point $r \in L_g(c)$ I have a corresponding circle in $L_f(c)$ given by $\{\x : \|\x\|_2 = r\}$.

Furthermore, suppose $\x \in L_f(c)$. Then by $f(\x) = g(\|\x\|_2)$ I know $\x’ \in L_f(c)$ for any other $\x’ \in \mathbb R^p$ with $\|\x’\|_2 = \|\x\|_2$. Thus a point $\x$ appears in $L_f(c)$ if and only if it is in a circle with radius in $L_g(c)$, so $L_f(c)$ is a union of concentric circles. If $g$ is injective then there will be at most one circle for any $c$ under consideration.

So what’s the point of this? Fixing $p=2$ now, if I have such a distribution $f$ then I can appeal to this rotational symmetry to find the total volume under $f$ by a $1$-dimensional integral in $g$ instead. I’ll do that via the shell method.

Result:

$$
V := \iint f(x,y)\,\text dx \,\text dy = 2\pi \int_0^\infty r g(r)\,\text dr
$$
where that second integral is the result of using the shell method to revolve the area under $g$ around the $y$ axis. In the case of $f$ being a density $V=1$ but that doesn’t actually matter for this.

Pf: by my assumption that $f(\x) = g(\|\x\|_2)$ I can write
$$
V = \iint g\left(\sqrt{x^2 + y^2}\right)\,\text dx \,\text dy.
$$
Converting to polar coordinates via $x = r\cos \theta$ and $y = r\sin \theta$ I have
$$
V = \int_0^\infty \int_0^{2\pi} g(r) r\,\text dr \\
= 2\pi \int_0^\infty rg(r)\,\text dr
$$
as desired.

$\square$

First example: finding the normalization constant for the Gaussian kernel $k(x,y) = \exp\left(-(x^2+y^2)/2\right)$. Note that $k$ can be written as
$$
k(x,y) = g\left(\sqrt{x^2+y^2}\right)
$$
where
$$
g(r) = e^{-r^2/2}
$$
so if I rotate this $g$ around the $y$ axis, I’ll get the volume under $k$. Thus
$$
V = \iint k(x,y)\,\text dx\,\text dy = 2\pi\int_0^\infty re^{-r^2/2}\,\text dr.
$$
Substituting $t = r^2/2$ so $\text dt = r\,\text dr$ I get
$$
V = 2\pi \int_0^\infty e^{-t}\,\text dt = 2\pi
$$
which is exactly what I’m hoping to find. The more common proof of this for the univariate case of this is to square and convert to polar coordinates, but it turns out that the success of that only requires the $f(\x) = g(\|\x\|_2)$ property so I was able to prove that it works in a more general setting and then immediately apply that result here.

In general the distributions that this works for are exactly those with circular contours, which are special cases of elliptical distributions (and one relates to the other via the change of variables $\mathbf z = \Sigma^{-1/2}(\x – \mu)$).

Second example: suppose $\x$ has a multivariate $t$ distribution with $\mu = \mathbf 0$ and $\Sigma = I$ so
$$
f(\x) \propto \left[1 + \frac 1\nu \x^T\x\right]^{-(\nu + p)/2}
$$
which means
$$
g(r) = \left[1 + \frac 1\nu r^2\right]^{-(\nu + p)/2}
$$
will do the trick.

The correct normalizing constant is
$$
\frac{\Gamma\left[(\nu + p)/2\right]}{\Gamma(\nu/2)\nu^{p/2}\pi^{p/2}}
$$
so that’s what I’ll be trying to recover. Since I’m using $p=2$ this’ll simplify considerably to
$$
\frac{\Gamma\left[(\nu + p)/2\right]}{\Gamma(\nu/2)\nu^{p/2}\pi^{p/2}} = \frac{\Gamma\left[\nu/2 + 1\right]}{\Gamma(\nu/2)\nu\pi} \\
= \frac{\nu}{2} \cdot \frac{\Gamma(\nu/2)}{\Gamma(\nu/2) \nu \pi} = \frac{1}{2\pi}
$$
so actually I’m just hoping to find that the volume is $2\pi$.

Applying the shell method:
$$
V = 2\pi \int_0^\infty r (1 + r^2/\nu)^{-1 – \nu/2} \,\text dr
$$
so let $t = 1 + r^2 / \nu$ so $\nu \,\text dt = 2r\,\text dr$ and
$$
V = \nu\pi \int_1^\infty t^{-1 – \nu/2}\,\text dt \\
= \nu\pi \left(-\frac 2 \nu t^{-\nu/2}\bigg\vert_1^\infty\right) \\
= 2\pi
$$
as desired.

To conclude, here’s a non-example. Suppose $X, Y \stackrel{\text{iid}}\sim \text{Laplace}(0,1)$ so
$$
f_X(x) \propto e^{-|x|}
$$
and identically for $f_Y$.

I want to normalize $f$ where by independence
$$
f(x,y) \propto \exp(-|x| – |y|).
$$
But what are the level sets here? Note that I can write
$$
f(\x) = g(\|\x\|_1)
$$
but not in terms of $\|\x\|_2$, so the level sets are formed by concentric diamonds, not circles, and this means that $f$ cannot be built out of cylindrical shells.

Leave a Reply

Your email address will not be published. Required fields are marked *