On the pdf of a modified distribution

144 Views Asked by At

enter image description here

We have the intersection of two equal circles in the figure on the left. A number of random points are uniformly distributed between UQWD and the pdf is given as $f(r)= \frac{l(r)}{A}$. On the right of this diagram a number of random points are also uniformly distributed (not in the intersection of two circles as the first but) within a circle of radius $R$. The pdf is given as $\frac{2r}{R^2}$. Now we are given a modified distribution in case 2 for the distributed points within the circle and we would like to determine the pdf in the context of the area between two intersecting circles. This is not a homework but is a practical problem.

As hinted by @Lee David Chung Lin in the comments, the modified distribution can be described as a truncated Rayleigh distribution.

2

There are 2 best solutions below

10
On BEST ANSWER

I shall assume your Rayleigh distribution (which is a radial density with rotational symmetry) is meant to have the following form where the variance (for the underlying Gaussian) is $\sigma^2 = \frac1{\lambda \pi}$: $$f_r(r) = K_1 \cdot \lambda \pi r e^{- \dfrac{\lambda \pi r^2}2 } \, , \qquad \text{where} ~~K_1 \equiv \Bigl(1 - \lambda \pi r e^{- \dfrac{\lambda \pi R^2}2 } \Bigr)^{-1}$$

Accordingly, the conditional radial density in $\Omega \equiv \text{UQWD region}$ takes the form

$$f_{r|\Omega} = \frac{ L(r) }K \, , \qquad \text{where}~~L(r) = 2\cos^{-1}\bigl(\frac{r}{2R}\bigr) \cdot K_1 \cdot \lambda \pi r e^{- \dfrac{\lambda \pi r^2}2 }$$

and $K$ is the total probability mass of $\Omega$.

Indeed, the functional form of the density $L(r)$ can be obtained by simply multiplying $2\cos^{-1}\bigl(\frac{r}{2R}\bigr)$ to whatever the radial density that is given (the factor of 2 is just due to reflective symmetry). So if you were wondering whether one can take this "shortcut" by translating what is seen in the uniform case, then the answer is yes.

The derivation of this fact is easy and requires only some elementary analytic geometry and the basics of joint density. Let me know if you need that.

However, the total mass of $\Omega$ requires actually calculating the integral

$$K = 2 \cdot \left( \frac16 + K_1 \int_{r = 0}^R \int_{\theta = \cos^{-1}\bigl(\frac{-r}{2R}\bigr)}^{\frac{2\pi}3} \lambda \pi r e^{- \dfrac{\lambda \pi r^2}2 } \,d\theta\, dr \right) $$

Note that there's a negative sign in the arccosine, as the angle is in the 3rd quadrant ($\frac{\pi}2 < \theta < \pi$).

\begin{align} K &= \frac13 + 2 K_1\int_{r = 0}^R \left( \frac{2\pi}3 - \cos^{-1}\bigl(\frac{-r}{2R}\bigr) \right) \lambda \pi r e^{- \dfrac{\lambda \pi r^2}2 } \,dr \\ &= \frac13 + 2 K_1\int_{r = 0}^R \left( \cos^{-1}\bigl(\frac{r}{2R}\bigr) - \frac{\pi}3 \right) \lambda \pi r e^{- \dfrac{\lambda \pi r^2}2 } \end{align} which doesn't have a closed form. Nonetheless, numerical evaluation to high precision of such a simple functional form is easy. For example, for $\lambda = 1$ and $R = 1$, we have $K \approx 0.0297988491$.

Since you said this comes from a practical problem and not a homework, it's not a surprise that numerical methods have to be employed.

1
On

As per requested in the first comment of the earlier post,let me do this in a separate post cuz it's too long as an appendix.

About the "shortcut" of $~2\cos^{-1}\bigl( \frac{r}{2R}\bigr) \cdot f_r(r)$

The mass over a general region $\Omega$ for a 2-dim distribution expressed in polar form is

$$\iint_{\Omega} f_{r\Theta}(r, \theta)\, dr d\theta $$

where $f_{r\Theta}$ is the joint density that can be complicated where variables $r$ and $\theta$ are tangled. Note that the integral is just $drd\theta$ and NOT the usual $rdrd\theta = dxdy$ under the Cartesian-polar transformation. The convention is that we consider the Jacobian (the extra term $r$) is absorbed into the density.

When the radial direction and the angular component are independent, we have the basic property $$f_{r\Theta}(r, \theta) = f_r(r) \cdot f_{\Theta}(\theta)$$ That is, the variables $r$ and $\theta$ are separable.

If further we have rotationally symmetric distribution, which means the angle itself is uniformly distributed over $[0,2\pi)$, then

$$f_{\Theta}(\theta) = \frac1{2\pi}$$

Note that both uniform (over a disk) and Rayleigh (either over the whole plane or truncated to just a disk) are both rotationally symmetric by definition.

Accordingly, the mass when the region $\Omega = UQWD$ as given is the integral

$$2\int_{r = 0}^R \left[ \int_{\theta = T(r) }^{\pi} f_r(r) \cdot \frac1{2\pi} \, d\theta \right] dr = 2\int_{r = 0}^R \frac{ \pi - T(r) }{ 2\pi } f_r(r) dr$$ where $T(r)$ traces out the curve $\widetilde UAD$ (the circluar arc of the left circle) is the angle as a function of the radial distance.

The whole thing is mirror symmetric with respect to the horizontal axis (the extended line $\overset{\leftrightarrow}{QU}$) so there's a factor of 2 in front and the upper limit of angle is $\pi$. (this region can also be broken down as $\frac16 + \text{blah}$ as described in the earlier post. See the comments there and also the last figure here on the right)

We already see here that the functional form is the same for any radial density $f_r$. Below we will see that

$$T(r) = \cos^{-1}\bigl( \frac{-r}{2R}\bigr) \qquad \text{so that} ~~ \pi - T(r) = \cos^{-1}\bigl( \frac{r}{2R}\bigr) $$

Note that the $\frac1{2\pi}$ either will be absorbed or will be cancelled (when doing conditional probability, there's a denominator and the numerator).

enter image description here

The angle $\theta$ as a function of $r$ for curve of the left circle arc

A general point on the plane in polar coordinates $(r, \theta)$ is illustrated in the left figure above.

Consider point $A$ being on the left-circle-arc with a radial distance of $\overline{DA} = r$, the angle is a function of the radial distance $\theta = T(r)$. This is illustrated as the figure on the right above.

Let's focus on the triangle $\triangle DAQ$, as shown in the left diagram below. We will obtain the auxiliary angle $\alpha$ (color in red) first, which has a fixed relation with $\theta$.

By the Law of Cosines, we have

$$\cos \alpha = \frac{|QD|^2 + |QA|^2 - |DA|^2}{ 2 \cdot |QD| \cdot |QA|} = \frac{ 2R^2 - r^2}{ 2R^2} = 1 - \frac{ r^2 }{ 2 R^2 }$$

enter image description here

At the same time, $\triangle DAQ$ is isosceles so the base angle $\angle ADQ = \dfrac{\pi - \alpha}2$. Hence, we have $$\theta = \pi - \angle ADQ = \dfrac{\pi + \alpha}2 \quad \implies \cos\theta = \cos\bigl( \frac{\pi + \alpha}2 \bigr) = -\sin \frac{\alpha}2 $$ With basic trigonometry, note that $\alpha$ is always acute (its sine is always positive), we have

$$ \cos\alpha = 1 - 2 \sin^2\frac{\alpha}2 \quad \implies \sin\frac{\alpha}2 = \sqrt{ \frac{1 - \cos\alpha}2 } = \sqrt{ \frac{r^2}{ 4R^2} } = \frac{r}{ 2R } \\ \cos\theta = -\frac{r}{ 2R } \qquad \implies \theta = \cos^{-1} \bigl( \frac{-r}{ 2R } \bigr)$$ as promised.

The last figure on the right is showing the convenient breakdown of the desired $\Omega = UQWD$ region (half of it). It consists of a circular sector (subtending an angle of $\pi/3$), which always contain $\frac16$ of the total mass for rotationally symmetric distribution, and the purple region that requires an integration which has no closed form.