Mathwords logoMathwords

Joint Density Function — Definition, Formula & Example

A joint density function is a surface f(x,y)f(x,y) over the plane that describes how two continuous random variables vary together. The volume under this surface above a region gives the probability that the pair (X,Y)(X,Y) lands in that region.

Random variables XX and YY are jointly continuous if there is a function f:R2→[0,∞)f:\mathbb{R}^2\to[0,\infty) such that P((X,Y)∈A)=∬Af(x,y) dAP((X,Y)\in A)=\iint_A f(x,y)\,dA for every (Borel) set A⊆R2A\subseteq\mathbb{R}^2. This ff is the joint density. It satisfies ∬R2f dA=1\iint_{\mathbb{R}^2} f\,dA = 1. Where the joint CDF F(x,y)=P(X≤x, Y≤y)F(x,y)=P(X\le x,\,Y\le y) is smooth enough, f(x,y)=∂2F∂x ∂yf(x,y)=\dfrac{\partial^2 F}{\partial x\,\partial y}. The definition extends to nn variables with nn-fold integrals.

Key Formula

P((X,Y)∈A)=∬Af(x,y) dA,f(x,y)≥0,∬R2f(x,y) dA=1P\big((X,Y)\in A\big)=\iint_A f(x,y)\,dA,\qquad f(x,y)\ge 0,\qquad \iint_{\mathbb{R}^2} f(x,y)\,dA = 1
Where:
  • f(x,y)f(x,y) = Joint density of X and Y. It gives probability per unit area, not a probability.
  • AA = Region of the xy-plane whose probability you want
  • dAdA = Area element, usually written as dy dx or dx dy

Worked Example

Problem: Let f(x,y)=x+yf(x,y)=x+y for 0≤x≤10\le x\le 1 and 0≤y≤10\le y\le 1, with f(x,y)=0f(x,y)=0 elsewhere. Confirm that ff is a valid joint density. Then find P(X≤12,  Y≤12)P\left(X\le \tfrac12,\; Y\le \tfrac12\right).
Step 1: Check validity. The function ff is nonnegative on the unit square. Its total volume must equal 1, so integrate over yy first and then over xx.
∫01 ⁣∫01(x+y) dy dx=∫01(x+12)dx=12+12=1\int_0^1\!\int_0^1 (x+y)\,dy\,dx=\int_0^1\left(x+\tfrac12\right)dx=\tfrac12+\tfrac12=1
Step 2: The event is the square [0,12]×[0,12][0,\tfrac12]\times[0,\tfrac12]. Do the inner integral over yy and treat xx as a constant.
∫01/2(x+y) dy=x2+18\int_0^{1/2}(x+y)\,dy=\frac{x}{2}+\frac{1}{8}
Step 3: Integrate that result over xx from 0 to 12\tfrac12.
∫01/2(x2+18)dx=116+116=18\int_0^{1/2}\left(\frac{x}{2}+\frac18\right)dx=\frac{1}{16}+\frac{1}{16}=\frac18
Answer: ff is a valid joint density, and P(X≤12, Y≤12)=18P\left(X\le \tfrac12,\,Y\le\tfrac12\right)=\tfrac18. Even though this square covers one quarter of the area, it holds only 12.5% of the probability, because the density is smallest near (0,0)(0,0).

Why It Matters

Questions such as "which part fails first?" ask for P(X<Y)P(X<Y). You answer them by integrating a joint density over the half-plane above the line y=xy=x. Calculus-based probability courses build marginals, conditional densities, covariance and independence tests on this one object. Reliability engineering and Bayesian statistics use it the same way.

Common Mistakes

Mistake: Assuming the joint density always equals the product of the two single-variable densities, f(x,y)=fX(x) fY(y)f(x,y)=f_X(x)\,f_Y(y).
Correction: That factorization holds only when XX and YY are independent. In the example, the marginals are fX(x)=x+12f_X(x)=x+\tfrac12 and fY(y)=y+12f_Y(y)=y+\tfrac12. Their product at (0,0)(0,0) is 14\tfrac14, but f(0,0)=0f(0,0)=0, so XX and YY are dependent. Find each marginal by integrating out the other variable, and test factorization before you use it.

Related Terms