How to derive the distribution of an orthogonal projection of a degenerate random vector representing a circle?

44 Views Asked by At

I am studying to develop an ability to derive distributions of transformations of random variables, especially when the dimension of the input doesn't equal the output dimension of change of variables. Wikipedia gives this description for a mapping $V:\mathbb{R}^n \mapsto \mathbb{R}$:

Let $V:\mathbb{R}^n \mapsto \mathbb{R}$ be a differentiable function and $X$ be a random vector taking values in $\mathbb{R}^n$, $f_X$ be the probability density function of $X$ and $\delta (\cdot)$ be the Dirac delta function. It is possible to use the formulas above to determine $f_Y$, the probability density function of $Y=V(X)$, which will be given by $$f_Y(y) = \int_{\mathbb{R}^n}f_X(\mathbf{x}) \delta (y - V(\mathbf{x}))d\mathbf{x}.$$

I want to explore the case of having a degenerate random vector and derive the density of the 1-dimensional output by simply dropping variables. Suppose we have $$\mathbf{x}(t) = \begin{bmatrix} \cos t \\ \sin t \end{bmatrix}$$ with density $$f_X(\mathbf{x}) = \delta (\cos t) \delta (\sin t)$$ and $$V(\mathbf{x}(t)) = \cos t$$ then $$d\mathbf{x} = d(\cos t) d(\sin t) = - \sin t \cos t\ dt\ dt$$ and (with some simplification done by SymPy) we have

$$f_Y(y) = - 2 \pi \int\limits_{0}^{2 \pi} \sin{\left(t \right)} \cos{\left(t \right)} \delta\left(y - \cos{\left(t \right)}\right) \delta\left(\sin{\left(t \right)}\right) \delta\left(\cos{\left(t \right)}\right)\ dt.$$

Neither I, SymPy, or Wolfram alpha can solve this integral. It has occurred to me that $V$ is an orthogonal projection, but I don't know if knowing that helps any. I'm not even completely sure that the answer is actually a density function, but it looks like it could be:

import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns

t = np.arange(0, 2*np.pi, 1/10**4)
x, y = np.cos(t), np.sin(t)

sns.jointplot(x=x, y=y, s=1)
plt.show()

enter image description here

Is there a way to proceed with deriving the distribution in this example?


SymPy code:

import sympy as sp

t = sp.Symbol('t', real=True)
y = sp.Symbol('y', real=True)

fx = sp.DiracDelta(sp.cos(t)) * sp.DiracDelta(sp.sin(t))
q = sp.DiracDelta(y - sp.cos(t))
dx = sp.diff(sp.cos(t)) * sp.diff(sp.sin(t))


I = sp.integrate(sp.integrate(fx * q * dx, (t, 0, 2 * sp.pi)), (t, 0, 2 * sp.pi))


This is what the contour plot of the integrand looks like according to Wolfram Alpha:

enter image description here

enter image description here