Joint distributions

01 Theory

Theory 1

Joint distributions describe the probabilities of events associated with multiple random variables simultaneously.

In this course we consider only two variables at a time, typically called X and Y. It is easy to extend this theory to vectors of n random variables.

Joint PMF and joint PDF

Discrete joint PMF:

PX,Y(x,y)=P[X=x,Y=y]

Continuous joint PDF:

fX,Y(x,y)=density at(x,y)

center

center

Probabilities of events: Discrete case If B2 is a set of points in the plane, then an event is formed by the set of all outcomes s mapped by X and Y to points in B:

={sS|(X(s),Y(s))B}

The probabilities of such events can be measured using the joint PMF:

P[(X,Y)B]=P[]=(x,y)BPX,Y(x,y)

Probabilities of events: Continuous case Let 𝒱=[a,b]×[c,d]2 be the rectangular region defined by (x,y)2 such that axb and cyd. Then:

P[(x,y)𝒱]=P[aXb,cYd]=cdabfX,Y(x,y)dxdy

For more general regions 𝒱2:

P[(X,Y)𝒱]=𝒱fX,Y(x,y)dA

The existence of a variable Y does not change the theory for a variable X considered by itself.

However, it is possible to relate the theory for X to the theory for (X,Y), in various ways.

The simplest relationship is the marginal distribution for X, which is merely the distribution of X itself, considered as a single random variable, but in a context where it is derived from the joint distribution for (X,Y).

Marginal PMF, marginal PDF

Marginal distributions are obtained from joint distributions by summing the probabilities over all possibilities of the other variable.

Discrete marginal PMF:

PX(x)=yPX,Y(x,y)PY(y)=xPX,Y(x,y)

Continuous marginal PMF:

fX(x)=+fX,Y(x,y)dyfY(y)=+fX,Y(x,y)dx

Infinitesimal method

Suppose X has density fX(x) that is continuous at x0. Then for infinitesimal dx:

P[x0<Xx0+dx]=fX(x)dx

Suppose X and Y have joint density fX,Y(x,y) that is continuous at (x0,y0). Then for infinitesimal dx,dy:

P[x0<Xx0+dx,y0<Yy0+dy]=fX,Y(x0,y0)dxdy

Joint densities depend on coordinates

The density fX,Y(x,y) in these integration formulas depends on the way X and Y act as Cartesian coordinates and determine differential areas dxdy as little rectangles.

To find a density fR,Θ(r,θ) in polar coordinates, for example, it is not enough to solve for x(r,θ) and y(r,θ) and plug into fX,Y!

Instead, we must consider the differential area dxdy vs. drdθ. We find that dxdy=rdrdθ.

As an example, the density of the uniform distribution on the unit disk is fR,Θ=rπ, which is not constant as a function of r and θ.

Extra - Joint densities may not exist

It is not always possible to form a joint PDF fX,Y from any two continuous RVs X and Y.

For example, if X=Y, then (X,Y) cannot have a joint PDF, since P[X=Y]=1 but the integral over the region X=Y will always be 0. (The area of a line is zero.)

Link to original

02 Illustration

Example - Smaller and bigger rolls

Joint and marginal PMFs - Smaller and bigger roll

Roll two dice, and let X indicate the smaller of the numbers rolled, and let Y indicate the bigger number.

Make a chart showing the PMF. Compute the marginal probabilities, and write them in the margins of the chart.

Solution

center

Link to original

Exercise - Event probabilities by reading PMF table

Event probabilities by reading PMF table

Here is a joint PMF table:

PQ,G(q,g)g=0g=1g=2g=3q=00.060.180.240.12q=10.040.120.160.08

Using the table, compute the following event probabilities:

(a) P[Q=0] (b) P[Q=G] (c) P[G>1] (d) P[G>Q]

Link to original

Exercise - Joint and marginal PMFs - Coin flipping

Joint and marginal PMFs - Coin flipping

Flip a fair coin four times. Let X measure the number of heads in the first two flips, and let Y measure the total number of heads.

Make a chart showing the PMF. Compute the marginal probabilities, and write them in the margins of the chart.

Link to original

Example - Marginal and event probability from joint density

Marginal and event probability from joint density

Suppose the joint density of X and Y is given by:

fX,Y(x,y)={2xex2yy>x2,x[0,1]0otherwise

Find (a) fY(y) and (b) P[Y<3X2].

Solution

(a)

When y[0,1], the x range is 0 to y:

fY(y)=+fX,Y(x,y)dx0y2xex2ydx1eyfor 0y1

When y>1, the x range is 0 to 1:

fY(y)=+fX,Y(x,y)dx012xex2ydxe1yeyfor y>1

Therefore:

fY(y)={0y<01ey0y<1(e1)ey1y

(b)

Find probability of the event Y<3X2:

P[Y<3X2]=01x23x22xex2ydydx012xex2(ex2e3x2)dx12(1+e2) Link to original

Exercise - Marginals from joint density

Marginals from joint density

The joint PDF for X and Y is given by:

fX,Y(x,y)={6(x+y2)/50x,y10 otherwise 

Find fX(x) and fY(y).

Link to original

Exercise - Event probability from joint density

Event probability from joint density

The joint PDF for X and Y is given by:

fX,Y(x,y)={2exe2yx,y>00else

Compute P[X<Y].

Link to original

03 Theory

Theory 2

Joint CDF

The joint CDF of X and Y is defined by:

FX,Y(x,y)=P[Xx,Yy]

We can relate the joint CDF to the joint PDF using integration:

FX,Y(x,y)=yxfX,Y(s,t)dsdt

center

Conversely, if X and Y have a continuous joint PDF fX,Y(x,y) that is also differentiable, we can obtain the PDF from the CDF using partial derivatives:

fX,Y(x,y)=2xyFX,Y(x,y)

There is also a marginal CDF that is computed using a limit:

FX(x)=limy+FX,Y(x,y)

This could also be written, somewhat abusing notation, as FX(x)=FX,Y(x,+).

Link to original

04 Illustration

Exercise - Properties of joint CDFs

Properties of joint CDFs

(a) Show with a drawing that if both x<x and y<y, we know:

FX,Y(x,y)FX,Y(x,y)

(b) Explain why:

  • FX(x)=FX,Y(x,)
  • FY(y)=FX,Y(,y)

(c) Explain why:

  • FX,Y(x,)=0
  • FX,Y(,y)=0
Link to original

Independent random variables

05 Theory

Theory 1

Independent random variables

Random variables X,Y are independent when they satisfy the product rule for all valid subsets B1,B2:

P[XB1,YB2]=P[XB1]P[YB2]

Since {XB1,YB2}={XB1}{YB2}, this definition is equivalent to independence of all events constructible using the variables X and Y.

For discrete random variables, it is enough to check independence for simple events of type {X=k} and {Y=} for k and any possible values of X and Y.


The independence criterion for random variables can be cast entirely in terms of their distributions and written using the PMFs or PDFs.

Independence using PMF and PDF

Discrete case:

PX,Y(x,y)=PX(x)PY(y)

Continuous case:

fX,Y(x,y)=fX(x)fY(y)

Independence via joint CDF

Random variables X and Y are independent when their CDFs obey the product rule:

FX,Y(x,y)=FX(x)FY(y)
Link to original

06 Illustration

Example - Meeting in the park

Event probability - Meeting in the park

A man and a woman arrange to meet in the park between 12:00 and 1:00pm. They both arrive at a random time with uniform distribution over that hour, and do not coordinate with each other.

Find the probability that the first person to arrive has to wait longer than 15 minutes for the second person to arrive.

Solution

Let X denote the time the man arrives. Use minutes starting from 12:00, so X(0,60). Let Y denote the time the woman arrives, using the same interval.

The probability we seek is:

P[X+15<Y]+P[Y+15<X]

Because X and Y are symmetrical in probability, these terms have the same value, so we just double the first one for our answer.

Since the arrivals are independent of each other, we have fX,Y=fXfY.

Since each arrival time is uniform over the interval, we have:

fX(x)={1/60x(0,60)0otherwisefY(y)={1/60y(0,60)0otherwise

Therefore the joint density is fX,Y=(160)2. Calculate:

2P[X+15<Y]2x+15<yfX,Y(x,y)dxdy2x+15<yfX(x)fY(y)dxdy215600y15(160)2dxdy2(60)21560y15dy916 Link to original

Example - Uniform disk: Cartesian vs. polar

Uniform disk: Cartesian vs. polar

Suppose that a point is chosen uniformly at random on the unit disk.

(a) Let X and Y be the Cartesian coordinates of the chosen point. Are X and Y independent?

(b) Let R and Θ give the polar coordinates of the chosen point. Are R and Θ independent?

Solution

(a)

Write fX,Y for the joint distribution of X and Y. We have:

fX,Y={1/πx2+y210otherwise

Then computing fX(x), we obtain:

1x2+1x21πdy2π1x2fX(x)={2π1x2x[1,1]0otherwise

By similar reasoning, fY(y)=2π1y2 for y[1,1].

The product fX(x)fY(y) is not equal to fX,Y(x,y), so X and Y are not independent. Information about the value of X does provide constraints on the possible values of Y, so this result makes sense.


(b)

To find the marginals fR(r) and fΘ(θ), the standard method is to integrate the density fR,Θ in the opposite variables.

fR,Θ(r,θ) varies!

The probability density fR,Θ(r,θ) is not constant! The area of a differential sector drdθ depends on r.

We can take two approaches to finding the density fR,Θ:

(i) Area of a differential sector divided by total area:

rdrdθπrπdrdθ

So the density is fR,Θ=rπ.

(ii) Via the CDF:

Joint PDF from joint CDF: uniform distribution in polar

The region ‘below’ a given point (r,θ), in polar coordinates, is a sector with area θ2ππr2. The factor θ2π is a percentage of the circle with area πr2.

The density is a constant 1π across the disk, so the CDF at (r,θ) is this same area times 1π. Thus:

FR,Θ=θr22π

Then in polar coordinates the density is given by taking partial derivatives:

fR,Θ(r,θ)=2rθ(12πθr2)rπ

Once we have fR,Θ, integrate to get the marginals:

fR(r)=θ=02πfR,Θdθ02πrπdθ2rfΘ(θ)=r=01fR,Θdr01rπdr12π

Check independence:

fR,Θ=rπ=(2r)(12π)=fRfΘ

In this problem it is feasible to find the marginals directly, without computing the new density, only using some geometric reasoning.

Extra - Infinitesimal method for the marginals

The probability P[R(r,r+dr)] is the area (over π) of a thickened circle with radius r and thickness dr. The circumference of a circle at radius r is 2πr. So the area of the thickened circle is 2πrdr. So the probability is 2rdr. This tells us that the marginal probability density is PR(r)=2r.

The probability P[Θ(θ,θ+dθ)] is the area (over π) of a thin sector with radius 1 and angle dθ. This area is 1212dθ. So the probability is 12πdθ. This tells us that the marginal probability density is PΘ(θ)=12π.

These results agree with those above from differentiating the CDF.

Link to original