AP Statistics Audio Lectures
Transformations of Random Variables
by Arnold Kling

To hear the lecture, click here.

In probability, we work a lot with transformations of random variables. These include a linear transformation of one random variable (Y = a + bX) as well as sums of two or more random variables (W = X + Y).

For example, a waiter earns money based on the amount that people spend at his tables, which is a random variable. Let the amount that they spend be X. If he gets $20 a night in base pay plus 20 percent in tips, then his income Y = $20 + 0.2X.

If X is the amount that one table spends and Y is the amount that another table spends, then the total of both tables, W, is X + Y.

Adding a constant to a random variable or distribution changes the mean but not the standard deviation. You move the center, but everything else moves along with it. If you raised the waiter's base pay by $5, his mean would go up but his standard deviation would not change. He gets $5 more every night.

Let X be the original random variable, let Y be the transformed variable, and let a be a constant. Then if Y = X + a, then

mY = mX + a

sY = sX

So, if you add 10 degrees to the temperature in DC every day, the mean would be 10 degrees higher but the variance and standard deviation would not change.

Multiplying a constant times a random variable changes the mean and the standard deviation. If Y = bX, then

mY = bmX

sY = bsX

In general, if Y = a + bX, then

mY = a + bmX

sY = bsX

So, if X is the amount that gets spent at the waiter's tables, then

Y = $20 + 0.2X

mY = $20 + 0.2mX

sY = 0.2sX

The Sum of Two Random Variables

If W = X + Y, then

mW = mX + mY

sW = SQRT(s2X + s2Y + 2 sXY)

Note that we cannot simply add the standard deviations of X and Y to get the standard deviation of W. We have to take the square root of the variances, including the covariance term sXY. Covariance will be explained next semester.

Note the resemblance to FOIL (X+Y)2 = (X+Y)(X+Y)

In many problems, it is given that X and Y are independent, so that covariance is zero. In that case

sW = SQRT(s2X + s2Y) (only if X and Y are independent)

Suppose our waiter has four tables, each with a mean spending of $100 and a standard deviation of $20. Assume that spending on the four tables is independent. Then for the total amount spent, we have

mean = $100 + $100 + $100 + $100 = $400

standard deviation = SQRT(400 + 400 + 400 + 400) = $40

Summary

When X is a random variable, and Y = a + bX, we have

mY = a + bmX

sY = bsX

When X and Y are random variables, and W = X + Y, we have

mW = mX + mY

sW = SQRT(s2X + s2Y + 2 sXY)

sW = SQRT(s2X + s2Y) (only if X and Y are independent)