10

I am trying to formulate the following question. X and Y are IID , uniform r.v. with ~U(0,1)

What is the probability of P( XY > 0.5) = ?

0.5 is a constant here and can be different.

I do respect the geometrical solutions but what i would like to see and understand is the generic approach since X and Y can be other distributions. Specificially solutions through Z = X.Y substition, joint distribution/convolution.

I tried the following conversion. Z = XY and dX = dZ/Y

then

$$ P(Z>0.5) = \int_{0.5}^1 \! f(z/y,y) \, \mathrm{d}y \mathrm{d}{z/y}. $$ $$ = \int_{0.5}^1 \! \int_{0}^{z} \! fy(y)fx(z)\, \mathrm{d}y \mathrm{d}{z/y}. $$ since fy(y) and fx(z) is 1 and 1/z s integral is ln(y) it simplifies to $$ = \int_{0.5}^1 \! ln(z) fx(z)\, \mathrm{d}z. $$

which i am not sure about the correct formulation especially the boundries.

--Edit The standard double integral solution over X and Y is as follows. f(x,y)dydx = f(x)f(y)dy dx since they are IID.

$$ = \int_{0.5}^1 \! \int_{0.5/x}^{x} \! fy(y)fx(x)\, \mathrm{d}y \mathrm{d}{x}. $$ $$ = (1-ln(2))/2 $$ $$ ~=0.15342 $$

The solution through Z=X.Y is K.A. Buhr's to the bottom:

math_law
  • 231
  • 1
  • 7
  • Xi'an , i started with Z = X.Y. where dZ=dX/Y Wrote P(Z>0.5) with the joint PDF , but I failed with the double integral and boundries. – math_law May 18 '20 at 09:33
  • Ok Xi'an added it to the original question. Looking forward for your answer as well. – math_law May 18 '20 at 11:26
  • Your question is unanswerable since the _only_ solution you seem to be willing to even consider is one that follows your approach of replacing $x$ by $z/y$ and $\mathrm dy\mathrm dx$ by $\mathrm dy\mathrm dz/y$. – Dilip Sarwate May 18 '20 at 20:40
  • Check K.A. Buhr's answer on Z substition – math_law May 19 '20 at 07:01
  • Just draw a picture of the area in question. The answer writes itself--no integration is needed at all. – whuber Jun 03 '20 at 14:26

4 Answers4

9

Some hints: Geometrical approaches are much easier for uniform RVs, but the general approach is to integrate the joint PDF in the region that satisfy $XY>\alpha$. The integral will basically look like below:

$$\mathbb P(XY>\alpha)=\iint_{xy>\alpha} f_{X,Y}(x,y)dydx$$

The actual boundaries of the integrals will change with respect to your support.

gunes
  • 49,700
  • 3
  • 39
  • 75
  • Could you carry out the operations a bit ? What's your answer.? – math_law May 18 '20 at 08:54
  • 3
    Since this is a self-study question, I believe you should apply this and tell us where you're stuck. – gunes May 18 '20 at 08:55
  • I guess your boundries are not correct thats why i asked could you derive a bit more with your answer. Finally i asked if there is any solution through substition like Z=X.Y and the Z transformations on the double integral if it makes sense. – math_law May 18 '20 at 09:21
  • 1
    @math_law the boundaries are general, and will change when you *substitute* your joint PDF. It won't go to infinity if your PDF is zero after some value for example, just as in uniform RV case. – gunes May 18 '20 at 10:55
  • 3
    Since you're giving a general answer (which I am not criticizing), consider giving a general formula. It would have to be something like $$\Pr(XY\gt \alpha) = \iint_{xy\gt \alpha} f_{X,Y}(x,y)\,\mathrm{d}x\mathrm{d}y.$$ This avoids the special assumptions associated with non-negative RVs implicit in your formula and exhibits the underlying idea more explicitly: namely, *integrate over the event in question.* This also goes full circle in connecting the formula to the geometric conception of the integral as a probability-weighted area. – whuber May 18 '20 at 12:42
  • 1
    I tried to give more hints on the boundaries to the author, but doing that reduced its generalisability for negative $\alpha$ and some other situations involving signs of $X,Y$. This is better, thanks. – gunes May 18 '20 at 12:48
  • This is nothing but the generic joint probability density function formula. Again i am asking through the Z transformation. Check my initial attempt above. – math_law May 18 '20 at 18:30
  • 1
    Usually the first variable will go through the full range of the domain, while the second variable's boundary will be a function of the first variable. So for your question example, x will go from 0 to 1, and y go from 0.5/x to 1. But you still need to handle the edge cases, like when 0.5/x > 1 and when x is 0, etc. – justhalf May 19 '20 at 03:51
9

Multiple answers and partial answers here, some for the more general problem of multiplying $n$ independent standard uniform random variables.

For $n = 2,$ the PDF of the product $Z = XY$ is $f(z) = -\log(z),$ for $0 < z < 1,$ which I believe agrees with @gunes' answer (+1) for the product of two standard uniform random variables.

The following simulation gives a histogram in agreement with this PDF. The red superimposed curve shows this density function.

set.seed(2020)
x = runif(10^6);  y = runif(10^6)
z = x*y
summary(z)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
0.00000 0.06793 0.18690 0.25011 0.38269 0.99907 

hist(z, prob=T, br=40, col="skyblue2")
curve(-log(x), add=T, col="red", lwd=2)

enter image description here

The CDF is $F_Z(z) = P(Z \le z) = z - z\log(z),$ for $0 < z < 1.$ So $F_Z(.5) = 0.8466$ is the requested probability.

z = .5;  z - z*log(z)
[1] 0.8465736

An empirical CDF (ECDF), based on the million simulated values of $Z$ is shown below as a thin black line. The dashed red line is $F_Z(z)$ as given above. The match is essentially perfect within the resolution of the plot.

plot(ecdf(z))
 curve(x - x*log(x), add=T, col="red", lwd=3, lty="dashed")
 abline(v = .5, col= "blue", lty = "dotted")
 abline(h = 0.8455, col="blue", lty="dotted")

enter image description here

BruceET
  • 47,896
  • 2
  • 28
  • 76
  • The answer is incorrect Bruce. I also want to see an analythical solution through integrals. – math_law May 18 '20 at 09:35
  • 4
    Sorry you don't care for the simulation. (I find it is a good way to check analytic solutions for gross errors and to make graphs.) My links provide analytic answers, so I did not see the need to repeat that work here. // But I am curious what answer you find to be incorrect. – BruceET May 18 '20 at 09:38
  • Thx for the effort Bruce, while i will not accept this as the answer it will help. BTW I asked P(XY>0.5) not P(XY<0.5) , i if you fix it the answer will be correct as well i believe. – math_law May 18 '20 at 13:43
  • 5
    For a continuous distribution $P(XY > .5) = 1 - P(XY < .5).$ I supposed you would handle that on your own. Obviously, you have the right to Accept any answer or not. Also, we who try to give helpful answers have the right to do so in our own style, format and degree of detail. And to choose which questions and whose questions to answer. I am happy to know my answer was of some help. – BruceET May 18 '20 at 16:46
2

There's really not much point in doing a change of variables here because it doesn't really buy you anything (even if you were doing it for non-uniform RVs).

But, if you insist, if you are trying to evaluate the integral: $$P(XY>\alpha) = \int_0^1\left(\int_0^1 f(x,y) I(xy>\alpha) dy\right)dx$$ you can't directly apply the substitution $x=z/y$ to the outer integral. You need to exchange the integrals first: $$= \int_0^1\left(\int_{x=0}^{x=1} f(x,y) I(xy>\alpha) dx\right)dy$$

Now, we can apply the substitution $x=z/y$, $dx=dz/dy$ and limits $z=0$ to $z=y$ to the inner integral: $$= \int_0^1\left(\int_{z=0}^{z=y} f(z/y,y) I(z>\alpha) \frac{dz}y\right)dy$$ Combining the integration limits and the indicator is difficult. We need to consider the cases where $y$ is less than and greater than $\alpha$ separately: \begin{align} &= \int_0^\alpha\left(\int_{z=0}^{z=y} f(z/y,y) I(z>\alpha) \frac{dz}y\right)dy + \int_\alpha^1\left(\int_{z=0}^{z=y} f(z/y,y) I(z>\alpha) \frac{dz}y\right)dy\\ &= 0 + \int_\alpha^1\left(\int_{z=\alpha}^{z=y} f(z/y,y) \frac{dz}y\right)dy \end{align} Note that in the case of the left integral, where $0\leq y \leq \alpha$, we also have $z \leq y \leq \alpha$, so the indicator is always zero, so that whole integral is 0. In the case of the right integral, we have $y > \alpha$, so for the inner integral $\int_{z=0}^{z=y}$, the indicator is zero for $0 \leq z \leq \alpha$ and one for $\alpha \leq z \leq y$, so that gives us our final limits.

Now, knowing that $f(z/y,y)=1$ over the limits of integration, we can write: $$=\int_\alpha^1\left(\int_{z=\alpha}^{z=y}\frac{dz}y\right)dy$$ and I imagine you can finish it off to get the result $1-\alpha+\alpha \log \alpha$, which was already more or less given in another answer.

K. A. Buhr
  • 281
  • 1
  • 3
  • That is what i was searching for. Change of variables is not a good solution and even making thing complex. – math_law May 19 '20 at 04:21
0

You might indeed try some coordinate transforms. E.g. instead of integrating $$\int \int f(x,y) I(xy>a) dx dy$$ you could transform to other variables and integrate $$\int \int g(w,z) I(z>a) dw dz $$

In which case the indicator function is easier to evaluate.

The transform

Say you use $w = y$ and $z = xy$. The distribution function can be computed using the Jacobian

$$J(w,z) = \frac{dx}{dw}\frac{dy}{dz} - \frac{dx}{dz}\frac{dy}{dw} = - \frac{1}{w}$$

and

$$g(w,z) = f(x(w,z),y(w,z) )|J(w,z)| = \frac{1}{w}$$

Integration and domain

For the integration we need to take care that the domain is

$$0 \leq z \leq 1 \quad \text{and} \quad z \leq w \leq 1$$

And the domains for each coordinate are not independent.

Now the integration becomes (the indicator function is gone now and you see it back in the formula as the lower limit for the integration with $dz$)

$$\int_a^1 \int_{z}^1 \frac{1}{w} dw dz $$

The inner term is $$ \int_{1/z}^1 \frac{1}{w} dw = \log(w) \big|_{z}^1 = - \log(z)$$

and you get

$$P(z > a) = \int_{a}^1 - \log(z) dz = z - z\log(z) \big|_{a}^1 = 1 - a + a \log(a)$$


Note that if you differentiate the expression that we used you get

$$f(Z=a)= \partial_z P(Z\leq a) = \partial_z \int_{-\infty}^a \int g(w,z) dw dz = \int g(w,z) dw $$

And this is the way how people often compute the pdf $\int |y^{-1}| f(z/y,y) dy$

So using a coordinate transform is not so uncommon to compute a product distribution.

Sextus Empiricus
  • 43,080
  • 1
  • 72
  • 161