0
$\begingroup$

Please consider the following problem and my soltuion to it. I would like to know where I went wrong.
Thanks,
Bob

Problem:
Let $X$ and $Y$ be independent random variable each uniformly distributed on $(0,1)$. Find $P(|\frac{x}{y}-1|\leq .5)$.
Answer:
\begin{eqnarray*} \Big|\frac{x}{y}-1\Big|\leq .5 &\iff& -0.5 \leq \frac{x}{y} -1 \leq 0.5 \\ P\Big(\Big|\frac{x}{y}-1 \Big| \leq .5\Big) &=& P\Big(\frac{x}{y}-1 \leq .5\Big) - P\Big(1 - \frac{x}{y} \leq -.5\Big) \\ P\Big(\Big|\frac{x}{y}-1 \Big| \leq .5\Big) &=& P\Big(\frac{x}{y}-1 \leq .5\Big) - P\Big(\frac{x}{y} - 1 \geq 0.5\Big) \\ % P\Big(\frac{x}{y}-1 \leq .5\Big) &=& P\Big(\frac{x}{y} \leq 1.5\Big) = P( x \leq 1.5y ) \\ P\Big(\frac{x}{y}-1 \leq .5\Big) &=& \int_0^1 \int_{0}^{1.5y} 1 \,\, dx \,\, dy \\ P\Big(\frac{x}{y}-1 \leq .5\Big) &=& \int_0^1 1.5y \,\, dy = \frac{3y^2}{4} \Big|_0^1 \\ P\Big(\frac{x}{y}-1 \leq .5\Big) &=& \frac{3}{4} \\ \end{eqnarray*} Now we need to find $P\Big(\frac{x}{y} - 1 \geq 0.5\Big)$ \begin{eqnarray*} P\Big(\frac{x}{y} - 1 \geq 0.5\Big) &=& 1 - P\Big(\frac{x}{y} - 1 \leq 0.5\Big) \\ P\Big(\frac{x}{y} - 1 \leq 0.5\Big) &=& P\Big(\frac{x}{y} - \leq 1.5\Big) = P( x \leq 1.5y ) \\ P( x \leq 1.5y ) &=& \int_0^1 \int_0^{1.5y} \, dx \,\, dy = \int_0^1 \frac{3y}{2} dy \\ P( x \leq 1.5y ) &=& \frac{3y^2}{4} \Big|_0^1 = \frac{1}{4} \\ P\Big(\frac{x}{y} - 1 \geq 0.5\Big) &=& 1 - \frac{3}{4} = \frac{1}{4} \\ P\Big(\Big|\frac{x}{y}-1 \Big| \leq .5\Big) &=& \frac{3}{4} - \frac{1}{4} \\ P\Big(\Big|\frac{x}{y}-1 \Big| \leq .5\Big) &=& \frac{1}{2} \\ \end{eqnarray*}
However, the book's answer is: $\frac{5}{12}$.

$\endgroup$
  • 2
    $\begingroup$ $P(x\le 1.5y)$ should be $P(x\le min(1.5y,1))$. $\endgroup$ – herb steinberg Oct 8 '18 at 19:15
  • $\begingroup$ $\frac{1}{2}$ is the answer you get when you ignore the fact that $0\le x\le 1$. $\endgroup$ – herb steinberg Oct 9 '18 at 3:20
0
$\begingroup$

$-0.5\le \frac{x}{y}-1\le 0.5$ or $-0.5y\le x-y\le 0.5y$ or $0.5y\le x\le 1.5y$. The probability is $P=\int_0^1 \int_{.5y}^{min (1,1.5y)}dxdy=\int_0^\frac{2}{3}ydy+\int_{\frac{2}{3}}^1(1-.5y)dy=\frac{5}{12}$.

Note: answer is different from book.

$\endgroup$
  • 1
    $\begingroup$ I did a simulation; your answer looks right. $\endgroup$ – J.G. Oct 9 '18 at 6:26
  • 1
    $\begingroup$ @J.G. What was the sample size for the simulation? $\endgroup$ – herb steinberg Oct 9 '18 at 16:14
  • 1
    $\begingroup$ @herb.steinberg $10,000$; its estimate was $0.4167$. $\endgroup$ – J.G. Oct 9 '18 at 16:19
  • 1
    $\begingroup$ Standard deviation is approximately $0.005$ so $\frac{3}{8}$ is definitely ruled out. $\endgroup$ – herb steinberg Oct 9 '18 at 21:50
  • 1
    $\begingroup$ $\frac{5}{12}$ = 0.4166666666666..... $\endgroup$ – herb steinberg Oct 10 '18 at 22:09
1
$\begingroup$

Your first equation is wrong.

It holds:

$$\Big|\frac{x}{y}-1\Big|\leq 0.5 \iff -0.5 \le \frac{x}{y}-1 \le 0.5$$

So it follows: $$\begin{align*}P\Big(\Big|\frac{x}{y}-1\Big|\leq 0.5\Big) &= P\Big(\frac{x}{y}-1\leq 0.5\Big) - P\Big(\frac{x}{y}-1\leq -0.5\Big)\\ &= P\Big(\frac{x}{y}-1\leq 0.5\Big) - P\Big(1-\frac{x}{y}\geq 0.5\Big) \\ &= P\Big(\frac{x}{y}-1\leq 0.5\Big) - 1 + P\Big(1-\frac{x}{y}\leq 0.5\Big)\end{align*}$$

$\endgroup$
  • $\begingroup$ I updated my post based upon your answer. However, I still get the wrong answer. $\endgroup$ – Bob Oct 8 '18 at 21:13
  • $\begingroup$ There is no change in your post. Consider the additional "-1" in my equation.Then it holds $$\begin{align*}P\left(\frac{x}{y} - 1 \le 0.5\right) &= P(x \le 1.5y)\\ &= \int_0^1\int_0 ^\min(1,1.5y) dx dy\\ &= \frac{2}{3}\end{align*}$$ and $$\begin{align*}P\left(1 - \frac{x}{y} \le 0.5\right) &= P(0.5y \le x)\\ &= \int_0^1\int_{0.5y} ^1 dx dy\\ &= \frac{3}{4}\end{align*}$$ and so we get $$P\Big(\Big|\frac{x}{y}-1\Big|\leq 0.5\Big) = \frac{2}{3} - 1 + \frac{3}{4} = \frac{5}{12}$$ like herb steinberg already calculated. $\endgroup$ – Gono Oct 9 '18 at 15:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.