Joint Probability Density Function
Study guide: Exam ACIA-CAPSTONE
A Joint Probability Density Function of two continuous random variables X and Y is a function f(x,y) whose volume over a region is the probability that (X,Y) lies in that region. It describes their joint distribution. The probability that (X,Y) lies in a region A is
P\bigl((X,Y) \in A\bigr) = \iint_A f(x,y)\,dA
dAis the area element,dy\,dxordx\,dyin an iterated integral.
A valid joint density satisfies f(x,y) \geq 0 and integrates to 1 over its support. Setting that double integral equal to 1 is how an unknown constant c is found. The support is the set of points (x,y) where f(x,y) > 0.
f(x,y) = c(x+y)on the region0 < x < y < 1. What isc?
- The support is the triangle above the line
y = xinside the unit square.- For each
xfrom 0 to 1,yruns fromxto 1.- The inner integral is
\int_x^1 (x+y)\,dy = x + \tfrac{1}{2} - \tfrac{3x^2}{2}.- Integrating over
xfrom 0 to 1 gives\tfrac{1}{2} + \tfrac{1}{2} - \tfrac{1}{2} = \tfrac{1}{2}, so the double integral is\tfrac{c}{2}.- Setting
\tfrac{c}{2} = 1givesc = 2.
Limits of integration
The integrand is rarely the hard part. The region is. With x as the outer variable, a probability is the iterated integral
\int_{a}^{b}\int_{g_1(x)}^{g_2(x)} f(x,y)\,dy\,dx
aandbare the smallest and largest values ofxin the region, and are numbers.g_1(x)andg_2(x)are the lower and upper limits ofyfor thatx.
The limits are set up in four steps:
- Sketch the support, shading the points
(x,y)wheref > 0. - Pick an outer variable and read off its full range. Those limits are constants.
- Hold the outer variable fixed and read the inner variable's range off the sketch. Those limits may involve the outer variable.
- Check that the limits on
dynever containy.
Reversing the order of integration is often easier, but the limits must be read again from the sketch, not swapped.
XandYhave joint densityf(x,y) = 8xyfor0 < x < y < 1. What isP(Y > 2X)?
- The event
Y > 2Xis the part of the triangle above the liney = 2x.- With
xouter,yruns from2xto 1, andxcan go no higher than\tfrac{1}{2}.- The inner integral is
\int_{2x}^{1} 8xy\,dy = 4x(1 - 4x^2) = 4x - 16x^3.- The outer integral is
\int_0^{1/2} (4x - 16x^3)\,dx = \left[2x^2 - 4x^4\right]_0^{1/2} = \tfrac{1}{2} - \tfrac{1}{4}.P(Y > 2X) = 0.25.
Marginal density
The marginal density of X integrates y out of the joint density:
f_X(x) = \int f(x,y)\,dy
The limits on that inner integral depend on x whenever the support is not a rectangle. The marginal is a function of x alone, so if y survives, the limits were wrong. In the same way, f_Y(y) integrates x out.
Losses on two coverages have joint density
f(x,y) = 8xyfor0 < x < y < 1. What is the marginal density ofY?
- For a fixed
y,xruns from 0 toy, not from 0 to 1.f_Y(y) = \int_0^y 8xy\,dx = 8y \cdot \tfrac{y^2}{2} = 4y^3for0 < y < 1.- As a check,
\int_0^1 4y^3\,dy = 1.- Limits of 0 to 1 for
xwould have given4y, which integrates to 2, a sign the region was wrong.
Conditional density
Given X = x, the conditional density of Y is the joint density divided by the marginal:
f_{Y \mid X}(y \mid x) = \frac{f(x,y)}{f_X(x)}
f_X(x) > 0.
With
f(x,y) = 8xyon0 < x < y < 1andf_Y(y) = 4y^3, what is the conditional density ofXgivenY = y?
- Divide the joint density by the marginal of
Y:f_{X \mid Y}(x \mid y) = \dfrac{8xy}{4y^3}.f_{X \mid Y}(x \mid y) = \dfrac{2x}{y^2}for0 < x < y.- Given
Y = y,Xis confined to(0, y), so the conditional support shrinks withy.
Independence
X and Y are independent if and only if the joint density is the product of the marginals:
f(x,y) = f_X(x)\,f_Y(y)
Independent X and Y therefore have a rectangular support. A triangular support such as 0 < x < y < 1 forces dependence no matter how the formula factors, because the range of Y depends on x.
Expected value of a function
The expected value of a function g(X,Y) is
E[g(X,Y)] = \iint g(x,y) f(x,y)\,dx\,dy
The integral runs over the support. With g(x,y) = xy it gives E[XY], which Moments for Joint Distributions and Covariance use.
A formula that factors on a triangle
f(x,y) = 8xyon0 < x < y < 1factors as(8x)(y), butXandYare not independent. The support is a triangle, so the range ofXdepends ony. Check the support before the formula.