AP Statistics · Unit 3 · Lesson 0

Transforming & Combining Random Variables

随机变量的变换与加减

a + bX · X + Y · X − Y · mean, variance, SD · shape · derivations

40 min core+ derivationsBridge to 3.9TPS 6.2
MG · AP Statistics→ next · O contents · N notes · F fullscreen
Unit 3 · Roadmap

Where we are in Unit 3 单元路线图

Inference for Categorical Data: Proportions · 15–25% of the AP exam

0Transforming & Combining Random VariablesTPS 6.2
13.1 EstimatorsTPS 7.1
23.2 + 3.9 Sampling Distributions of p̂ and p̂₁ − p̂₂TPS 7.2
33.3 + 3.4 Confidence Intervals: The BasicsTPS 8.1
43.3 + 3.4 Confidence Interval for pTPS 8.2
53.5 + 3.6 + 3.8 Significance Tests: The BasicsTPS 9.1
63.7 + 3.8 Test for p · PowerTPS 9.2
73.10 + 3.11 Interval for p₁ − p₂TPS 8.3
83.12 + 3.13 Test for p₁ − p₂TPS 9.3
93.14 Setting Up a Chi-Square TestTPS 12.2
103.15 Carrying Out a Chi-Square TestTPS 12.2
💡 Lessons 2, 7 and 8 compare two groups with p̂₁ − p̂₂. To find its standard deviation we need one tool first: variances add. 比较两组时要用到“方差相加”,今天先把这个工具讲清楚。
Unit 3 · Lesson 0
Lesson 0 · Learning Objectives

By the end of today, you can… 学习目标

TPS 6.2

a + bX: mean & SD ★★★★

Find the mean and SD after adding, subtracting, multiplying or dividing by a constant.

常数加减乘除后的均值与标准差

TPS 6.2

Shape after a + bX ★★★★

Describe how the graph of the distribution moves, stretches or flips — and why the shape stays the same.

图像如何平移、伸缩、翻转;形状不变

TPS 6.2

X ± Y: means ★★★★

Find the mean of a sum or difference of two random variables.

和与差的均值

TPS 6.2

X ± Y: variances add ★★★★

Find the SD of X + Y or X − Y for independent random variables: add variances, then take the square root.

独立时方差相加,再开根号

Derivation

Why the rules work ★★★★

Derive the rules from the definitions of expected value and variance.

用期望和方差的定义推导公式

Bridge → 3.9

SD of p̂₁ − p̂₂ ★★★★

Explain where the formula for the SD of a difference in sample proportions comes from.

两样本比例差的标准差从哪里来

Unit 3 · Lesson 0
Lesson 0 · Agenda

Today's plan 课堂安排

📝 Example 例题 — think first!✅ Answers 答案 — click 👁 under each question 点击显示🎮 Simulator 模拟器★★★★ basic → ★★★★ challenge
Unit 3 · Lesson 0
Lesson 0 · Simulators

🎮 Simulators in this lesson 本节模拟器

Look for the navy 🎮 SIMULATOR banner. Click to jump there. 深蓝色横幅 = 模拟器,点击可直接跳转。

Unit 3 · Lesson 0
📝 Warm-up · 例题★★★★Warm-up

Two dice: what adds? 两颗骰子:哪些量可以直接相加?

Roll two fair dice. Let X = the number on the red die and Y = the number on the blue die. Let S = X + Y. 掷两颗均匀骰子,S = 两颗点数之和。

Q1For one die, find , and .
Step 1.
Step 2. , so . Y has the same mean and SD.
Q2The distribution of S is shown on the right (36 equally likely outcomes). Find and compare with .
= 3.5 + 3.5 ✓ Means add.
Q3Find and . Is ? Is ?
Step 1. , so .
Step 2. ✗ but ✓
🔑 S = X + Y, two independent dice.
💡 Means add. Variances add. Standard deviations do not add. Today we find out why.
Unit 3 · Lesson 0
Part
A

Transforming a Random Variable

一个随机变量的变换:加减乘除常数
Y = X + aY = bXY = a + bXShape · center · spread
Unit 3 · Lesson 0
Part A · Key ConceptsTPS 6.2
Difficulty 难度 ★★★★

Add, Subtract, Multiply, Divide by a Constant 常数加减乘除

Linear transformation线性变换
. Every value of X is changed in the same way, so every probability stays with its value: .
每个取值都做同样的变换,概率跟着取值走、不变;所以图像只是平移、伸缩或翻转,形状不变。
Operation 运算Shape 形状Center 中心 (mean, median)Spread 离散 (SD, IQR, range)Variance 方差
add a
加 a
same 不变+ asame 不变same 不变
subtract a
减 a
same 不变− asame 不变same 不变
× b (b > 0)
乘正数
same 不变× b× b× b²
÷ b (b > 0)
除以正数
same 不变÷ b÷ b÷ b²
× b (b < 0)
乘负数
mirror image 左右翻转× b× |b|× b²
Unit 3 · Lesson 0
📝 Derivation · 推导★★★★TPS 6.2

Why: mean and variance of a + bX 推导:a + bX 的均值与方差

X is a discrete random variable with values , probabilities , mean and variance . Let . Each value becomes with the same probability .

aShow that .
Step 1. Definition of the mean:
Step 2. Split the sum:
Step 3. Use and :
bShow that , so .
Step 1. Definition of variance:
Step 2. The a’s cancel — adding a constant does not change any distance from the mean:
Step 3. Take the square root (an SD is never negative):
🔑 a moves the center only; b scales every distance from the mean.
💡 Adding a constant shifts; multiplying stretches. Variance gets b² because it is a squared distance.
Unit 3 · Lesson 0
🎮Simulator 模拟器a + bX transformer线性变换演示Try it! 动手试试

X = number of kayaks rented in an hour (right-skewed). Move a and b and compare the two probability histograms. 拖动 a、b,对比变换前后的图像。

Unit 3 · Lesson 0
📝 Example 1 · 例题★★★★TPS 6.2

Kayak profit 皮划艇租赁的利润

X = number of kayaks rented in an hour at a small dock. The shop earns $15 per kayak and pays $10 per hour for the attendant, so the hourly profit is P = 15X − 10.

x01234
P(X = x)0.300.350.200.100.05

μX = 1.25 kayaks and σX ≈ 1.135 kayaks.

aFind the mean and SD of the profit P.
Step 1.
Step 2. — the −10 does not change the spread.
bDescribe the shape of the distribution of P.
Same shape as X: skewed right. Each value x becomes 15x − 10 with the same probability, so the histogram is only stretched and shifted (values −10, 5, 20, 35, 50).
cInterpret σP in context.
The hourly profit typically varies from the mean of $8.75 by about $17.02.
🔑 P = 15X − 10: multiply by 15, then subtract 10.
💡 Mean: apply the whole rule. SD: only the multiplier matters.
Unit 3 · Lesson 0
Part
B

Sums and Differences of Random Variables

两个随机变量的和与差
μ of X ± Yσ² of X ± Y (independent)Shape of a sum
Unit 3 · Lesson 0
Part B · Key ConceptsTPS 6.2
Difficulty 难度 ★★★★

Sum, Difference, and Independence 和、差与独立

Sum and difference和与差
If X and Y are random variables, then T = X + Y and D = X − Y are also random variables. Each pair of outcomes (x, y) gives one value of T and one value of D.
两个随机变量相加或相减,得到一个新的随机变量;每一对结果 (x, y) 对应一个和、一个差。
Independent random variables独立的随机变量
X and Y are independent if knowing the value of X does not change the probabilities for Y: P(X = x and Y = y) = P(X = x) · P(Y = y) for every pair.
知道 X 的取值,不改变 Y 的概率分布;联合概率等于各自概率相乘。例:两个随机选出的人、两颗骰子、两个独立随机样本。
Not independent不独立的例子
X = a student’s SAT Math score and Y = the same student’s SAT Reading score; X = rainfall today and Y = rainfall tomorrow.
同一个人的两项成绩、相邻两天的天气,彼此相关,不独立。
Unit 3 · Lesson 0
📝 Derivation · 推导★★★★TPS 6.2

Why means add 推导:均值为什么直接相加

Let , the joint probability of each pair. The mean of X + Y averages x + y over all pairs, weighted by p(x, y).

aShow that .
Step 1. Definition:
Step 2. Split into two sums:
Step 3. Adding a row of the joint table gives the marginal probability: and .
bWhat about ? Did we use independence?
Same steps with x − y:
No! Step 3 only adds rows and columns of the joint table. Means add (or subtract) for any X and Y, independent or not.
🔑 Row totals of the joint table = marginal probabilities.
💡 μX±Y = μX ± μY always — no independence needed.

Joint table 联合分布表 (one example)

y = 0y = 1y = 2P(X = x)
x = 00.1250.250.1250.5
x = 10.1250.250.1250.5
P(Y = y)0.250.50.251

Each cell = p(x, y). Adding across a row gives P(X = x); adding down a column gives P(Y = y). 横着加得到 X 的概率,竖着加得到 Y 的概率。

Unit 3 · Lesson 0
📝 Derivation · 推导★★★★TPS 6.2

Why variances add 推导:方差为什么相加

Variance is the mean squared distance from the mean: , where E[ ] means “probability-weighted average”. Assume X and Y are independent.

aShow that .
Step 1. Regroup the distance from the mean:
Step 2. Expand :
Step 3. The cross term. Independence lets the joint probability factor, , so
Step 4.
bShow that (still a plus sign!).
The minus sign only appears in the cross term, and the cross term is 0. Squaring makes the distances positive, so subtracting a random variable adds variability.
🔑 Deviations from the mean average to 0: Σ(x − μ)P(x) = 0.
💡 Independent ⇒ cross term = 0 ⇒ variances add, for X + Y and X − Y.
Unit 3 · Lesson 0
">
Part B · Key ConceptsTPS 6.2
Difficulty 难度 ★★★★

先加方差,再开根号

Rules for X ± Y和与差的公式

If X and Y are independent:

均值:和就加、差就减(任何情况都成立)。方差:独立时,不管和还是差都相加。标准差:先算方差之和,再开根号。
SDs do not add标准差不能直接相加
The SDs behave like the two legs of a right triangle: the SD of the sum is the hypotenuse, which is shorter than σX + σY.
可以把两个标准差看成直角三角形的两条直角边,和(或差)的标准差是斜边,比两边之和短。
Unit 3 · Lesson 0
📝 Example 2 · 例题★★★★TPS 6.2

Check the rules with a small table 用一张小表验证公式

X and Y are independent. X = 0 or 1 with probability 0.5 each. Y = 0, 1, 2 with probabilities 0.25, 0.5, 0.25. The joint probabilities are on the previous derivation slide.

μX = 0.5, σ²X = 0.25; μY = 1, σ²Y = 0.5.

aFind the distribution of T = X + Y, then μT and σ²T directly.
Step 1. T = 0: 0.125; T = 1: 0.25 + 0.125 = 0.375; T = 2: 0.125 + 0.25 = 0.375; T = 3: 0.125.
Step 2. = 0.5 + 1 ✓
Step 3. = 0.25 + 0.5 ✓
bRepeat for D = X − Y.
Step 1. D = −2: 0.125; D = −1: 0.25 + 0.125 = 0.375; D = 0: 0.125 + 0.25 = 0.375; D = 1: 0.125.
Step 2. = 0.5 − 1 ✓
Step 3. — the same as for the sum ✓. , not 0.5 + 0.707 = 1.207.
🔑 Compute directly, then compare with the rules.
💡 The difference has the same variance as the sum, just centered at μX − μY.
Unit 3 · Lesson 0
Part B · Key ConceptsTPS 6.2
Difficulty 难度 ★★★★

Shape of a Sum · Independence 和的形状与独立性

Shape can change形状可能改变
Unlike a + bX, adding two random variables can change the shape: one die is uniform, two dice sum to a triangle. Independent normal X and Y give a normal X ± Y.
线性变换不改变形状;两个随机变量相加,形状可能改变。独立正态相加减仍是正态。
X + X is not X₁ + X₂X + X 不等于两个独立的 X 相加
One die doubled: . Two independent dice: . Without independence the rule fails.
同一颗骰子乘 2 与两颗独立骰子相加不同;不独立时不能用“方差相加”。
Unit 3 · Lesson 0
🎮Simulator 模拟器X ± Y lab和与差实验室Try it! 动手试试

X and Y are independent and normal. We simulate 2,000 pairs and graph X + Y or X − Y. 模拟 2000 对独立的 X、Y。

Unit 3 · Lesson 0
📝 Example 3 · 例题★★★★TPS 6.2

Who finishes first? 谁先到终点?

Ana’s time for a 400-m run is approximately normal with mean 50 s and SD 3 s. Ben’s time is approximately normal with mean 48 s and SD 4 s. They run in separate heats, so their times A and B are independent.

aFind the mean and SD of D = A − B.
Step 1.
Step 2. Independent, so variances add: , (not 3 + 4 = 7, and not 4 − 3 = 1).
bFind the probability that Ana beats Ben (A < B).
Step 1. Ana wins when D = A − B < 0. D is normal (difference of independent normals): N(2, 5).
Step 2. , . Ana beats Ben in about 34.5% of such races.
🔑 Turn “who wins” into “is the difference below 0?”.
💡 A comparison between two independent quantities is a question about their difference.
Unit 3 · Lesson 0
📝 Example 4 · 例题★★★★TPS 6.2

Four apples in a box 一盒四个苹果

Apple weights are independent with mean 150 g and SD 10 g. An empty box weighs 40 g with SD 3 g. A packed box holds 4 randomly chosen apples: T = A₁ + A₂ + A₃ + A₄ + B.

aFind the mean and SD of T.
Step 1.
Step 2. ,
bA student writes σT = 4(10) + 3 = 43 g. Another writes T = 4A + B, so σT = ≈ 40.1 g. What went wrong?
Student 1 added SDs instead of variances.
Student 2 used 4A — one apple weighed 4 times. Four different apples vary independently, so some heavy and light ones balance out: four variances of 100 add to 400, not 4² × 100 = 1600.
🔑 A₁ + A₂ + A₃ + A₄ (4 different apples) ≠ 4A (one apple × 4).
💡 For n independent copies: σ² of the total = n·σ², so σ = .
Unit 3 · Lesson 0
📝 AP Practice 5 · AP 选择题★★★★TPS 6.2

SD of a difference

X and Y are independent random variables with μX = 10, σX = 3, μY = 4 and σY = 4. What is the standard deviation of X − Y?
  • (A) 1
  • (B) 5
  • (C) 6
  • (D) 7
  • (E) 25

→ (B).

(A) subtracts SDs; (C) is the mean of X − Y; (D) adds SDs; (E) is the variance.

Unit 3 · Lesson 0
📝 AP Practice 6 · AP 选择题★★★★TPS 6.2

Change of units

The daily high temperature C in a city (°C) has mean 20 and standard deviation 5, and its distribution is skewed left. Temperature in °F is F = 1.8C + 32. Which describes the distribution of F?
  • (A) Mean 36, SD 9, skewed left
  • (B) Mean 68, SD 9, skewed left
  • (C) Mean 68, SD 41, skewed left
  • (D) Mean 68, SD 9, approximately normal
  • (E) Mean 68, SD 16.2, skewed left

, ; a linear transformation keeps the shape → skewed left → (B).

(A) forgets + 32; (C) adds 32 to the SD; (D) changes the shape; (E) uses 1.8² on the SD.

Unit 3 · Lesson 0
📝 AP Practice 7 · AP 选择题★★★★TPS 6.2

When can we add variances?

Let D = time to drive to school and W = time to walk from the parking lot to class, for a randomly chosen school day. On rainy days both times are longer. Which statement is true about the total time T = D + W?
  • (A) μT = μD + μW and σT = σD + σW
  • (B) μT = μD + μW, but σ²T = σ²D + σ²W may not hold
  • (C) Neither the mean nor the variance of T can be found from the means and variances of D and W
  • (D) σ²T = σ²D + σ²W because time cannot be negative
  • (E) μT = μD − μW because the two times are related

Means always add. Rain makes D and W both larger, so they are not independent and the variance rule may fail → (B).

(A) adds SDs; (C) is wrong about the mean; (D) gives a wrong reason; (E) has no basis.

Unit 3 · Lesson 0
Wrap-up · Common Mistakes

Common mistakes 易错点

❌ σX+Y = σX + σY

✅ Add variances, then take the square root: .

标准差不能直接相加。

❌ σ²X−Y = σ²X − σ²Y

✅ Variances add for a difference too.

差的方差也是相加。

❌ σ of X + 5 is σX + 5

✅ Adding a constant does not change the spread.

加常数不改变标准差。

❌ σ of 3X is 9σX

✅ σ is multiplied by |b| = 3; the variance is multiplied by 9.

乘 b:标准差乘 |b|,方差乘 b²。

❌ X₁ + X₂ + X₃ = 3X

✅ Three independent copies: σ² = 3σ²X, not 9σ²X.

三个独立的 X 相加 ≠ 3 乘同一个 X。

❌ Use variance addition without checking

✅ Check that X and Y are independent first.

先确认独立。

Unit 3 · Lesson 0
Wrap-up · Summary

Key vocabulary 本课词汇

English中文Remember… / 记住Level
Linear transformation a + bX线性变换μ → a + bμ; σ → |b|σ; σ² → b²σ²; shape unchanged★★★★
Shift (add a) · stretch (× b)平移 · 伸缩adding moves the graph; multiplying stretches it; b < 0 flips it★★★★
Mean of X ± Y和与差的均值μX ± μY — always★★★★
Independent random variables独立随机变量P(X = x and Y = y) = P(X = x)P(Y = y)★★★★
Variance of X ± Y和与差的方差σ²X + σ²Y — only if independent; plus for both★★★★
SD of X ± Y和与差的标准差, never σX + σY★★★★
Sum of independent normals独立正态之和is normal★★★★
Unit 3 · Lesson 0
📝 Exit ticket · 例题★★★★TPS 6.2

Exit ticket 🎟️ 离堂小测

A cereal company fills boxes. The cereal weight X has mean 16.2 oz and SD 0.1 oz; the empty box weight Y has mean 1.5 oz and SD 0.05 oz. X and Y are independent.

1Find the mean and SD of the total weight T = X + Y.
;
2The label shows weight in grams: G = 28.35X. Find the mean and SD of G.
; ; the shape of the distribution does not change.
3Two boxes of cereal are chosen at random. Find the mean and SD of the difference X₁ − X₂ in cereal weight.
; — variances add even for a difference.
🔑 Means: add or subtract. Variances: add (independent). SD: square root.
Unit 3 · Lesson 0
Next time · Lesson 1

Estimators

估计量 · Topic 3.1

Point estimates, unbiased estimators, bias and variability.

MG · AP Statistics
课件目录