📚 Discrete Random Variables | 离散随机变量专题精讲
In IB Mathematics, discrete random variables form a core topic in probability and statistics. Mastering this topic requires a clear understanding of probability distributions, expected value, variance, and their applications in real-world contexts.
在IB数学中,离散随机变量是概率与统计部分的核心专题。掌握该专题需要清晰理解概率分布、期望值、方差及其在现实情境中的应用。
1. What Is a Discrete Random Variable? | 什么是离散随机变量?
A random variable is a variable whose possible values are numerical outcomes of a random phenomenon. A discrete random variable takes a countable number of distinct values, often integers, such as the number of heads when tossing three coins.
随机变量是取值取决于随机现象数值结果的变量。离散随机变量取有限个或可数无穷多个互不相同的值,通常为整数,例如抛三枚硬币时出现正面的次数。
Example: Let X be the number of sixes obtained when rolling a fair die twice. The possible values of X are 0, 1, 2. Since these are countable, X is discrete.
例如:设X为掷两次公平骰子得到6点的次数。X的可能取值为0、1、2。由于这些值可数,因此X是离散的。
X ∈ {0, 1, 2, … , n} 或 X ∈ {x₁, x₂, x₃, …}
2. Probability Distribution Function P(X = x) | 概率分布函数 P(X = x)
For a discrete random variable X, the probability distribution is a list of all possible values x and their associated probabilities P(X = x). This is also called the probability mass function (PMF).
对于离散随机变量X,其概率分布列出所有可能的取值x及对应概率P(X=x),也称为概率质量函数(PMF)。
A valid PMF must satisfy two conditions:
有效的PMF必须满足两个条件:
-
0 ≤ P(X = x) ≤ 1 for every possible value x.
对于每一个可能取值x,有0 ≤ P(X = x) ≤ 1。
-
∑ P(X = x) = 1 over all possible values of x.
对所有可能取值x求和,∑ P(X = x) = 1。
Example: The PMF of a fair coin tossed twice, where X counts the number of heads, is:
例如:抛两次公平硬币,X表示正面次数,其PMF为:
| x | 0 | 1 | 2 |
| P(X = x) | 1/4 | 1/2 | 1/4 |
3. Cumulative Distribution Function | 累积分布函数
The cumulative distribution function (CDF) for a discrete random variable is defined as F(x) = P(X ≤ x). It gives the probability that the variable takes a value less than or equal to x.
离散随机变量的累积分布函数(CDF)定义为F(x) = P(X ≤ x),表示变量取值小于或等于x的概率。
For the coin-toss example, the CDF is:
对于抛硬币的例子,CDF为:
| x | x < 0 | 0 ≤ x < 1 | 1 ≤ x < 2 | x ≥ 2 |
| F(x) | 0 | 1/4 | 3/4 | 1 |
Key property: F(b) − F(a−) = P(a ≤ X ≤ b).
关键性质:F(b) − F(a−) = P(a ≤ X ≤ b)。
4. Expected Value E(X) | 期望值 E(X)
The expected value (or mean) of a discrete random variable X is the weighted average of all possible values, where the weights are the probabilities. It is denoted by E(X) or μ.
离散随机变量X的期望值(或均值)是所有可能取值的加权平均,权重为对应概率,记作E(X)或μ。
E(X) = ∑ x · P(X = x)
Interpretation: E(X) represents the long-run average value of the random variable over many repetitions of the experiment.
含义:E(X)表示在大量重复试验中随机变量的长期平均值。
Example: For the number of heads in two coin tosses,
例如:两次抛硬币出现正面次数,
E(X) = 0 × (1/4) + 1 × (1/2) + 2 × (1/4) = 1
5. Variance and Standard Deviation | 方差与标准差
The variance measures the spread of the distribution around the mean. It is defined as Var(X) = E[(X − μ)²]. A useful computational formula is:
方差衡量分布围绕均值的离散程度,定义为Var(X) = E[(X − μ)²]。一个常用的计算公式为:
Var(X) = E(X²) − [E(X)]²
where E(X²) = ∑ x² · P(X = x). The standard deviation is σ = √Var(X).
其中E(X²) = ∑ x² · P(X = x)。标准差为σ = √Var(X)。
Using the coin-toss example: E(X²) = 0² × (1/4) + 1² × (1/2) + 2² × (1/4) = 1.5, so Var(X) = 1.5 − 1² = 0.5, and σ = √0.5 ≈ 0.707.
使用抛硬币的例子:E(X²) = 0² × (1/4) + 1² × (1/2) + 2² × (1/4) = 1.5,因此Var(X) = 1.5 − 1² = 0.5,σ = √0.5 ≈ 0.707。
6. Properties of E(X) and Var(X) | 期望与方差的性质
Let X be a discrete random variable, and let a and b be constants. Then:
设X为离散随机变量,a和b为常数,则:
-
E(aX + b) = aE(X) + b
E(aX + b) = aE(X) + b
-
Var(aX + b) = a²Var(X)
Var(aX + b) = a²Var(X)
-
E(a) = a
E(a) = a
-
Var(a) = 0
Var(a) = 0
These properties are frequently tested in IB exam questions involving linear transformations of variables.
这些性质在IB考试中经常与变量的线性变换结合考查。
7. Uniform Discrete Distribution | 离散均匀分布
A discrete uniform distribution over values x₁, x₂, …, xₙ assigns equal probability 1/n to each value. Its mean and variance are:
离散均匀分布对取值x₁, x₂, …, xₙ中的每个值赋予相同概率1/n。其均值和方差为:
E(X) = (x₁ + x₂ + … + xₙ) / n
Var(X) = (1/n) ∑ xᵢ² − [E(X)]²
For example, rolling a fair six-sided die gives a uniform distribution over 1, 2, 3, 4, 5, 6, with mean 3.5 and variance 35/12.
例如,掷一颗公平的六面骰子,在1、2、3、4、5、6上服从均匀分布,均值为3.5,方差为35/12。
8. Binomial Distribution | 二项分布
If a random variable X counts the number of successes in n independent trials, each with probability p of success, then X ~ B(n, p). Its PMF is:
如果随机变量X表示n次独立试验中成功的次数,每次成功概率为p,则X ~ B(n, p)。其PMF为:
P(X = r) = ⁿCᵣ · pʳ · (1 − p)ⁿ⁻ʳ, r = 0, 1, 2, …, n
The mean and variance of a binomial variable are:
二项变量的均值与方差为:
E(X) = np, Var(X) = np(1 − p)
Example: A multiple-choice test has 10 questions, each with 4 options. Guessing every answer gives X ~ B(10, 0.25). The expected number of correct answers is 10 × 0.25 = 2.5.
例如:一份10道题的单选题测试,每题4个选项。随机猜测时X ~ B(10, 0.25)。答对的期望数为10 × 0.25 = 2.5。
9. Using the Binomial Table or Calculator | 使用二项分布表或计算器
In IB exams, you are expected to compute binomial probabilities efficiently using a GDC (graphical display calculator) or tables. Typical questions involve P(X = r), P(X ≤ r), or P(X > r).
在IB考试中,你需要使用图形计算器(GDC)或表格高效计算二项概率。典型问题涉及P(X = r)、P(X ≤ r)或P(X > r)。
Key relation: P(X > r) = 1 − P(X ≤ r).
关键关系:P(X > r) = 1 − P(X ≤ r)。
Ensure you know your GDC menu: binomialpdf for P(X = r) and binomialcdf for P(X ≤ r). Make sure the parameters n and p are entered correctly.
务必熟悉计算器菜单:binomialpdf用于P(X = r),binomialcdf用于P(X ≤ r)。确保参数n和p输入正确。
10. Transforming Variables and Expectation of a Function | 变量变换与函数期望
For a function g(X), the expected value is given by E[g(X)] = ∑ g(x) · P(X = x). This works for any function g, not only linear ones.
对于函数g(X),其期望为E[g(X)] = ∑ g(x) · P(X = x)。这适用于任意函数g,不只是线性函数。
Important note: In general, E(X²) ≠ [E(X)]², and E(1/X) ≠ 1/E(X).
重要注意:一般情况下E(X²) ≠ [E(X)]²,且E(1/X) ≠ 1/E(X)。
Example: If P(X = 1) = 0.4 and P(X = 2) = 0.6, then E(X²) = 1² × 0.4 + 2² × 0.6 = 2.8, while [E(X)]² = (1 × 0.4 + 2 × 0.6)² = 1.6² = 2.56.
例如:若P(X = 1) = 0.4,P(X = 2) = 0.6,则E(X²) = 1² × 0.4 + 2² × 0.6 = 2.8,而[E(X)]² = (1 × 0.4 + 2 × 0.6)² = 1.6² = 2.56。
11. Independent Discrete Variables | 独立离散随机变量
If X and Y are independent discrete random variables, then:
若X与Y是独立离散随机变量,则:
-
E(X + Y) = E(X) + E(Y) (always true, even without independence)
E(X + Y) = E(X) + E(Y)(始终成立,即使不独立)
-
E(XY) = E(X)E(Y) (requires independence)
E(XY) = E(X)E(Y)(需要独立性)
-
Var(X + Y) = Var(X) + Var(Y) (requires independence)
Var(X + Y) = Var(X) + Var(Y)(需要独立性)
These rules are essential when combining independent random variables, such as finding the total number of successes in several binomial experiments.
这些规则在合并独立随机变量时非常重要,例如求多个二项试验的总成功次数。
12. Common Exam Pitfalls and Tips | 常见考试失分点与技巧
Below are typical mistakes and strategies to avoid them.
以下是典型错误及应对策略。
-
Misidentifying the distribution: Check whether the problem describes a simple discrete variable, a binomial, or a uniform distribution before applying formulas.
错误识别分布类型:在套用公式前,先判断问题是简单离散变量、二项分布还是均匀分布。
-
Forgetting that probabilities must sum to 1: Use this to find unknown probabilities in a table.
忘记概率总和为1:利用这一点求表格中的未知概率。
-
Using variance formulas incorrectly: Remember Var(X) = E(X²) − (E(X))², not E(X²) − E(X).
错误使用方差公式:记住Var(X) = E(X²) − (E(X))²,而不是E(X²) − E(X)。
-
Calculator errors: When using binomialcdf, check whether the lower bound is included or excluded. For example, P(X < 3) = P(X ≤ 2).
计算器使用错误:使用binomialcdf时,检查下界是否包含。例如P(X < 3) = P(X ≤ 2)。
-
Rounding too early: Keep exact fractions or full decimal precision until the final answer, especially when computing variance.
过早四舍五入:在最终答案前保留精确分数或完整小数精度,尤其是在计算方差时。
Practicing past paper questions on discrete random variables will build both speed and accuracy.
通过练习历年真题来提升离散随机变量部分的解题速度与准确度。
Published by TutorHao | IB Mathematics Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导