Sum vs difference of random variables
By Jude Wallis · Published
For a sum, the means add: . For a difference, the means subtract: . When X and Y are independent, the variances add in both cases, so the sum and the difference have the same standard deviation, .
This page is general statistics background. The Fall 2026 AP Statistics course has no topic on sums and differences of random variables: the College Board revisions page lists combining random variables, topic 4.9 of the old course, among the topics removed. The idea of adding variances still explains the standard deviation formulas for a difference of two sample proportions (topic 3.9) and a difference of two sample means (topic 4.6).
Sum vs difference of random variables: the short answer
Adding or subtracting two random variables creates a new random variable with its own mean and standard deviation. Two rules give them.
- Means follow the operation. The mean of is , and the mean of is .
- Variances always add, as long as and are independent. The variance of and the variance of are both .
So a sum and a difference of the same two independent variables differ in center and match in spread. The only sign that changes between the two cases is the one in the mean.
The sum of two random variables
Let and be random variables and let . The mean of the sum is the sum of the means:
This rule holds for any two random variables, independent or not.
If and are independent, the variance of the sum is the sum of the variances:
Standard deviations do not add. If and , the standard deviation of the sum is , which is less than . The sum varies less than the two standard deviations added together because a high value of one variable is often offset by a low value of the other.
The difference of two random variables
Let . The mean of the difference is the difference of the means, in the same order:
If and are independent, the variance of the difference is still the sum of the variances:
The plus sign is correct. Subtracting a variable does not cancel its variability. The difference is large when is high and is low, and small when is low and is high, so the uncertainty in widens the range of the difference just as it widens the range of the sum. Formally, is , and multiplying by multiplies its variance by .
The order of subtraction matters for the mean and not for the spread. has mean and the same standard deviation as .
The differences side by side
| Feature | Sum, | Difference, |
|---|---|---|
| Mean | ||
| Mean rule needs independence | No | No |
| Variance (independent) | ||
| Standard deviation (independent) | ||
| Order of the variables | Does not matter | Changes the sign of the mean |
| Typical question | Total of two quantities | Gap between two quantities, or which is larger |
| With means 25 and 30, SDs 4 and 3 | Mean 55, SD 5 | Mean for , SD 5 |
One more fact is useful for probability calculations: if and are independent and each is normally distributed, then and are also normally distributed, with the means and standard deviations given above.
When to use which
Use a sum when the question is about a total: the combined time for two legs of a trip, the total weight of two packages, the total score on two sections.
Use a difference when the question compares two quantities: how much longer one task takes than another, or the probability that one variable exceeds the other. "Find the probability that is greater than " becomes "find ", a question about a single random variable.
Check independence before using the variance rule. Two measurements on unrelated individuals are usually independent. Two measurements on the same individual often are not. If the variables are not independent, the mean rules still work and the variance rule cannot be relied on.
Adding two independent copies of a variable is also different from doubling one copy. For independent and with the same distribution, has standard deviation . The variable has standard deviation , by the rule for a linear transformation of a random variable.
The classic mix-up and how to avoid it
The most common error is subtracting variances for a difference. With and , the standard deviation of is . Subtracting gives , which is wrong, and with the variables in the other order the same mistake would put a negative number under the square root.
The second error is adding standard deviations directly: . Convert each standard deviation to a variance by squaring, add the variances, then take one square root at the end.
The third error is using the variance rule without independence. The rule is guaranteed only for independent variables.
A working routine avoids all three: write the two means and combine them with the sign in the question, square the two standard deviations, add them with a plus sign, and take the square root. The reason for squaring is covered in standard deviation vs variance.
Total commute time and the gap between two commutes
A worker's morning commute time X is normal with mean 25 minutes and standard deviation 4 minutes. The evening commute time Y is normal with mean 30 minutes and standard deviation 3 minutes. Assume X and Y are independent. Find the mean and standard deviation of the total daily commute and of the difference Y minus X. Then find the probability that the evening commute is shorter than the morning commute.
Mean of the total: minutes.
Variance of the total, using independence: , so minutes.
Mean of the difference : minutes.
Variance of the difference: variances still add, so and minutes, the same as for the total.
Translate the question. The evening commute is shorter when , which is .
Because and are independent and normal, is normal with mean 5 and standard deviation 5. Standardize: .
The area to the left of is .
The total commute has mean 55 minutes and standard deviation 5 minutes. The difference has mean 5 minutes and standard deviation 5 minutes. The probability that the evening commute is shorter than the morning commute is .
Two tickets, one ticket doubled, and a difference
A raffle ticket's payout has mean 3 dollars and standard deviation 6 dollars. Find the mean and standard deviation of the total payout of two independent tickets, of the payout of one ticket counted twice, and of the difference in payout between two independent tickets.
Two independent tickets, . Mean: dollars.
Variance: , so the standard deviation is dollars.
One ticket doubled, . Mean: dollars. Standard deviation: dollars, because multiplying a variable by 2 multiplies its standard deviation by 2.
Compare. Both have mean 6 dollars, and the standard deviations are about 8.49 dollars and 12 dollars. Two separate tickets can offset each other, and one ticket counted twice cannot.
Difference of two independent tickets, . Mean: dollars.
Variance of the difference: , so the standard deviation is dollars, the same as for the sum.
Two independent tickets: mean 6 dollars, standard deviation about 8.49 dollars. One ticket doubled: mean 6 dollars, standard deviation 12 dollars. Difference of two independent tickets: mean 0 dollars, standard deviation about 8.49 dollars.
Frequently asked questions
Why do you add variances when subtracting random variables?
Because the variability of each variable adds uncertainty to the result, whether you add or subtract. The difference equals , and multiplying by leaves its variance unchanged, so the variances add for independent variables.
Can I add standard deviations instead of variances?
No. For independent variables the variances add, and the standard deviation is the square root of that total. With standard deviations 4 and 3, the combined standard deviation is . Adding directly would give 7, which is too large.
Do the rules work if the variables are not independent?
The mean rules do: means add for a sum and subtract for a difference in every case. The variance rule does not. Adding variances is guaranteed only when the two random variables are independent; without independence it can give the wrong answer.