0

I am working on a problem in probability theory and need to define the determinant of a Jacobian of a variable transform; i.e.,

$$ p(x) = p(y) \left|\frac{\partial y}{\partial x}\right|. $$

My input has been specified as $(x, y, z)$ coordinates, but they are constrained to lie on the surface of the unit sphere. My intuition says to map these variables onto two spherical coordinate angles $(\theta, \phi)$, since the radius is known to be 1. However, now I've transformed three variables into two, and so the Jacobian of the transformation is naively rectangular, which wouldn't even have a determinant. Yet I can't straightforwardly drop a variable, since just knowing that $x^2 + y^2 + z^2 = 1$ isn't enough to reconstruct, for example, $z$ given just $x$ and $y$ — I could only reconstruct $z^2$, and then I've lost information about the sign of $z$.

Is there a typical way of handling this situation, or have I misunderstood? Any help appreciated.

More detail

A couple of people have asked for more info. I'll post what I can. I'm doing density estimation on some scattered data, which were given to me in terms of $(x, y, z)$ coordinates and some other variables (which aren't important for this spatial transform I'm trying to do). Since my data are constrained to be on the surface of a sphere, I know I can transform $(x, y, z) \rightarrow (\theta, \phi)$ uniquely. But any density estimate I get — let's call it $p(\theta, \phi)$ — needs to be transformed back to $p(x, y, z)$ to be useful for this application.

My confusion is that, given the transformation of variables formula for probabilities, it doesn't seem valid to transform three variables into two, even if the mapping is unique, because I need $\det J$, where $J$ is the Jacobian, to transform my probabilities correctly.

To make this more concrete, I propose the mapping

$$ \theta = \arctan \frac{\sqrt{x^2 + y^2}}{z} $$

$$ \phi = \arctan \frac{y}{x} $$.

$$ J = \begin{pmatrix} \frac{\partial \theta}{\partial x} & \frac{\partial \theta}{\partial y} & \frac{\partial \theta}{\partial z} \\ \frac{\partial \phi}{\partial x} & \frac{\partial \phi}{\partial y} & \frac{\partial \phi}{\partial z} \end{pmatrix} = \begin{pmatrix} \frac{x z}{\sqrt{x^2+y^2}} & \frac{y z}{\sqrt{x^2+y^2}} & -\sqrt{x^2+y^2} \\ -\frac{y}{x^2+y^2} & \frac{x}{x^2+y^2} & 0 \end{pmatrix} $$

But this Jacobian is rectangular and therefore has no determinant! This is where I get stuck. Even if I derive a density in terms of these angular variables, there's no way to "go back" to the Cartesian ones that I need if I use the formula above.

emprice
  • 179
  • It depends on what kind of integral you want to calculate. If you need to know the volume of surface of a sphere it's actually zero). Please, give the full task or clarify yours – Eugene Sirkiza Jul 01 '19 at 15:06
  • @EugeneSirkiza, thanks for the comment. I'm not doing an integral at all, though -- I really just want to know the transformed probability in the $(\theta, \phi)$ space, given that my inputs have probability $p(x, y, z)$. – emprice Jul 01 '19 at 15:25
  • I don't really get it( Probability is just a measure. If you need to find probability in space $(\theta, \phi)$ for ANY $r$ you need to integrate $p(x, y, z)$ by $r$ from $-\ infty $ to $\infty$. but for a specific radius value, the probability is zero. The probability that a point hits the surface of the sphere is zero. Probably, I misunderstood you. But in your question Jacobian isn't undefined. It is actually equals to zero, because radius is constant. – Eugene Sirkiza Jul 01 '19 at 15:49
  • Can you post your Jacobian and also maybe a statement of the problem? I'm having trouble understanding what you're actually trying to do. – Zach Favakeh Jul 01 '19 at 15:55
  • @zachistician I've posted more detail as you suggested. Please let me know if it isn't clear. – emprice Jul 01 '19 at 16:16
  • Thanks for updating. First of all, I think mapping to two variables is not a bad idea. These points are constrained at R=1 and basically only cover a 2-d surface of a sphere anyway, so using 2 angular dimensions should provide a unique transformation both ways. Secondly, can you not construct a transformation matrix to go from the angles to cartesian coordinates? Using the inverses of the two equations already provided. – Zach Favakeh Jul 01 '19 at 16:29
  • What if you took the square root of the determinant of JTJ (J transpose J)? Would that be a useful approximation in this case? Found the idea here: https://math.stackexchange.com/questions/854180/determinant-of-a-non-square-matrix – Zach Favakeh Jul 01 '19 at 16:37

2 Answers2

1

If your variables are supported on the surface of a sphere, then there does not exist a density function on $\mathbb R^3$ for their (joint) probability distribution. This is for the same reason that the delta function is not a function!

One way to resolve this confusion is using a bit of (very basic) measure theory, which allows you to work with probability distributions on $\mathbb R^3$ which do not have densities, for instance the uniform measure on the sphere of radius $1$. Using the measure-theoretic terminology, a probability distribution has a density if and only if it is absolutely continuous with respect to Lebesgue measure. In particular, this property implies that the support of the distribution is $3$-dimensional. Since your support is not $3$-dimensional, it therefore cannot come from a probability density on $\mathbb R^3$.

pre-kidney
  • 30,223
  • Thanks for the answer. Unfortunately, I'm not sure we're talking about the same problem here. I'm not doing a density estimation in $\mathbb{R}^3$, but rather on the surface of the sphere itself. This is certainly possible to do. I'm picturing, for example, a spherical surface with high density at, say, the poles, low density at the equator; the densities are just defined on the surface, and it doesn't matter that the surface happens to live in $\mathbb{R}^3$. – emprice Jul 02 '19 at 20:26
  • @emprice then you are using standard terminology in a non-standard way... and should include what precisely you mean by the "density" in this case. (By the way, I do believe we are talking about the same problem, and as you attempt to clarify it more precisely my comments will make more sense to you) – pre-kidney Jul 04 '19 at 19:51
  • @pre-kidney Great! Could you give a reference which presents the proof details? In multivariate statistics, we know that if $x$ has a density, then any marginal distribution of $x$ has a density. However, the fact that any marginal distribution of $x$ has a density can not guarantee the density existence of $x$; uniform distribution in the surface of the unit is such a case (counterexample), but I don't know how to proof it in details? – John Stone Mar 09 '23 at 03:53
1

You are right in that using a 3-dimensional Jacobian makes little sense. Your data is 2-dimensional, except that it can be embedded in 3-dimensions. In other words, you are working with surface-measures.

In your situation, you can have transformations from a 2-dimensional space (at least locally) into your spherical surface. For instance, a typical map would be

$$ (\theta, \phi) = \omega\left(x,y\right) = \left(\arccos(1-x^2-y^2), \arctan(y/x)\right),$$ and another one could be $$ \mathbf{p}(u, v) = \left[\sqrt{u}\cos(2\pi v),\sqrt{u}\sin(2\pi v),\sqrt{1-u}\right],$$ where I have described the result in $\mathbb{R}^3$, but you can prove that it actually maps to the unit sphere $\mathbb{S}^2$.

In both cases, we map from a region of $\mathbb{R}^2$ into $\mathbb{S}^2$. Now, the Jacobian measures the change of a differential surface-area in the input to the output: $$ J = \frac{d\Omega}{dA},$$ where $dA$ denotes a small area around the input parameter space $\mathbb{R}^2$, and $d\Omega$ denotes the spherical area (in steradians) around the output position.

Be careful with the measure on $\mathbb{S}^2$: $$ d\Omega = \sin\theta\cdot d\theta\;d\phi = -d(\cos\theta)\;d\phi.$$

As an example, to calculate the Jacobian of the second example, we could get back into polar-azimuth form by equating: $$ \sin\theta \cos\phi = \sqrt{u}\cos(2\pi v) $$ $$ \sin\theta \sin\phi = \sqrt{u}\sin(2\pi v) $$ $$ \cos\theta = \sqrt{1-u} $$ to see that $$ \theta = \arccos\sqrt{1-u}, \, \phi=2\pi v$$ and therefore $$ d\Omega = -d(\cos\theta)\;d\phi = -\frac{-1}{2\sqrt{1-u}}du\cdot\left(2\pi\cdot dv\right) = \frac{\pi}{\sqrt{1-u}} du\;dv. $$ So the Jacobian is $$ J = \frac{\pi}{\sqrt{1-u}}.$$

A useful tool when working with polar-azimuthal coordinates isn't that convenient is to use: $$ J = \left\| \frac{\partial F}{\partial u} \times \frac{\partial F}{\partial v} \right\|,$$ where $F$ is a map from the parameter space $(u, v)$ into $\mathbb{R}^3$.

To wit: $$\partial_u\mathbf{p} = \left[\frac{1}{2\sqrt{u}}\cos(2\pi v), \frac{1}{2\sqrt{u}}\sin(2\pi v),-\frac{1}{2\sqrt{1-u}}\right],$$

$$\partial_v\mathbf{p} = \left[-2\pi\sqrt{u}\sin(2\pi v), 2\pi\sqrt{u}\cos(2\pi v),0\right],$$ $$\partial_u\mathbf{p}\times\partial_v\mathbf{p} = \left[ \pi\frac{\sqrt{u}}{\sqrt{1-u}}\cos(2\pi v), \pi\frac{\sqrt{u}}{\sqrt{1-u}}\sin(2\pi v), \pi \right],$$ and $$ J = \left\|\partial_u\mathbf{p}\times\partial_v\mathbf{p}\right\| = \pi\cdot\sqrt{\frac{u}{1-u}+1} = \frac{\pi}{\sqrt{1-u}}.$$