# Why are $X$ and $Y$ independent if joint density is separable and the universe is a rectangle?

From "The probability Tutoring Book" by Carol Ash,

If a joint density function $$f_{x,y}(x,y)$$ is separable and the universe is a rectangle, then $$X$$ and $$Y$$ are independent.

My question is why is this true?

I know that a function is separable if it can be written as the product of two functions, each of which is only dependent on one variable.

The second requirement simply means $$a \leq X \leq b$$ and $$c \leq Y \leq d$$, right?

But I'm not understanding why these two conditions make X and Y independent...

Also, if I have three variables, then does this "theorem" still hold true if the density is separable and $$a \leq X \leq b\text{ and }c \leq Y \leq d\text{ and } e \leq Z\leq f$$?

• asking for clarification on your question ... as an alternative, for example, to the rectangle part of the question, if X and Y were limited to the upper right half triangle of the rectangle bound by (a,c) and (b,d) then the two random variables would not be independent even if $f_{x,y}(x,y)=f_x(x)f_y(y)$? Jul 22, 2020 at 19:58
• @phdmba7of12 The theorem requires the joint density $f_{X,Y}(x,y)$ to exist and be a product of two functions $g(x) h(y)$ for all real numbers $x,y$. Jul 22, 2020 at 20:53
• You can define those functions "piecewise", so you might have $g(x) = 0$ outside some interval $[a,b]$ and $h(y) = 0$ outside some interval $[c,d]$. Jul 22, 2020 at 21:18

If the joint density $$f_{X,Y}(x,y) = g(x) h(y)$$ for some functions $$g$$ and $$h$$, we have in particular \eqalign{1 &= \int_{-\infty}^\infty \int_{-\infty}^\infty\; dx \; dy\; g(x) h(y) \cr &= \int_{-\infty}^\infty dx\; g(x)\; \int_{-\infty}^\infty dy\; h(y) } If $$\int_{-\infty}^\infty dx\; g(x) = a$$, $$\int_{-\infty}^\infty dy\; h(y) = 1/a$$. We can replace $$g(x)$$ by $$g(x)/a$$ and $$h(y)$$ by $$a h(y)$$, and we get $$\int_{-\infty}^\infty g(x) = 1$$ and $$\int_{-\infty}^\infty h(y) = 1$$. Now for any $$x_0$$, $$P(X \le x_0) = P(X \le x_0, Y < \infty) = \int_{-\infty}^{x_0} dx\; g(x)\; \int_{-\infty}^\infty dy\; h(y) = \int_{-\infty}^{x_0} dx\; g(x)$$ $$P(Y \le y_0) = P(X < \infty, Y \le y_0) = \int_{-\infty}^{\infty} dx\; g(x)\; \int_{-\infty}^{y_0} dy\; h(y) = \int_{-\infty}^{y_0} dx\; h(x)$$ and $$P(X \le x_0, Y \le y_0) = \int_{-\infty}^{x_0} dx\; g(x)\; \int_{-\infty}^{y_0} dy\; h(y) = P(X \le x_0) P(Y \le y_0)$$ From this you can obtain $$P(X \in A, Y \in B) = P(X \in A) P(Y \in B)$$ for all Borel sets $$A$$ and $$B$$, and therefore $$X$$ and $$Y$$ are independent.