| Study Guides
AP · Combining Random Variables · 14 min read · Updated 2026-05-10

Combining Random Variables — AP Statistics Study Guide

For: AP Statistics candidates sitting AP Statistics.

Covers: Linear transformations of single random variables, addition/subtraction of independent random variables, expected value rules, variance rules for linear combinations, standard deviation properties, and covariance effects for dependent variables.

You should already know: Basic definition of random variables. Expected value and variance for single random variables. Properties of independent events.

A note on the practice questions: All worked questions in the "Practice Questions" section below are original problems written by us in the AP Statistics style for educational use. They are not reproductions of past College Board / Cambridge / IB papers and may differ in wording, numerical values, or context. Use them to practise the technique; cross-check with official mark schemes for grading conventions.


1. What Is Combining Random Variables?

Combining random variables means creating a new random variable from one or more existing random variables, a common scenario in real-world statistics where we aggregate measurements, adjust for fixed costs, or compare outcomes across groups. For example, if is the waiting time for a customer at a café and is the time to receive their order, total visit time is the combination .

Notation for a general linear combination of random variables is , where and are fixed non-random constants. According to the AP Statistics Course and Exam Description (CED), this topic makes up ~12% of Unit 4, translating to 2-4% of the total AP exam score. It appears in both MCQ (as standalone calculation questions or part of larger sets) and FRQ, where it is frequently paired with normal distributions to calculate probabilities of combined outcomes. This topic is a critical bridge between basic probability for single variables and inferential statistics that relies on aggregating multiple sample results.

2. Expected Value of Linear Combinations and Transformations

A linear transformation of a single random variable is a shift and scale of the original variable, written as , where and are constants. For multiple random variables, a linear combination is any weighted sum of individual random variables. The key rule for expected value is extremely general: it holds regardless of whether the random variables are independent or dependent—no exceptions for dependence.

The core formulas are: For a single linear transformation: For a general linear combination of multiple random variables:

Intuition: Expected value is a measure of the average outcome. If every possible value of is scaled by and shifted by , the average outcome will follow the same scaling and shift. This linearity does not depend on relationships between variables, so even if two variables are strongly correlated, the expected value of their sum is still the sum of their expected values.

Worked Example

A food truck sells burritos and tacos. Let = profit from a randomly selected burrito, with . Let = profit from a randomly selected taco, with . On a Saturday shift, the owner pays in fixed costs for ingredients and labor. Write the total profit for a shift with 30 burritos and 45 tacos, then calculate .

  1. First, write the linear combination for total profit: total revenue from 30 burritos is , total revenue from 45 tacos is , so subtract fixed costs to get .
  2. Apply the linear expected value rule: .
  3. Substitute the known expected values: .
  4. Confirm logic: Even though burrito and taco sales may be dependent (high burrito sales may lead to higher taco sales), the expected value rule still holds, so no adjustment is needed.

Exam tip: On the AP exam, if you are only asked for an expected value of a combination, never add an "if independent" condition unless the question also asks for variance. The expected value rule applies to all combinations, independent or not.

3. Variance of Linear Combinations (Independent Random Variables)

Unlike expected value, the simple rule for variance of a combination only applies when all random variables are independent. Dependence introduces a covariance term that is not tested on the AP exam, so you will only ever be asked to calculate variance for independent variables on the exam.

For a linear transformation of a single variable : adding a constant shifts the entire distribution but does not change the spread, so disappears from the variance formula. Multiplying by scales all outcomes by , and since variance is measured in squared units, variance scales by . The general formula for independent variables extends this logic to multiple variables: each term's variance is scaled by the square of its coefficient, then all scaled variances are added.

Core formulas: For a linear transformation: For a linear combination of independent random variables: To get standard deviation after calculating variance, take the square root of the total variance: .

Worked Example

For the food truck example above, we know (standard deviation of profit per burrito) and (standard deviation of profit per taco). Assume unit profit for burritos and tacos is independent. Calculate the standard deviation of total profit .

  1. First, convert given standard deviations to variances: , .
  2. Apply the variance rule for independent variables: the constant term does not affect variance, so .
  3. Calculate the total variance: .
  4. Take the square root to get standard deviation: .
  5. Confirm: The fixed cost does not change the spread of possible profit values, so it correctly does not appear in the variance calculation.

Exam tip: Always calculate variance first when asked for the standard deviation of a combination. Never multiply original standard deviations directly by coefficients; you must work through variance first to apply the squared coefficient rule.

4. Differences of Independent Random Variables

A difference between two independent random variables is one of the most commonly tested combinations on the AP exam, appearing in problems comparing two groups, products, or treatments. Many students make predictable errors on this type of problem because of confusion around the negative sign.

Derived from the general rules above, the formulas for a difference of independent random variables are:

Intuition: For variance, the negative sign on means the coefficient is , and , so we still add the variances. Variation does not cancel out when you take a difference: if can vary by and can vary by , the difference can vary by up to , so total variation is higher than variation of either variable alone, not lower.

Worked Example

A coffee shop roasts two blends of coffee: light roast and dark roast. The weight of a 12-oz bag of light roast, , has mean 12 oz and standard deviation 0.15 oz. The weight of a 12-oz bag of dark roast, , has mean 12.1 oz and standard deviation 0.12 oz. Let be the difference in weight between a randomly selected light roast bag and a randomly selected dark roast bag. Assume and are independent. Find the mean and standard deviation of .

  1. Calculate the expected value of : oz. This means on average, a light roast bag is 0.1 oz lighter than a dark roast bag.
  2. Convert standard deviations to variances: , .
  3. Calculate variance of using the difference rule: .
  4. Calculate standard deviation: oz.
  5. Confirm: We did not subtract from , which would be the most common error on this problem.

Exam tip: When you see a difference of random variables on the AP exam, immediately double-check that you added the variances, not subtracted. Over 90% of student errors on difference questions come from incorrectly subtracting variance.

5. Common Pitfalls (and how to avoid them)

  • Wrong move: Calculating as , or as . Why: Students confuse linear scaling for expectation with linear scaling for variance, forgetting variance scales with the square of the coefficient. Correct move: Always square the constant coefficient when calculating variance: , then take the square root to get standard deviation.
  • Wrong move: Calculating as . Why: Intuition suggests subtraction in the combination leads to subtraction of variance, but the negative coefficient gets squared so variance adds. Correct move: For any difference of independent random variables, always add the individual variances, regardless of the negative sign on the second variable.
  • Wrong move: Calculating variance of a combination of dependent variables using the sum of rule. Why: Students forget the simple variance rule only applies to independent variables, and use it even when the question states variables are dependent. Correct move: The AP exam never asks you to calculate variance of a combination of dependent variables (covariance is not tested), so if you are asked for variance, you can assume variables are independent unless explicitly stated otherwise.
  • Wrong move: Including the constant term in the variance calculation for . Why: Students carry the constant through from the expected value calculation and accidentally include it in variance. Correct move: Remember that adding a constant shifts the entire distribution without changing spread, so constants do not affect variance or standard deviation at all.
  • Wrong move: Adding individual standard deviations directly to get the standard deviation of the sum: . Why: Students skip the variance step and add standard deviations, which is never correct for independent variables. Correct move: Always add variances first, then take the square root of the total variance to get the combined standard deviation.

6. Practice Questions (AP Statistics Style)

Question 1 (Multiple Choice)

A biologist measures the length of two types of wild fish: small minnows () and large trout (). The length of a single minnow has mean 12 cm and standard deviation 4 cm. The length of a single trout has mean 45 cm and standard deviation 8 cm. The biologist calculates the total length for a sample with 2 minnows and 1 trout. Assuming all fish lengths are independent, what is the standard deviation of ? A) 11.31 cm B) 16.00 cm C) 9.80 cm D) 128.00 cm

Worked Solution: For independent random variables, variance of a linear combination equals the sum of squared coefficients times individual variances. First, calculate variances: , . Next, apply the variance rule: . Take the square root to get standard deviation: . The correct answer is A.


Question 2 (Free Response)

A small business sells custom printed t-shirts online. For a single customer order, let = number of t-shirts ordered, which has mean 2.1 t-shirts and standard deviation 0.8 t-shirts. The business makes a profit of per t-shirt, plus a fixed profit per order from shipping markup. Let = total profit per order.

(a) Write as a linear function of , then calculate the expected value of . (b) Calculate the standard deviation of per order. Show your work. (c) The business owner pays 10% of total profit per order to the graphic designer, so net profit for the business per order is . How do the mean and standard deviation of compare to the mean and standard deviation of the original total profit ? Justify your answer using linear transformation rules.

Worked Solution: (a) is 6 dollars per t-shirt plus 2 dollars fixed profit, so the linear function is . Applying the expected value rule: . The expected total profit per order is . (b) First, calculate variance of : . The variance of is . Take the square root to get standard deviation: . The standard deviation of total profit per order is . (c) is a linear transformation with and . The mean of is , which is 10% lower than the mean of . The variance of is , so , which is also 10% lower than the standard deviation of . Scaling a random variable by a positive constant scales both the expected value and standard deviation by that constant.


Question 3 (Application / Real-World Style)

A car parts manufacturer produces pistons for gasoline engines. The diameter of the piston, , has mean 10 cm and standard deviation 0.02 cm. The diameter of the cylinder that holds the piston, , has mean 10.04 cm and standard deviation 0.03 cm. The clearance between the piston and cylinder is defined as . Assume piston and cylinder diameters are independent. Calculate the mean and standard deviation of clearance .

Worked Solution:

  1. Apply the expected value rule for differences: cm.
  2. Convert standard deviations to variances: , .
  3. For independent variables, variance of the difference is the sum of variances: .
  4. Calculate standard deviation: cm.

In context: On average, the clearance between a randomly selected piston and cylinder is 0.04 cm, with a typical deviation from the mean of approximately 0.036 cm.

7. Quick Reference Cheatsheet

Category Formula Notes
Expected Value of Linear Transformation Holds for any , regardless of independence
Expected Value of Linear Combination Holds for all random variables, independent or dependent
Variance of Linear Transformation Constant does not affect variance (does not change spread)
Variance of Linear Combination (Independent) Only valid for independent random variables
Mean of Difference (Independent) Same as general linear combination rule
Variance of Difference (Independent) Always add variances, even for a difference
Standard Deviation of Combination Always calculate variance first, then take the square root

8. What's Next

Combining random variables is the foundational prerequisite for the next core topic in Unit 4: sampling distributions of sample means and differences of sample means. When you calculate the mean of a sample of independent observations, you are creating a linear combination of independent random variables, so the rules you learned here directly give the mean and standard error of the sampling distribution. Without mastering these combination rules, you cannot correctly calculate standard error, which is the foundation for all confidence intervals and hypothesis tests later in the course. This topic also enables the study of combined normal distributions, a common FRQ topic that requires calculating probabilities for combined outcomes.

Follow-on topics to study next:

← Back to topic

Stuck on a specific question?
Snap a photo or paste your problem — Ollie (our AI tutor) walks through it step-by-step with diagrams.
Try Ollie free →