What is a Joint pdf?
A joint probability density function, or joint pdf, describes how two continuous random variables behave together.
We write the joint pdf of $X$ and $Y$ as $f_{X,Y}(x,y)$. Its height at a particular point $(x,y)$ gives us an idea of how densely the probability is concentrated around that pair of values.
As with an ordinary pdf, however, the height itself is not a probability. To find a probability, we need to look at the volume underneath the joint pdf.
Suppose $A$ is some region in the $x$-$y$ plane. Then
$$\mathbb{P}((X,Y)\in A)=\iint_A f_{X,Y}(x,y) \ dxdy.$$
That is, the probability that the pair $(X,Y)$ lies inside $A$ is the volume underneath the joint pdf above that region.
A valid joint pdf must be non-negative, and its total volume must equal 1:
$$\int_{-\infty}^{\infty} \int_{-\infty}^{\infty} f_{X,Y}(x,y) \ dy dx=1.$$
Double Integrals
As above, working with joint pdfs often requires calculating volumes using double integrals.
One way to picture the calculation is to divide the region into thin strips. We first fix one variable and integrate over the other, finding the volume above one strip. We then move across the whole region, adding these strips together with the second integral.
It is a bit like mowing a lawn, one strip at a time!
For example, consider the joint pdf
$$f_{X,Y}(x,y)=8xy$$
over the triangular region
$$0<y<x<1,$$
with density zero everywhere else.
Using vertical strips, for each fixed value of $x$ we let $y$ run from $0$ to $x$. The total probability is then
$$\int_0^1 \int_0^x 8xy \ dy dx=1.$$
This confirms that the total volume underneath the pdf is 1.
Changing the Order of Integration
We can cover exactly the same triangular region using horizontal strips instead.
Now we first fix $y$. For a particular value of $y$, the variable $x$ runs from $y$ to $1$. So the same probability can be written as
$$\int_0^1 \int_y^1 8xy \ dxdy.$$
Doing the inner integral first,
$$=\int_0^1 \left[4x^2y\right]_{x=y}^{x=1} dy$$
$$=\int_0^1 (4y-4y^3) dy.$$
We then integrate over $y$:
$$=\left[2y^2-y^4\right]_0^1=1.$$
Both calculations give the same answer because they are simply two different ways of dividing up the same region.
The important idea is geometric: with a joint pdf, probabilities correspond to volumes, and double integrals let us add up those volumes over whatever region interests us.
Background:
Understanding Econometrics is completely free to use, and always will be.
If you found the site useful and would like to help me keep adding new material, please consider buying me a coffee! Buy me a coffee ☕