1
$\begingroup$

Let's say we have a probability distribution in x,y space:

$$ p(x, y)=\frac{1}{4 \pi} \sqrt{x^2+y^2} \exp \left(- \sqrt{x^2+y^2}\right) $$

This can be converted into polar coordinates as:

$$ p(r, \theta)=\frac{1}{4\pi} r^2 \exp (-r), r\geq0 $$

Now let's say we want to know the most probable distance from the centre, that is r = argmax p. This can be done in two ways.

  1. We differentiate $p(r,\theta)$ with respect to $r$, and solve for $$ \frac{\partial p(r, \theta)}{\partial r} = 0 $$ this gives $r=2$

  2. We rewrite $p(x,y)$ as

$$ p(x, y)=\frac{1}{4 \pi} r \exp \left(-r\right) $$

Then solving $ \frac{\partial p(x, y)}{\partial r} = 0 $ instead gives $r=1$.

This yields two different answers -- even though they should refer to the same quantity (the most probable distance from the centre).

Questions are -- which is correct? and why? and if both are correct then how do we face this contradiction?

Related questions seem to be on bayesian inference so I included those tags -- though my question is on generic distributions.

$\endgroup$
9
  • 3
    $\begingroup$ Your maximum is the mode. The change of coordinates involves a Jacobian, so there is no reason to expect the same mode! $\endgroup$ Mar 14 at 22:19
  • $\begingroup$ Many thanks for the quick answer! -- this mathematically makes sense but I find it difficult to wrap around it physically. If this were to be a physical problem, say, finding the most likely distance an arrow is away from the target, then why /should/ we expect different answers in different coordinate systems? $\endgroup$
    – aifom329j2
    Mar 14 at 22:22
  • 4
    $\begingroup$ You ought to expect the answer to depend on the coordinate system because you seek a modal density. When you stretch out the coordinates, the density decreases; and when you compress the coordinates, it increases. That's why the uniform density in Cartesian coordinates $\mathrm dx\mathrm dy$ must be expressed by a highly non-uniform function $r\mathrm d\theta\mathrm dr$ in polar coordinates. $\endgroup$
    – whuber
    Mar 14 at 22:36
  • 1
    $\begingroup$ Re: physical intuition: If someone translates the dart board to the left, expect the density of the thrown darts to adjust accordingly. ;-) $\endgroup$
    – Galen
    Mar 14 at 23:06
  • 1
    $\begingroup$ Re: Galen's point. I’m not sure if I understand your point. If someone translates the board to the left, I'd expect the mode (and the distribution) to shift to the left equivariantly. In this case mathematically the coordinate transformation would be affine. However in my case of confusion it’s the same board at the same place — just looking at it in different coordinate systems, so that doesn’t sound to me that it should map to different physical points. $\endgroup$
    – aifom329j2
    Mar 14 at 23:23

1 Answer 1

1
$\begingroup$

I wrote some R code to help visualize this function, it is a very pretty surface.

library(plotly)

x = seq(from = -3, to = 3, by = .2)
y = x
A = matrix(NA,nrow=length(x),ncol=length(y))
for(i in 1:length(x)){
  for(j in 1:length(y)){
    A[i,j] = sqrt(x[i]^2+y[j]^2)*exp(-sqrt(x[i]^2 + y[j]^2))
  }
}


plot_ly(x=x,y=y,z=A)%>%add_surface()

Here is the picture that you get, enter image description here

As you can see, the highest value of the PDF occurs on the ring where $r=1$. One should be a little careful and call this the ``most likely'' region, as opposed to "most probable", as the probability is technically zero at all points.

You wrote that, $$ p(r,\theta) = (\text{constant})\times r^2\exp\big( -r \big) $$ Where does the $r^2$ come from? When you convert to polar coordinates you replace $x^2+y^2$ by $r^2$. Perhaps, you multiplied by an extra factor of $r$? You only do this multiplication when you replace $dx ~ dy$ by $r ~ dr ~ d\theta$. However, this is not an integration problem, and so you do the usual substitution.

If you wrote it instead as, $$ p(r,\theta) = (\text{constant})\times r\exp\big( -r \big) $$ Then the maximum is achieved exactly at $r=1$. Which we can check with WolframAlpha, enter image description here

You can see from the R picture that the maximum value of the PDF is approximately $0.36$, the mathematical perfect answer is $\frac{1}{e}$, which agrees with your calculus calculation.

$\endgroup$
1
  • $\begingroup$ Thanks for your input -- I believe that the extra r came from the jacobian as probability distribution changes coordinates. the r dr d(theta) should appear implicitly in the change (unless I understand the maths really incorrectly) $\endgroup$
    – aifom329j2
    Mar 17 at 4:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.