Cambridge 9709 · Mathematics (9709) A2 · Chapter 29 · S2 - Linear Combinations of Random Variables

S2: Linear Combinations of Random Variables

Summarized revision notes, free to read. Sit the matching past papers in any Paperverse world when you are done.

Introduction

Hey there! Ever wondered what happens when you mix different random events together? Like, what's the average total weight of groceries in two shopping bags, or the difference in scores between two friends in a game? That's exactly what we're diving into in this chapter! We'll start by figuring out the new mean (expectation) and variance when we add, subtract, or scale random variables. Then, we'll uncover a super important rule about how variance behaves when we combine independent variables (spoiler: it's a bit unexpected!). Finally, we'll see how the awesome properties of the Normal distribution make combining Normal variables incredibly straightforward. Get ready to level up your stats game! 🚀

Expectation and Variance of Linear Transformations6.2

Alright, let's talk about transforming our random variables. Think of it like putting a filter on a Snapchat pic – you're taking the original data and changing it in a consistent way. In math, we call this a linear combination, which looks like $Y = aX + b$. Here, $X$ is our original random variable (like the number of hours you work), and $Y$ is the new, transformed variable (like your weekly pay).<br><br>The 'b' part is a shift. It's like adding 5 points to everyone's test score because the first question was unfair. The whole dataset just slides up or down the number line. This changes the average, of course, but does it change how spread out the scores are? Nope! The gap between the top score and the bottom score is still the same. That's the key intuition here.<br><br>The 'a' part is a scaling. This is like your boss deciding to double your hourly wage (we wish!). This stretches or squishes your data. It definitely changes the average, but it also changes the spread. If your hours vary, doubling the pay rate will make the difference between a good week's pay and a bad week's pay much larger.<br><br>A simple graph with three panels. Panel 1 shows a basic dot plot for a random variable X. Panel 2 shows the same dots all shifted to the right, labelled 'Shift: X+b'. Panel 3 shows the original dots stretched further apart from the mean, labelled 'Sc<br><br>So, how does this affect our stats? The rules are super slick:<br>1. Expectation (The Mean): $E(aX + b) = aE(X) + b$. This makes perfect sense. The average value gets scaled by 'a' AND shifted by 'b'. It's affected by both moves.<br>2. Variance (The Spread): $Var(aX + b) = a^2Var(X)$. Notice anything missing? The 'b' is gone! The shift doesn't affect the spread, so we ignore it. The scaling factor 'a' is squared because variance is measured in squared units. Remember, standard deviation is the square root of variance, so $SD(aX+b) = |a|SD(X)$. When you square that to get back to variance, you get $a^2Var(X)$. Easy peasy!

Worked Example: Calculating Weekly Earnings6.2

Problem The number of hours, $X$, a student works per week at a streaming service's call centre is a random variable with an expectation $E(X) = 12$ and a variance $Var(X) = 5$. The student earns £11 per hour but has fixed weekly travel costs of £15. Let $Y$ be the student's weekly profit. Find the expectation and variance of $Y$.

Step 1 First, let's identify the information we're given for our original random variable, $X$ (the hours worked). $$E(X) = 12 \text{ hours} \\ Var(X) = 5 \text{ hours}^2$$

Step 2 Now, we need to set up the linear equation for the weekly profit, $Y$. The student earns £11 for every hour ($11X$) and then has a fixed cost of £15 ($-15$). This gives us the form $Y = aX+b$. $$Y = 11X - 15 \\ \text{So, } a=11 \text{ and } b=-15$$

Step 3 Let's find the expected profit, $E(Y)$, using the rule $E(aX+b) = aE(X)+b$. We'll plug in our values for $a$, $b$, and $E(X)$. $$E(Y) = E(11X - 15) = 11E(X) - 15 \\ = 11(12) - 15 \\ = 132 - 15 = 117$$

Step 4 Next, we'll find the variance of the profit, $Var(Y)$, using the rule $Var(aX+b) = a^2Var(X)$. Remember, the shift (travel cost) doesn't affect the spread of the earnings! $$Var(Y) = Var(11X - 15) = 11^2Var(X) \\ = 121(5) \\ = 605$$

Step 5 Finally, let's state our answers clearly with the correct units. Expectation is in pounds, and variance is in pounds squared. $$\text{The expected weekly profit is £117.} \\ \text{The variance of the weekly profit is £}^2 605.$$

Variance of Linear Combinations of Independent Random Variables6.2

Alright, let's level up. You know what random variables are – things with unpredictable outcomes, like the number of likes on your next Insta post ($X$) or how many minutes you spend watching TikToks before starting homework ($Y$). The key word for this concept is independent. This just means the outcome of $X$ has zero effect on the outcome of $Y$. Your Insta likes don't change your TikTok habits. They're in their own lanes, unbothered.<br><br>Now, what happens when we combine them? Let's say we have a new variable, $T = aX + bY$. The big rule you need to lock in is: $$Var(aX + bY) = a^2Var(X) + b^2Var(Y)$$ This formula is your new best friend. Notice two epic things: First, the constants $a$ and $b$ get squared. This is because variance is measured in squared units (like $cm^2$), so any scaling factor has to be squared to match. Second, and this is the part that trips everyone up, we always add the resulting variances. A diagram showing two separate, moderately wide bell curves for Var(X) and Var(Y). A third bell curve for Var(X+Y) is shown to their right, which is visibly wider than the other two, illustrating that combining variables increases the total spread. Even if you're calculating the variance of a difference, like $Var(aX - bY)$, the formula is still $a^2Var(X) + b^2Var(Y)$. Why? Because variance is a measure of unpredictability or 'spread'. Whether you add two unpredictable things or find the difference between them, the total potential for variation only goes up. The chaos just stacks! So remember: square the constants, and always, always add the variances.

Worked Example: Calculating Variance and Standard Deviation6.2

Problem You work at a smoothie shack. The volume of juice in a 'Regular' smoothie, $R$, is a random variable with a standard deviation of 4 ml. The volume of juice in a 'Jumbo' smoothie, $J$, is a random variable with a standard deviation of 6 ml. The volumes are independent.<br>A customer orders 3 Regular smoothies and 2 Jumbo smoothies. Find the standard deviation of the total volume of juice required.

Step 1 First up, we need to find the variance for each smoothie type. Remember, variance is just the standard deviation squared ($Var(X) = (SD(X))^2$). We're given the standard deviations, so let's convert them. $$Var(R) = 4^2 = 16 \text{ ml}^2$$ $$Var(J) = 6^2 = 36 \text{ ml}^2$$

Step 2 Next, let's define our new random variable for the total volume, $T$. The customer wants 3 Regulars and 2 Jumbos, so our linear combination is $T = 3R + 2J$. $$T = 3R + 2J$$

Step 3 Now we apply the main formula: $Var(aX + bY) = a^2Var(X) + b^2Var(Y)$. In our case, $a=3$, $X=R$, $b=2$, and $Y=J$. We'll square the coefficients and add the resulting variances. $$Var(T) = Var(3R + 2J) = 3^2Var(R) + 2^2Var(J)$$

Step 4 Let's plug in the variance values we calculated in Step 1 and solve for $Var(T)$. $$Var(T) = (9 \times 16) + (4 \times 36)$$ $$Var(T) = 144 + 144 = 288$$

Step 5 The question asks for the standard deviation of the total volume, not the variance. So, the final step is to take the square root of our answer for $Var(T)$. Don't forget this last part! $$SD(T) = \sqrt{Var(T)} = \sqrt{288} \approx 16.97 \text{ ml (3 s.f.)}$$

The Distribution of Linear Combinations of Normal Variables6.2

Alright, let's talk about the ultimate team-up in stats: combining normal distributions. Think of it like a collab between your two favorite artists – when they get together, you get a whole new track that's still awesome. The big rule here is: if you take two independent normal random variables, let's call them $X$ and $Y$, and you mix them together in a linear combination like $aX + bY$, the result is also a normal distribution. It's like a superpower of the normal distribution! The 'independent' part is key – it means what happens with $X$ has zero effect on what happens with $Y$, like your gaming K/D ratio is independent of your friend's Snapchat story views.<br><br>So, if we have $X \sim N(\mu_X, \sigma_X^2)$ and $Y \sim N(\mu_Y, \sigma_Y^2)$, how do we figure out the new distribution for a variable like $W = aX + bY$? We just need its mean and variance.<br><br>1. The New Mean: The mean of the combination is just the combination of the means. Super intuitive. $$E(W) = E(aX + bY) = aE(X) + bE(Y) = a\mu_X + b\mu_Y$$ 2. The New Variance: This is where you gotta be careful. The variance of the combination is $$Var(W) = Var(aX + bY) = a^2Var(X) + b^2Var(Y) = a^2\sigma_X^2 + b^2\sigma_Y^2$$ Notice how the constants $a$ and $b$ get squared! Also, a massive trap alert 🚨: variances always add for independent variables, even if you're subtracting (like for $X - Y$, the variance would be $1^2\sigma_X^2 + (-1)^2\sigma_Y^2 = \sigma_X^2 + \sigma_Y^2$). Uncertainty always piles up! A diagram showing two bell curves for X and Y. Arrows combine their means to form the mean of a new, third bell curve for aX+bY. Another set of arrows show how their variances (with a^2 and b^2 multipliers) add up to create the variance of the new cu So, the final distribution is just $W \sim N(a\mu_X + b\mu_Y, a^2\sigma_X^2 + b^2\sigma_Y^2)$. Once you have this new normal distribution, you can solve problems just like you always do – by standardizing to find a Z-score and looking up the probability. You got this!

Worked Example: Probability of a Sum of Normal Variables6.2

Problem You work two part-time jobs. Your weekly pay from your cafe job, $C$, is normally distributed with a mean of £80 and a standard deviation of £10. Your pay from your weekend tutoring job, $T$, is independently normally distributed with a mean of £50 and a standard deviation of £8. What is the probability that your total pay in one week is more than £140?

Step 1 First, let's define a new variable for the total pay, $P = C + T$. Since $C$ and $T$ are independent normal variables, our total pay $P$ will also be normally distributed. Our mission is to find the mean and variance of $P$. $$C \sim N(80, 10^2) \text{ and } T \sim N(50, 8^2)$$

Step 2 Let's find the mean of our total pay, $E(P)$. This is straightforward – we just add the individual means together. $$E(P) = E(C + T) = E(C) + E(T) = 80 + 50 = 130$$

Step 3 Now for the variance, $Var(P)$. This is the tricky part! Remember to use variances (standard deviation squared), and for independent variables, variances always add. $$Var(P) = Var(C + T) = Var(C) + Var(T) = 10^2 + 8^2 = 100 + 64 = 164$$

Step 4 Awesome, we've got the mean and variance for our total pay. We can now state its full distribution. $$P \sim N(130, 164)$$

Step 5 Finally, we can solve the problem. We need to find $P(P > 140)$. We'll standardize this to a Z-score and then use our calculator or tables to find the probability. $$Z = \frac{X - \mu}{\sigma} = \frac{140 - 130}{\sqrt{164}} \approx 0.7809$$ $$P(P > 140) = P(Z > 0.7809) = 1 - \Phi(0.7809) = 1 - 0.7826 = 0.2174$$

Key Points to Remember

  • Expectation is linear! For any random variables $X$ and $Y$ and constants $a$ and $b$, we have $E(aX + bY) = aE(X) + bE(Y)$.
  • For independent random variables, variance always adds. Remember the formula: $Var(aX \pm bY) = a^2Var(X) + b^2Var(Y)$. Notice the '+' sign for both addition and subtraction!
  • If you combine independent Normal distributions, you get another Normal distribution. If $X \sim N(\mu_X, \sigma_X^2)$ and $Y \sim N(\mu_Y, \sigma_Y^2)$, then $aX + bY \sim N(a\mu_X + b\mu_Y, a^2\sigma_X^2 + b^2\sigma_Y^2)$.

Revise this chapter in any of the ten Paperverse worlds