382. In a rectangular coordinate system $x O y$, a ray is randomly drawn (at an arbitrary angle $t$) from the point $A(4 ; 0)$, intersecting the $O y$ axis. Find the density $g(y)$ of the probability distribution of the ordinate $y$ of the intersection point of the drawn ray with the $O y$ axis.
Solution. The angle $t$ can be considered as a random variable uniformly distributed in the interval ($-\pi / 2, \pi / 2$), and in this interval, the probability density function is

$$
f(t)=\frac{1}{\pi / 2-(-\pi / 2)}=\frac{1}{\pi}:
$$

outside the considered interval, $f(t)=0$.

From Fig. 7, it follows that the ordinate $y$ is related to the angle $t$ by the following relationship: $y=4 \operatorname{tg} t$. This function is monotonically increasing in the interval ($-\pi / 2, \pi / 2$), so to find the desired density function $g(y)$, we can use the formula

$$
g(y)=f[\psi(y)] \cdot\left|\psi^{\prime}(y)\right|
$$

where $\psi(y)$ is the inverse function of $y=4 \mathrm{tg} t$.

Let's find $\psi(y)$:

$$
\psi(y)=t=\operatorname{arctg}(y / 4)
$$

Let's find $\psi^{\prime}(y)$:

$$
\psi^{\prime}(y)=4 /\left(16 + y^{2}\right)
$$

Therefore,

$$
\left|\psi^{\prime}(y)\right|=4 /\left(16 + y^{2}\right). \quad(* *)
$$

Let's find $f[\psi(y)]$. Since $f(t)=1 / \pi$, then

$$
f[\psi(y)]=1 / \pi
$$

Substituting (**) and (***) into (*), we finally get

$$
g(y)=\frac{4}{\pi\left(16+y^{2}\right)}
$$

![](https://cdn.mathpix.com/cropped/2024_05_22_1d1b16277022f98e68adg-126.jpg?height=345&width=355&top_left_y=338&top_left_x=827)

Fig. 7

where $-\infty<y<\infty$ (the latter follows from the fact that $y=4 \mathrm{tg} t$ and $-\pi / 2 < t < \pi / 2$).

Verification:

$$
\int_{-\infty}^{\infty} g(y) d y=\frac{4}{\pi} \int_{-\infty}^{\infty} \frac{d y}{16+y^{2}}=\frac{4}{\pi} \cdot 2 \int_{0}^{\infty} \frac{d y}{16+y^{2}}=\frac{4 \cdot 2 \cdot \pi}{\pi \cdot 4 \cdot 2}=1
$$