Two variables at once
The topic Expectation and variance summarized one random variable with a few numbers. Linearity already let us add expectations, , without asking how and are related. Variance is less forgiving. Whether two errors tend to strike together decides how much their sum varies. To see that, we need to describe several variables at once.
Roll two fair dice. Let be the first die and the larger of the two. The joint distribution of gives the probability of every pair of values. For discrete variables it is the joint pmf
a table with one cell per pair of values. The cells are nonnegative and sum to 1.
Each of the 36 equally likely rolls lands in the cell . A cell with gets one roll, the one where the second die shows , so it holds . A diagonal cell gets every roll where the second die shows at most , so it holds . A cell with gets nothing.
For continuous variables the table becomes a joint density on the plane, with total volume 1 under its surface. Probabilities are volumes over a region :
A double integral is computed one variable at a time: integrate over with fixed, then over . As in one dimension, a density is not a probability and can exceed 1. A point uniform in the square has density 4 there, since the square's area is .