# Joint PDF of uniformly distributed random variables

If two random variables are uniformly distributed over a region, how do you in general find the joint PDF of those random variables?

For example, if $$(X,Y)$$ is distributed uniformly over the region $$-2\leq x\leq 2$$, $$0\leq y\leq 1-x^2$$, how could you derive the joint density function of $$X$$ and $$Y$$?

I believe you have to integrate, but with what integrand? Thank you.

the easiest way is to calculate the Area of the domain region and, the joint pdf is its reciprocal

In the example you posted, the domain area is the following

$$\int_{-1}^{1}[1-x^2]dx=4/3$$

thus

$$f_{XY}(x,y)=\frac{3}{4}\mathbb{1}_{[-1;1]}(x)\cdot\mathbb{1}_{[0;1-x^2]}(y)$$

you can set also $$x \in \mathbb{R}$$ but thea area does not changes due to the fact that $$y \ge 0$$

why is the joint pdf the reciprocal of the area?

observing the drawing of the joint domain, you get that

$$C\int_{-1}^{1}\left[ \int_0^{1-x^2}dy \right]dx=1$$

that is $$C=3/4$$

Now observe that the above double integral is, geometrically, the volume of a solid figure with base the green region and constant height C that is your uniform density.

thus

$$V=1=C\cdot A$$

that means

$$C=\frac{1}{A}$$

• Thanks for the answer, but why is the joint pdf the reciprocal of the area? Commented Oct 26, 2021 at 12:51
• @fmtcs : the uniform density is constant over all the bivariate domain... It's a known fact that $$\int_{-\infty}^{+\infty}\int_{-\infty}^{+\infty}f(x,y)dxdy=C\cdot\int_{-\infty}^{+\infty}\int_{-\infty}^{+\infty}dxdy=1$$ This integral can be viewed as the volume of the solid figure having the domain as a base and a constant density as height...thus the density is the reciprocal of the base area Commented Oct 26, 2021 at 13:00
• @fmtcs : I did some edits...your original question confused me... :( Commented Oct 26, 2021 at 13:14