myLearning

Topic 4 of 7

Step 22: Probability theory

Joint distributions

Step 22 · Probability theory topics

Describe two random variables together with a joint table or density, recover each one's own distribution, condition one on the other, and test for independence.

Joint tables and densities

The joint distribution of X and Y gives the probability of every pair of values: a table p(x, y) for discrete variables, or a density f(x, y) whose volume over a region is the probability of landing there.

JointY = 0Y = 1Y = 2
X = 00.10.20.1
X = 10.20.30.1

Example: Reading the table

Using the table, find P(X = 1, Y ≥ 1).

  1. Add the cells for (1, 1) and (1, 2): 0.3 + 0.1.

Answer0.4

Example: A joint density

f(x, y) = x + y on the unit square. What is P(X ≤ 0.5, Y ≤ 0.5)?

  1. ∫00.5∫00.5(x+y) dy dx\int_{0}^{0.5}\int_{0}^{0.5} (x + y)\,dy\,dx.
  2. Each of the two terms gives 0.0625, so the total is 0.125.

Answer0.125

Marginal and conditional distributions

The marginal distribution of X ignores Y: add across each row, or integrate y out. The conditional distribution of Y given X = x divides the joint by the marginal of X.

pX(x)=∑yp(x,y)p(y∣x)=p(x,y)pX(x)p_X(x) = \sum_y p(x, y) \qquad p(y \mid x) = \frac{p(x, y)}{p_X(x)}

Example: Marginals

From the table, find P(X = 1) and P(Y = 1).

  1. Row X = 1: 0.2 + 0.3 + 0.1 = 0.6.
  2. Column Y = 1: 0.2 + 0.3 = 0.5.

Answer0.6 and 0.5

Example: Conditional

Find the distribution of Y given X = 0.

  1. Row X = 0 holds 0.1, 0.2 and 0.1, adding to 0.4.
  2. Divide each by 0.4.

AnswerP(Y = 0, 1, 2 | X = 0) = 0.25, 0.5 and 0.25

Example: A conditional expected value

Find E(Y | X = 0).

  1. Weight each value of Y by its conditional chance: 0 × 0.25 + 1 × 0.5 + 2 × 0.25.

Answer1

Independence

X and Y are independent when, for every pair, the joint probability is the product of the marginals: p(x,y)=pX(x) pY(y)p(x, y) = p_X(x)\,p_Y(y). Then knowing X tells you nothing about Y.

Example: Testing the table

Are X and Y in the table independent?

  1. P(X = 0) = 0.4 and P(Y = 0) = 0.3, so independence needs P(0, 0) = 0.12.
  2. The table says 0.1.

AnswerNo

Example: A product density

f(x, y) = 4xy on the unit square. Are X and Y independent?

  1. It splits as 2x times 2y, each a density on [0, 1].
  2. And the region is a rectangle.

AnswerYes

Try it yourself

Work each one on paper first, then open the answer to check.

  1. Using the table, find P(Y = 2).

    Show answer

    0.2

  2. Using the table, find P(X = 0 | Y = 2).

    Show answer

    0.5

  3. All the probabilities in a joint table must add to what?

    Show answer

    1

  4. X and Y are independent with P(X = 1) = 0.3 and P(Y = 1) = 0.5. What is P(X = 1, Y = 1)?

    Show answer

    0.15

  5. f(x, y) = 6x²y on the unit square. What is the marginal density of X?

    Show answer

    3x²

  6. (X, Y) has density 2 on the triangle 0 ≤ y ≤ x ≤ 1. Are X and Y independent?

    Show answer

    No: the region is not a rectangle, so knowing X limits Y

What next?