/ 9 min read

# Volume Forms and Probability Density Functions Under Change of Variables

Suppose we have ** coordinates**; the latter represents a point in

Here are some interesting objects to study in this setting.

## Riemannian Metrics

In

The matrix ** Riemannian metric**.
In the case of the Euclidean inner product, we have

## Volume Forms

Another interesting object is the *volume form*

The Riemannian metric

called the ** Riemannian volume form**.
In the case of

*the*natural volume form for any choice of metric and any manifold in general. Indeed, technically speaking, it is the unique volume form that evaluates to one on parallelepipeds spanned by orthonormal basis vectors.

## Volume Forms and Measures

A non-negative volume form

Suppose we have a probability measure (with support

Another way to define

Then it’s clear that we can take any volume form as the reference measure, not just

which is a pdf under

i.e., it integrates to one under

## Change of Variables

Now, assume that we have another coordinates for

Here are some rules for transforming a metric and a volume form.

If

is the matrix representation of the same metric in

Now, if

is the same volume form in

As a consequence, integrals are also invariant under a change of coordinates:

where

## Pdfs Under Change of Variables

From elementary probability theory, we have the transformation of a pdf

and this is known to be problematic because of the additional Jacobian-determinant term.

For instance, the mode *Maximum a posterior* (MAP) estimation, which is the standard estimation method for neural networks is thus pathological since an arbitrary reparametrization/change of variables will yield a different MAP estimate, see e.g. [1, Sec. 5.2.1.4]
Or are they?

The reason for the above transformation rule between

However, as we have seen before,

This leads to a very straightforward solution to the non-invariance problem.
Simply transform

## Riemannian Pdfs Under Change of Variables

What about a Riemannian pdf

This seems problematic since now we have the Jacobian determinant term again, just like the “incorrect” transformation of pdf in the previous section.
It actually is!
Just look at the following integral that attempts to show that

We now don’t have the

This is actually because there is a Jacobian-determinant term that we forget about because we don’t see things as a whole.
The complete way to see a pdf is in terms of the Radon-Nikodym derivative.
So, let’s see, in

Now in

The key is to view

Compare this to before: we now don’t have the Jacobian-determinant term! Performing the integration as before:

And therefore, we have shown that

## Conclusion

Two take-aways from this post.
First, be aware of the correct transformation of objects.
In particular, for a volume form

Second, it’s best to see things as a whole to avoid confusion. For pdfs, write them holistically as Radon-Nikodym derivatives. Then, the correct transformations can easily be applied without confusion.

## References

- Murphy, Kevin P. Machine learning: a probabilistic perspective. MIT Press, 2012.
- Lee, John M. Introduction to Smooth Manifolds. 2003.