This blog post comes from AP Stats guru Daren Starnes. Daren has taught AP Statistics since the course launched in 1996-97. He has served as a reader, table leader, and question leader for the AP Statistics exam for 20 years. Daren has led over 200 workshops for statistics teachers, both online and in-person. He is also lead author of two popular statistics textbooks.

In Algebra, x + x = 2x. Does a similar result hold in Statistics? That is, if X is a random variable, does X + X = 2X? Let’s investigate with a simple game of roulette.

An American roulette wheel has 38 slots numbered 1 through 36, plus 0 and 00. Half of the slots from 1 to 36 are red; the other half are black. Both the 0 and 00 slots are green. Suppose that a player places a $1 bet on red. If the ball lands in a red slot, the player gets the original dollar back, plus an extra dollar for winning the bet. If the ball lands in a different-colored slot, the player loses the $1 bet. Let X = the player’s profit on a single $1 bet on red. Because there is an 18/38 chance that the ball lands in a red slot, the probability distribution of X is as shown in the table.

The random variable X has mean

Interpretation: The player is expected to lose about 5 cents, on average, when placing a $1 bet on red in a game of roulette. (And the casino expects to win about 5 cents per game from such a player.)

The standard deviation of X is

Interpretation: The player’s profit when placing a $1 bet on red in a game of roulette typically varies by about $1 from the expected loss of 5 cents.

## Combining Random Variables: X + X

Suppose a gambler plays two games of roulette, each time placing a $1 bet on red. What can we say about the player’s total profit in two games, X + X?

If the player wins both games, the total profit is $1 + $1 = $2. The probability that happens is (18/38)(18/38) = 0.2244, since the outcomes of individual games are independent.

If the player loses both games, the total profit is −$1 + −$1 = −$2. The probability that happens is (20/38)(20/38) = 0.2770.

If the player wins one game and loses the other, the total profit is $1 + −$1 = $0. There are two ways this can happen—win then lose or lose then win—so the probability is (18/38)(20/38) + (20/38)(18/38) = 0.4986.

Here is the probability distribution of X + X.

The player’s expected profit in two games is

The standard deviation of X + X is

Interpretation: The player’s total profit when placing a $1 bet on red in two games of roulette typically varies by about $1.41 from the expected loss of 10.5 cents.

Note that the mean of X + X can also be found as follows:

Is there a similar shortcut for finding the standard deviation of X + X? Only if the two X’s are independent random variables. That is the case here because knowing the player’s profit from one game tells us nothing about the player’s profit from the other game. Here’s the result we need:

When we add (or subtract) independent random variables, their variances add.

So the variance of X + X can be found as follows:

(This result is sometimes called the “Pythagorean Theorem of Statistics”.)

The standard deviation of X + X is

## Transforming Random Variables: 2X

What happens if the gambler places a $2 bet on red in a single game of roulette? Because the random variable X represents a player’s profit from a $1 bet, the random variable 2X represents the player’s profit from a $2 bet. The probability distribution of 2X is

The player’s expected profit from a single $2 bet on red is

That’s the same as the player’s expected profit from a $1 bet on red in two games of roulette. So when it comes to means,

The standard deviation of 2X is

Interpretation: The player’s total profit when placing a $2 bet on red in a game of roulette typically varies by about $2 from the expected loss of 10.5 cents.

Notice that the mean of 2X can also be found as follows:

And the standard deviation of the player’s profit from a single $2 bet can be calculated as

Note that the variability in the player’s profit when placing a single $2 bet on red (SD = $1.9972) is much larger than the variability in the player’s profit when placing two $1 bets on red (SD = $1.412). So when it comes to standard deviation,