[Math] Converting a probability function from Polar coordinates to Cartesian coordinates

polar coordinates

I am confused about converting a Probability Density Function from Polar coordinates to Cartesian coordinates.

Here is an example:

In Polar coordinates, we can have a Gaussian probability function:

$P(r,\theta)=Ae^{-r^2/2\sigma^2}$ according to the transformation:
$r^2=x^2+y^2 \textrm{ and }
\theta=\tan^{-1}(y/x)$
.

This function in Cartesian coordinates should also be a Gaussian function:

$P(x,y)=Ae^{-(x^2+y^2)/2\sigma^2}$

But somebody told me that in this transformation, I should multiply by the absolute value of the Jacobian determinate in order to have:

$P(x,y)=Ae^{-(x^2+y^2)/2\sigma^2}/\sqrt{x^2+y^2}$

And the result is not Gaussian anymore!

Could someone tell me which one is correct and also the reason, please?

Best Answer

UPDATE

If your function in polar coordinates is a circularly symmetric Gaussian centered at the origin, then it could be written $P_{r\, \theta}(r,\theta)=A\,r\,e^{-r^2/2\sigma^2}$ and you can obtain $A$ from

$$\int_0^{2\pi} \int_0^\infty P_{r\, \theta}(r,\theta) \,dr\, d\theta = 1.$$

Integration yields: $\displaystyle A = \frac{1}{2 \pi \sigma^2}$.

The Jacobian of the transformation is $$J(x,y)=\begin{vmatrix}\cos \theta& -r \sin \theta \\ \sin \theta &r\cos \theta \end{vmatrix}={r}. $$ so that (see text referenced in the comments below)

$$P_{x\, y}(x,y)= \frac{P_{r,\,\theta}(r,\theta)}{|J(x,y)|}=\frac{1}{r}P_{r,\, \theta}\left(\sqrt{x^2+y^2},\tan^{-1} \frac{y}{x}\right).$$

Thus $$\displaystyle P_{x\, y}(x,y) = \frac{1}{2\pi \sigma^2} e^\frac{-(x^2 + y^2)}{2\sigma^2}.$$