Calculate the probability that the expression $\frac{X^2}{Y^2}$ lies within the interval $\left(\frac{1}{\sqrt{2}}, \sqrt{2}\right)$.

96 Views Asked by At

Given below is the problem I have solved but I am not sure whether the solution is correct or not. Can someone guide me. Thanks

Problem Statement

Let $X$ and $Y$ be two independent random variables, each uniformly distributed in the range from 0 to 1. Calculate the probability that the expression $\frac{X^2}{Y^2}$ lies within the interval $\left(\frac{1}{\sqrt{2}}, \sqrt{2}\right)$.

Solution

Since $X$ and $Y$ are independent and uniformly distributed in the interval $[0, 1]$, their probability density functions are given by:

$f_X(x) = \begin{cases} 1 & 0 \leq x \leq 1 \\ 0 & \text{otherwise} \end{cases} $

$f_Y(y) = \begin{cases} 1 & 0 \leq y \leq 1 \\ 0 & \text{otherwise} \end{cases} $

The joint probability density function of $X$ and $Y$, denoted by $f_{XY}(x, y)$, can be obtained by multiplying their individual probability density functions due to their independence:

$f_{XY}(x, y) = f_X(x) \cdot f_Y(y) = 1, \quad \text{for } 0 \leq x \leq 1 \text{ and } 0 \leq y \leq 1.$

To calculate the probability that $\frac{X^2}{Y^2}$ lies within the interval $\left(\frac{1}{\sqrt{2}}, \sqrt{2}\right)$, we first find the range of $x$ for which this condition holds. Solving the inequality $\frac{1}{\sqrt{2}} \leq \frac{X^2}{Y^2} \leq \sqrt{2}$ yields:

$\left(\frac{1}{\sqrt{2}}\right)^2 \leq \frac{X^2}{Y^2} \leq (\sqrt{2})^2$ $\frac{1}{2} \leq \frac{X^2}{Y^2} \leq 2.$

Rearranging the inequality and using the fact that $X$ and $Y$ are positive, we get:

$\frac{1}{2} \cdot Y^2 \leq X^2 \leq 2 \cdot Y^2.$ Taking the square root of the inequality:

$\sqrt{\frac{1}{2}} \cdot Y \leq X \leq \sqrt{2} \cdot Y.$

Now, we need to find the boundaries for the integration over $x$ and $y$ to calculate the probability. Since both $X$ and $Y$ are in the range $[0, 1]$, the integration boundaries for $x$ and $y$ are as follows:

$\max\left(0, \sqrt{\frac{1}{2}} \cdot Y\right) \leq X \leq \min\left(1, \sqrt{2} \cdot Y\right), \quad 0 \leq Y \leq 1.$

The probability of $\frac{X^2}{Y^2}$ lying within the interval $\left(\frac{1}{\sqrt{2}}, \sqrt{2}\right)$ is then given by the double integral:

$P\left(\frac{1}{\sqrt{2}} \leq \frac{X^2}{Y^2} \leq \sqrt{2}\right) = \int_{0}^{1} \int_{\max(0, \sqrt{1/2} \cdot y)}^{\min(1, \sqrt{2} \cdot y)} f_{XY}(x, y) \, dx \, dy.$

Since $f_{XY}(x, y) = 1$ for $0 \leq x \leq 1$ and $0 \leq y \leq 1$, the above probability simplifies to:

$P\left(\frac{1}{\sqrt{2}} \leq \frac{X^2}{Y^2} \leq \sqrt{2}\right) = \int_{0}^{1} \int_{\max(0, \sqrt{1/2} \cdot y)}^{\min(1, \sqrt{2} \cdot y)} 1 \, dx \, dy.$

Now, we integrate with respect to $x$ first:

$P\left(\frac{1}{\sqrt{2}} \leq \frac{X^2}{Y^2} \leq \sqrt{2}\right) = \int_{0}^{1} \left[x\right]_{\max(0, \sqrt{1/2} \cdot y)}^{\min(1, \sqrt{2} \cdot y)} \, dy.$

$P\left(\frac{1}{\sqrt{2}} \leq \frac{X^2}{Y^2} \leq \sqrt{2}\right) = \int_{0}^{1} \left[\min(1, \sqrt{2} \cdot y) - \max(0, \sqrt{1/2} \cdot y)\right] \, dy.$

Finally, we integrate with respect to $y$:

$P\left(\frac{1}{\sqrt{2}} \leq \frac{X^2}{Y^2} \leq \sqrt{2}\right) = \left[\sqrt{2} \cdot y - \frac{1}{\sqrt{2}} \cdot y^2\right]_{0}^{1}.$

$P\left(\frac{1}{\sqrt{2}} \leq \frac{X^2}{Y^2} \leq \sqrt{2}\right) = \left(\sqrt{2} - \frac{1}{\sqrt{2}}\right) - \left(0 - 0\right) = \sqrt{2} - \frac{1}{\sqrt{2}} \approx 0.5946.$

Therefore, the probability that $\frac{X^2}{Y^2}$ lies within the interval $\left(\frac{1}{\sqrt{2}}, \sqrt{2}\right)$ is approximately 0.5946.

2

There are 2 best solutions below

3
On

That $0.5946$ looks too high to me

First a simulation using R:

set.seed(2023)
X <- runif(10^6)
Y <- runif(10^6)
mean(1/sqrt(2) < X^2/Y^2 & X^2/Y^2 < sqrt(2))
# 0.159678

Then as a calculation, rewrite $\frac{1}{\sqrt{2}} \leq \frac{x^2}{y^2} \leq \sqrt{2}$ as $\sqrt[4]{\frac12} x < y < \sqrt[4]{2} x$, approximately $0.8409 x < y < 1.1892 x$, i.e. the shaded area

square

which has area $1 - \sqrt[4]{\frac12} \approx 0.1591$, close to the simulated probability.

If you insist on an integral, you can use $$\int\limits_{x=0}^{ \sqrt[4]{\frac12}} \left( \sqrt[4]{2} x - \sqrt[4]{\frac12} x \right) \, dx + \int\limits_{x= \sqrt[4]{\frac12}}^{1} \left( 1 - \sqrt[4]{\frac12} x \right) \, dx$$ though it is easier to subtract the area of the two triangles from the square.

3
On

Solving the inequality $\frac{1}{\sqrt{2}} \leq \frac{X^2}{Y^2} \leq \sqrt{2}$ yields: $\left(\frac{1}{\sqrt{2}}\right)^2 \leq \frac{X^2}{Y^2} \leq (\sqrt{2})^2$

Have a look at that one again.

$\int_{0}^{1} \left[\min(1, \sqrt{2} \cdot y) - \max(0, \sqrt{1/2} \cdot y)\right] \, dy = \left[\sqrt{2} \cdot y - \frac{1}{\sqrt{2}} \cdot y^2\right]_{0}^{1}$

Are you sure that's the right antiderivative? What's the derivative of $\sqrt2 \cdot y$? Is it $\sqrt 2$ or is it $\min(1, \sqrt 2 \cdot y)$?


Here's the plot of $2^{-1/4} x < y < 2^{1/4} x$. If you want to compute the integral with respect to either x or y, you need to take note that you can't simply do the integral of (upper curve) - (lower curve) because what is the upper curve or the lower curve changes depending on where you are along the y-axis (integrating wrt y). However, if you break this up into two triangles by cutting it along the line $y = x$, you can much more easily compute the area.

Plot of 2^(-1/4) x < y < 2^(1/4) x