LOTUS for random vectors

To find the expected value of a function of two random variables, weight the function by their joint distribution. This is the law of the unconscious statistician, or LOTUS, applied to a random vector.


Evaluate the function at each possible pair, then combine those values using the pair’s probability or density. You do not need to derive the distribution of the function first.

Discrete joint outcomes

For discrete XX and YY, sum g(x,y)p(x,y)g(x,y)p(x,y) across the joint support: E[g(X,Y)]=∑(x,y)g(x,y)p(x,y)E[g(X,Y)]=\sum_{(x,y)}g(x,y)p(x,y). The joint mass p(x,y)p(x,y) belongs to its stated pair; swapping masses between pairs changes the expectation. Before calculating, check that all listed masses are nonnegative and sum to one.


If gg is nonnegative at every support point, its expectation cannot be negative. This sign check catches some arithmetic mistakes, although it does not establish that the weights were assigned correctly. For a product such as XYXY, include both coordinates when evaluating the function at each pair.

Continuous joint outcomes

For continuous variables, use the joint density f(x,y)f(x,y): E[g(X,Y)]=∬Sg(x,y)f(x,y) dx dyE[g(X,Y)]=\iint_S g(x,y)f(x,y)\,dx\,dy, where SS is the supported region. Sketch the inequalities defining that region before setting integration limits. For a triangular region, one variable’s allowed interval changes with the other variable.


Check that the density integrates to one over the same region used for the expectation. A rectangular integral over a triangle would include impossible pairs and change the result. The density factor must remain in the integrand even when it is a constant.

Worked example

Suppose (X,Y)(X,Y) takes (0,0)(0,0), (0,3)(0,3), (2,0)(2,0), and (2,3)(2,3) with masses 0.150.15, 0.350.35, 0.250.25, and 0.250.25. They sum to one. For g(x,y)=xy+yg(x,y)=xy+y, the two pairs with y=0y=0 contribute zero, while the others give 0.35(3)+0.25(9)=1.05+2.25=3.30.35(3)+0.25(9)=1.05+2.25=3.3. Each contribution comes from the function value and the probability of that exact pair.



The joint probabilities at (X,Y) = (1,0), (1,2), (3,0), and (3,2) are 0.10, 0.20, 0.30, and 0.40. What is E[XY]?

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

A joint density is f(x,y) = 2 on 0 < y < x < 1 and zero elsewhere. What is E[Y]?

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

For binary X and Y, P(0,0) = 0.40, P(0,1) = 0.10, P(1,0) = 0.10, and P(1,1) = 0.40. What is E[(X − Y)²]?

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