Mathwords logoMathwords

Joint Probability Distribution — Definition, Formula & Example

A joint probability distribution is a single table or function that gives the probability (or, for continuous variables, the probability density) of every combination of values that two or more random variables can take together. It shows how the variables behave jointly, not just one at a time.

For discrete random variables XX and YY, the joint probability mass function is pX,Y(x,y)=P(X=x, Y=y)p_{X,Y}(x,y) = P(X = x,\ Y = y), where pX,Y(x,y)≥0p_{X,Y}(x,y) \ge 0 and ∑x∑ypX,Y(x,y)=1\sum_x \sum_y p_{X,Y}(x,y) = 1. For jointly continuous XX and YY, a joint density fX,Y(x,y)≥0f_{X,Y}(x,y) \ge 0 satisfies P((X,Y)∈A)=∬AfX,Y(x,y) dx dyP\big((X,Y) \in A\big) = \iint_A f_{X,Y}(x,y)\,dx\,dy for every region AA, and its integral over the whole plane equals 1.

Key Formula

pX(x)=∑ypX,Y(x,y),pY(y)=∑xpX,Y(x,y)p_X(x) = \sum_{y} p_{X,Y}(x,y), \qquad p_Y(y) = \sum_{x} p_{X,Y}(x,y)
Where:
  • pX,Y(x,y)p_{X,Y}(x,y) = Joint probability that X = x and Y = y at the same time
  • pX(x)p_X(x) = Marginal probability that X = x, found by summing a row of the joint table
  • pY(y)p_Y(y) = Marginal probability that Y = y, found by summing a column of the joint table

Worked Example

Problem: At a bakery, let X=1X = 1 if a customer buys a drink and X=0X = 0 if not, and let YY be the number of muffins bought (0, 1, or 2). The joint distribution is: p(0,0)=0.10p(0,0) = 0.10, p(0,1)=0.20p(0,1) = 0.20, p(0,2)=0.10p(0,2) = 0.10, p(1,0)=0.20p(1,0) = 0.20, p(1,1)=0.30p(1,1) = 0.30, p(1,2)=0.10p(1,2) = 0.10. Verify that the table is valid, find the marginal distribution of YY, and decide whether XX and YY are independent.
Step 1: Every entry is between 0 and 1. Check that the six entries sum to 1.
0.10+0.20+0.10+0.20+0.30+0.10=1.000.10 + 0.20 + 0.10 + 0.20 + 0.30 + 0.10 = 1.00
Step 2: Sum each column over both values of XX to get the marginal of YY. Summing rows the same way gives P(X=0)=0.40P(X=0) = 0.40 and P(X=1)=0.60P(X=1) = 0.60.
P(Y=0)=0.10+0.20=0.30,P(Y=1)=0.20+0.30=0.50,P(Y=2)=0.10+0.10=0.20P(Y=0) = 0.10 + 0.20 = 0.30,\quad P(Y=1) = 0.20 + 0.30 = 0.50,\quad P(Y=2) = 0.10 + 0.10 = 0.20
Step 3: Independence requires p(x,y)=pX(x) pY(y)p(x,y) = p_X(x)\,p_Y(y) for every cell. One failing cell is enough to rule it out.
P(X=0) P(Y=0)=0.40×0.30=0.12≠0.10=p(0,0)P(X=0)\,P(Y=0) = 0.40 \times 0.30 = 0.12 \ne 0.10 = p(0,0)
Answer: The table is a valid joint distribution. The marginal of YY is P(Y=0)=0.30P(Y=0) = 0.30, P(Y=1)=0.50P(Y=1) = 0.50, P(Y=2)=0.20P(Y=2) = 0.20. Because p(0,0)=0.10≠0.12p(0,0) = 0.10 \ne 0.12, XX and YY are not independent.

Why It Matters

In a college probability or statistics course, you compute E[XY]E[XY], covariance, and correlation directly from a joint distribution. The same idea powers regression and the probabilistic models used in machine learning, where many variables are modeled together.

Common Mistakes

Mistake: Rebuilding the joint table by multiplying the two marginal distributions.
Correction: Many different joint distributions share the same marginals. The product rule gives the joint only when the variables are independent. In the bakery example it predicts 0.120.12 for p(0,0)p(0,0), but the true value is 0.100.10.

Related Terms