Independence and Functions of Two Random Variables

A multivariate distribution describes how two or more random variables behave together. Two exam-relevant skills built on a joint distribution are (1) deciding whether the variables are independent and (2) finding the distribution of a function of two random variables, such as their sum.

Independence

XX and YY are independent if and only if

fX,Y(x,y)=fX(x) fY(y)f_{X,Y}(x,y) = f_X(x)\,f_Y(y)

holds almost everywhere, at every (x,y)(x,y) except possibly on a set of zero area.


The qualifier is not a technicality: a continuous density is pinned down only up to changes on such a set, so redefining fX,Yf_{X,Y} along a single line alters no probability and cannot create or destroy independence.


Requiring the identity at literally every point would therefore be a stricter demand than the distribution itself makes.


For discrete variables, independence requires equality at every pair: a zero-mass joint pair can still violate the product rule when both marginals are positive, while an individual positive-mass pair cannot be ignored.


Unlike a zero-area set for a continuous density, no individual pair is discarded as a null-set exception. There independence means P(X=x,Y=y)=P(X=x)P(Y=y)P(X=x,Y=y)=P(X=x)P(Y=y) at every pair.


Reading the condition off the support, the set of (x,y)(x,y) carrying nonzero probability/density, gives a fast structural test.


A product fX(x)fY(y)f_X(x)f_Y(y) is nonzero exactly where both factors are, so independence forces the support to factor as a Cartesian product SX×SYS_X\times S_Y of the two marginal supports, again up to a set of zero area.


When SXS_X and SYS_Y are both intervals that product is a rectangle a<x<b, c<y<da<x<b,\ c<y<d, which is the familiar picture, but the criterion is the factorization, not the rectangle.


If each marginal is positive on (0,1)∪(2,3)(0,1)\cup(2,3), then independent XX and YY are supported on four disjoint unit squares: a Cartesian product, and nothing like a single interval-defined rectangle. What the test rules out is a support that cannot be split at all.


A triangle or a disk, where the range of xx moves with yy, is not any SX×SYS_X\times S_Y, so those variables cannot be independent even if f(x,y)f(x,y) algebraically looks like a product.

Worked Example

Let f(x,y)=cxyf(x,y)=cxy on the triangle 0<x<y<20<x<y<2. Normalizing:

∫02∫0ycxy dx dy=∫02cy(y22)dy=c2⋅y44∣02=2c=1⇒c=12.\int_0^2\int_0^y cxy\,dx\,dy = \int_0^2 c y\left(\frac{y^2}{2}\right)dy = \frac{c}{2}\cdot\frac{y^4}{4}\Big|_0^2 = 2c = 1 \Rightarrow c=\tfrac12.

Even though cxycxy is 'separable' in xx and yy, XX and YY are not independent because knowing Y=yY=y restricts XX to (0,y)(0,y). Both marginals are positive on the whole of (0,2)(0,2), so a product support would have to be the square (0,2)×(0,2)(0,2)\times(0,2); the triangle is only half of it.

Functions of Two Random Variables

To find the distribution of Z=g(X,Y)Z=g(X,Y) (e.g. Z=X+YZ=X+Y, max⁡(X,Y)\max(X,Y)), integrate the joint density over the region where g(x,y)≤zg(x,y)\le z:

FZ(z)=P(g(X,Y)≤z)=∬{g(x,y)≤z}f(x,y) dx dy.F_Z(z)=P\big(g(X,Y)\le z\big)=\iint_{\{g(x,y)\le z\}} f(x,y)\,dx\,dy.

Sketching the boundary curve g(x,y)=zg(x,y)=z on top of the support (as with the dashed line in the figure) makes the limits of integration much easier to set up.

The shaded triangle is the support 0 \lt x \lt y \lt 1 of a joint density f(x,y)=kxy; its slanted edge is the line y=x. The red dashed line is x+y=1, drawn for reference when integrating over a region defined by a function of X and Y; it meets the edge y=x at (0.5,0.5). Axis scales are equal, with one unit spanning the same length on both axes.

The shaded triangle is the support 0<x<y<10 \lt x \lt y \lt 1 of a joint density f(x,y)=kxyf(x,y)=kxy; its slanted edge is the line y=xy=x. The red dashed line is x+y=1x+y=1, drawn for reference when integrating over a region defined by a function of XX and YY; it meets the edge y=xy=x at (0.5,0.5)(0.5,0.5). Axis scales are equal, with one unit spanning the same length on both axes.

Support of the joint density and the reference line x + y = 1

Support of the joint density and the reference line x + y = 1



Let XX and YY be continuous random variables with joint pdf f(x,y)=4xyf(x,y)=4xy for 0<x<10<x<1 and 0<y<10<y<1 (zero elsewhere). Are XX and YY independent?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

The figure shows the triangular support 0<x<y<10<x<y<1 of a joint density of the form f(x,y)=kxyf(x,y)=kxy on that triangle (zero elsewhere). Although kxykxy looks like a product of a function of xx and a function of yy, are XX and YY independent?

The shaded triangle is the support 0 \lt x \lt y \lt 1 of a joint density f(x,y)=kxy; its slanted edge is the line y=x. The red dashed line is x+y=1, drawn for reference when integrating over a region defined by a function of X and Y; it meets the edge y=x at (0.5,0.5). Axis scales are equal, with one unit spanning the same length on both axes.

The shaded triangle is the support 0<x<y<10 \lt x \lt y \lt 1 of a joint density f(x,y)=kxyf(x,y)=kxy; its slanted edge is the line y=xy=x. The red dashed line is x+y=1x+y=1, drawn for reference when integrating over a region defined by a function of XX and YY; it meets the edge y=xy=x at (0.5,0.5)(0.5,0.5). Axis scales are equal, with one unit spanning the same length on both axes.

Support of the joint density and the reference line x + y = 1

Support of the joint density and the reference line x + y = 1

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

The joint probability mass function of discrete random variables XX (rows) and YY (columns) is given below.


Y=1

Y=2

X=0

0.10

0.20

X=1

0.15

0.30

X=2

0.05

0.20

Are XX and YY independent?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors