📚 Discrete Random Variables | 离散随机变量
A discrete random variable is a cornerstone concept in IB Mathematics. It takes on distinct, countable values, and its behaviour is fully described by a probability distribution. Mastering this topic is essential for Paper 1 and Paper 2 questions, as well as for the internal assessment.
离散随机变量是IB数学中的核心概念。它取有限或可数的特定值,其行为完全由概率分布描述。掌握这一主题对Paper 1和Paper 2的题目以及内部评估都至关重要。
1. Definition of a Discrete Random Variable | 离散随机变量的定义
A random variable is called discrete if its set of possible outcomes is finite or countably infinite. Each outcome is associated with a probability, and the sum of all probabilities equals 1. We usually denote the variable by an uppercase letter, such as X, and its specific values by lowercase letters, such as x.
如果随机变量的所有可能结果是有限个或可数无限个,则该随机变量称为离散的。每个结果对应一个概率,所有概率之和等于1。通常我们用大写字母如X表示变量,用小写字母如x表示具体取值。
For a discrete random variable X, the probability that X equals a particular value x is written as P(X = x). This notation is central to all probability questions.
对于离散随机变量X,X取特定值x的概率记为P(X = x)。这个记号是所有概率问题的核心。
- Finite example: number of heads when tossing a coin 3 times.
- 有限例子:抛3次硬币出现正面的次数。
- Countably infinite example: number of phone calls received in an hour.
- 可数无限例子:一小时内接到的电话次数。
2. Probability Distribution Function (PMF) | 概率分布函数
The probability distribution function, often called the probability mass function (PMF), assigns a probability to each possible value of a discrete random variable. It must satisfy two conditions: first, every probability is between 0 and 1 inclusive; second, the sum of all probabilities is exactly 1.
概率分布函数通常称为概率质量函数(PMF),它为离散随机变量的每个可能取值赋予一个概率。它必须满足两个条件:第一,每个概率在0到1之间(含端点);第二,所有概率之和恰好为1。
For example, if X represents the sum of two dice, the PMF is given by a table:
例如,若X表示两颗骰子的点数之和,其PMF可用表格表示:
| x | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| P(X = x) | 1/36 | 2/36 | 3/36 | 4/36 | 5/36 | 6/36 | 5/36 | 4/36 | 3/36 | 2/36 | 1/36 |
Notice that all entries are non-negative and their sum equals 1.
注意所有概率非负且总和等于1。
3. Cumulative Distribution Function | 累积分布函数
The cumulative distribution function (CDF) gives the probability that X takes a value less than or equal to x. It is denoted F(x) = P(X ≤ x). Because X is discrete, the CDF is a step function that increases at each possible value of X.
累积分布函数(CDF)给出X取值小于或等于x的概率,记为F(x) = P(X ≤ x)。由于X是离散的,CDF是一个阶梯函数,在X的每个可能取值处跳跃增加。
F(x) = Σ P(X = t) for all t ≤ x
For example, using the two-dice table, F(5) = P(X = 2) + P(X = 3) + P(X = 4) + P(X = 5) = 10/36.
例如,使用两骰子表格,F(5) = P(X = 2) + P(X = 3) + P(X = 4) + P(X = 5) = 10/36。
- CDF values are always between 0 and 1.
- CDF值始终在0和1之间。
- As x increases, F(x) never decreases.
- 随着x增大,F(x)永不减小。
4. Expected Value E(X) | 期望值
The expected value, or mean, of a discrete random variable measures the long-run average of many repeated trials. It is calculated by summing each value multiplied by its probability.
离散随机变量的期望值(即均值)衡量大量重复试验的长期平均值。计算方法是将每个取值乘以它的概率再求和。
E(X) = Σ x · P(X = x)
The expected value is not necessarily a value that X can actually take. For example, if X is 1 with probability 0.5 and 3 with probability 0.5, then E(X) = 1 × 0.5 + 3 × 0.5 = 2, even though X never equals 2.
期望值不一定等于X可能取的实际值。例如,若X取1的概率为0.5,取3的概率为0.5,则E(X) = 1 × 0.5 + 3 × 0.5 = 2,尽管X永远不会等于2。
In IB questions you may be asked to find E(X) from a table, or to find an unknown probability by setting the given mean equal to an algebraic expression.
在IB题目中,你可能需要从表格求E(X),或用给定的均值等于一个代数表达式来求未知概率。
5. Variance and Standard Deviation | 方差与标准差
Variance measures the spread of the distribution around the mean. The variance of X is defined as the expected value of the squared deviation from the mean. The standard deviation is the square root of the variance.
方差衡量分布围绕均值的离散程度。X的方差定义为离均差平方的期望值。标准差是方差的平方根。
Var(X) = E[(X − μ)²] = E(X²) − [E(X)]²
The alternative formula Var(X) = E(X²) − [E(X)]² is often easier to use. To find E(X²), you sum x² · P(X = x) over all values.
替代公式Var(X) = E(X²) − [E(X)]²通常更易使用。求E(X²)时,对所有取值计算x² · P(X = x)之和。
SD(X) = √Var(X)
For example, if X takes values 1, 2, 3 with probabilities 0.2, 0.5, 0.3 respectively, then E(X) = 2.1 and E(X²) = 1×0.2 + 4×0.5 + 9×0.3 = 4.9, so Var(X) = 4.9 − 2.1² = 0.49.
例如,若X取值1、2、3的概率分别为0.2、0.5、0.3,则E(X) = 2.1,E(X²) = 1×0.2 + 4×0.5 + 9×0.3 = 4.9,所以Var(X) = 4.9 − 2.1² = 0.49。
6. Linear Transformations of X | 随机变量的线性变换
Let a and b be constants and define Y = aX + b. The mean and variance of Y can be found directly from those of X without recalculating the entire distribution.
设a和b为常数,定义Y = aX + b。Y的均值和方差可以直接由X的均值和方差求得,无需重新计算整个分布。
E(aX + b) = aE(X) + b
Var(aX + b) = a² Var(X)
Notice that adding the constant b does not change the variance, because it shifts the entire distribution without affecting spread. Multiplying by a stretches or compresses the spread, and the variance is multiplied by a².
注意,加上常数b不改变方差,因为整体平移不影响离散程度。乘以a会拉伸或压缩离散程度,方差乘以a²。
For example, if E(X) = 5 and Var(X) = 2, then for Y = 3X − 1, E(Y) = 3×5 − 1 = 14 and Var(Y) = 9 × 2 = 18.
例如,若E(X) = 5,Var(X) = 2,对于Y = 3X − 1,E(Y) = 3×5 − 1 = 14,Var(Y) = 9 × 2 = 18。
7. Sum of Independent Random Variables | 独立随机变量之和
If X and Y are independent discrete random variables, the expected value of their sum equals the sum of their expected values. This rule does not require independence.
如果X和Y是独立的离散随机变量,它们之和的期望值等于各自期望值之和。该规则不要求独立性。
E(X + Y) = E(X) + E(Y)
For variance, independence is required:
对于方差,需要独立性:
Var(X + Y) = Var(X) + Var(Y)
More generally, for independent random variables X₁, X₂, …, Xₙ, the variance of the sum is the sum of the variances.
更一般地,对于独立随机变量X₁, X₂, …, Xₙ,和的方差等于方差的和。
8. The Binomial Distribution | 二项分布
A discrete random variable X is said to have a binomial distribution if it counts the number of successes in n independent Bernoulli trials, each with the same probability of success p. We write X ~ B(n, p).
如果离散随机变量X表示在n次独立的伯努利试验中成功的次数,且每次成功的概率相同均为p,则称X服从二项分布,记作X ~ B(n, p)。
- Each trial has only two outcomes: success or failure.
- 每次试验只有两种结果:成功或失败。
- The trials are independent.
- 各次试验相互独立。
- The probability of success p is constant.
- 成功概率p保持不变。
The probability of exactly k successes is given by the formula:
恰好k次成功的概率由以下公式给出:
P(X = k) = C(n, k) × pᵏ × (1 − p)ⁿ⁻ᵏ
where C(n, k) = n! / [k! (n − k)!] is the binomial coefficient. On your GDC, this is often available as binompdf(n, p, k).
其中C(n, k) = n! / [k! (n − k)!]是二项式系数。在你的图形计算器上,通常可用binompdf(n, p, k)直接计算。
For a binomial distribution, the mean and variance have simple forms:
二项分布的均值和方差具有简洁形式:
E(X) = np
Var(X) = np(1 − p)
9. The Poisson Distribution | 泊松分布
The Poisson distribution models the number of rare events occurring in a fixed interval of time or space, provided the events occur independently and at a constant average rate. We write X ~ Po(λ), where λ is the mean number of occurrences.
泊松分布用于建模在固定时间或空间间隔内稀有事件发生的次数,前提是事件相互独立且以恒定的平均速率发生。记作X ~ Po(λ),其中λ是发生次数的平均值。
P(X = k) = e⁻ᵏ × λᵏ / k!
Wait — the exponent in e⁻ᵏ should be −λ, not −k. Let me correct the formula.
注意,指数e的幂应为−λ,而不是−k。这里修正公式。
P(X = k) = (e⁻λ × λᵏ) / k!
For the Poisson distribution, the mean and variance are both equal to λ:
泊松分布的均值与方差都等于λ:
E(X) = λ
Var(X) = λ
The Poisson distribution can also be used as an approximation to the binomial distribution when n is large (at least 50) and p is small (at most 0.1), using λ = np.
当n很大(至少50)且p很小(至多0.1)时,泊松分布也可用作二项分布的近似,此时λ = np。
10. Choosing Between Binomial and Poisson | 如何选择二项分布与泊松分布
In IB exam questions, you must identify which distribution applies based on the context.
在IB考试中,你必须根据情境判断应使用哪种分布。
| Feature | Binomial | Poisson |
| Context | Fixed number of trials n | Fixed interval of time/space |
| Parameters | n and p | λ (mean rate) |
| Possible values | 0, 1, …, n | 0, 1, 2, … (unbounded) |
| Mean | np | λ |
| Variance | np(1 − p) | λ |
Key questions to ask yourself: Is there a fixed number of trials? If yes, use binomial. Is there an interval with an average rate? If yes, use Poisson.
关键问题是:是否有固定的试验次数?如果是,用二项分布。是否是一个间隔内的事件平均发生率?如果是,用泊松分布。
11. Worked Example | 综合例题
Let X be a discrete random variable with PMF given by P(X = 0) = 0.2, P(X = 1) = a, P(X = 2) = 0.3, P(X = 3) = b. Given that E(X) = 1.5, find a and b.
设X的分布列为P(X = 0) = 0.2,P(X = 1) = a,P(X = 2) = 0.3,P(X = 3) = b。已知E(X) = 1.5,求a和b。
First, the probabilities must sum to 1:
首先,所有概率之和必须等于1:
0.2 + a + 0.3 + b = 1 → a + b = 0.5
Second, using the expected value formula:
其次,利用期望值公式:
E(X) = 0×0.2 + 1×a + 2×0.3 + 3×b = a + 0.6 + 3b = 1.5
So a + 3b = 0.9. Solving together with a + b = 0.5 gives 2b = 0.4, so b = 0.2 and a = 0.3.
因此a + 3b = 0.9。与a + b = 0.5联立,得2b = 0.4,所以b = 0.2,a = 0.3。
12. Common Mistakes and Exam Tips | 常见错误与考试技巧
One common mistake is forgetting that probabilities must sum to 1 when finding an unknown constant. Another is confusing Var(aX + b) with a·Var(X), which mistakenly drops the square.
常见错误之一是求未知常数时忘记所有概率之和必须为1。另一个是将Var(aX + b)误写成a·Var(X),忽略了平方。
- Always check that ΣP(X = x) = 1 before proceeding.
- 永远先检查ΣP(X = x) = 1再继续。
- Use E(X²) separately; do not compute E(X²) as [E(X)]².
- 单独计算E(X²),不要将E(X²)写成[E(X)]²。
- For binomial probabilities, use GDC functions binompdf and binomcdf correctly.
- 对于二项分布概率,正确使用GDC的binompdf和binomcdf功能。
- For Poisson questions, ensure λ and k are correctly identified from the context.
- 对于泊松分布问题,确保从情境中正确识别λ和k。
- When using the Poisson approximation to the binomial, state the condition n ≥ 50 and p ≤ 0.1.
- 使用泊松近似二项分布时,说明条件n ≥ 50且p ≤ 0.1。
Conclusion | 总结
Discrete random variables appear in many forms across the IB syllabus. By mastering the PMF, expectation, variance, and the standard distributions — binomial and Poisson — you can confidently tackle exam questions and apply these ideas to real-world data.
离散随机变量以多种形式出现在IB课程大纲中。通过掌握概率质量函数、期望、方差以及标准分布——二项分布和泊松分布——你就能自信地应对考题,并将这些概念应用到实际数据中。
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课程辅导,国外大学本科硕士研究生博士课程论文辅导