# The Image of a Distribution

· mathematics
Authors

Imagine a well defined distribution of random numbers. Now take the square root of each number pulled from that distribution. The square roots will have a different distribution. What is it?

Sometimes, when one is making a mathematical model or simulation of a physical system, one wants to do as much as possible analytically, usually by writing out some calculus on paper. This means that one wants to do as little as possible of the problem numerically. The reason might be that the simulation would run too slowly if the computer code were written in a simple-minded way. Or that the simple-minded code has grown hard to understand, and a serious analysis of the system might reveal a simplification of the model. Or that one is curious and wants to understand the model at the deepest possible level. Or some combination of the above.

In any event, while engaging in a mathematical analysis of a system, I have often come across an interesting problem whose solution I’ve not seen written down anywhere. (Perhaps because I’ve not looked hard enough for it.) The generic version of the problem is that I know the probability distribution for some quantity, but what I want to know is the probability distribution for the value of a complex expression that contains the quantity.

The answer boils down to evaluating this:

$p_B(b) = \int_A p_A(a) \, \delta( f(a) - b ) \, \text{d}a$,

where $p_A(a)$ is the known probability density for $a \in A$; where $f(a)$ is the complex expression containing the quantity whose distribution is known; and where $\delta$ is the Dirac delta. The result is the desired distribution function over the value of the expression.

I’ve written up a little article with details and some examples. One may also fetch the source code.