📚 Mastering Discrete Random Variables | 掌握离散随机变量
In the IB Mathematics Analysis & Approaches and Applications & Interpretation courses, discrete random variables provide the foundational language for quantifying uncertainty. They model situations where outcomes can be counted, such as the number of heads when flipping coins or the number of goals in a match. A solid grasp of discrete distributions, expected values, and variance is essential for success in the probability and statistics components of the IB syllabus.
在 IB 数学分析与方法和应用与解释课程中,离散随机变量提供了量化不确定性的基本语言。它们用于模拟可以计数的结果,例如抛硬币时正面朝上的次数或一场比赛的进球数。扎实掌握离散分布、期望值和方差对于 IB 大纲中概率与统计部分的成功至关重要。
1. Definition of a Discrete Random Variable | 离散随机变量的定义
A random variable is a function that assigns a numerical value to each outcome of a random experiment. A random variable is discrete if its set of possible values is finite or countably infinite. Each value can be listed and separated, with no gaps between them in the context of the variable’s range. Typical examples include the score on a fair die, the number of defective items in a batch, or the number of calls received in an hour.
随机变量是把随机试验的每个结果赋予一个数值的函数。如果一个随机变量的可能取值集合是有限的或可数无限的,那么该随机变量就是离散的。每个值都可以列出并分开,变量取值范围内不存在间隙。典型的例子包括一个公平骰子的得分、一批产品中缺陷品的数量,或一小时内接到的电话数量。
Formally, a discrete random variable X takes values x₁, x₂, x₃, … such that the probability of each is defined. We denote the event ‘X = xᵢ’ and its probability as P(X = xᵢ). The sum of all probabilities must equal 1, reflecting the certainty that the random variable takes some value in its domain.
形式上,离散随机变量 X 取值为 x₁, x₂, x₃, …,并且每个取值的概率都有定义。我们记事件“X = xᵢ”的概率为 P(X = xᵢ)。所有概率之和必须等于 1,这反映了随机变量在其定义域内取值是必然的。
2. Probability Mass Function (PMF) | 概率质量函数(PMF)
The probability mass function, often denoted f(x) or p(x), specifies the probability that a discrete random variable is exactly equal to some value. For each possible outcome x, f(x) = P(X = x). The PMF must satisfy two conditions: f(x) ≥ 0 for all x, and the sum of f(x) over all possible values of x is exactly 1.
概率质量函数,通常记作 f(x) 或 p(x),规定了离散随机变量恰好等于某个值的概率。对于每个可能的结果 x,有 f(x) = P(X = x)。PMF 必须满足两个条件:对所有 x 有 f(x) ≥ 0,并且所有可能 x 上的 f(x) 之和恰好为 1。
For instance, when rolling a fair six-sided die, the random variable X representing the outcome has a PMF given by f(x) = 1/6 for x = 1,2,3,4,5,6. We can display the PMF using a table or a bar chart, making the distribution easy to interpret.
例如,掷一个公平的六面骰子时,表示结果的随机变量 X 的 PMF 为:对于 x = 1,2,3,4,5,6,f(x) = 1/6。我们可以用表格或柱状图展示 PMF,使分布一目了然。
3. Cumulative Distribution Function (CDF) | 累积分布函数(CDF)
The cumulative distribution function, F(x), gives the probability that the random variable X takes a value less than or equal to x. For a discrete random variable, F(x) = P(X ≤ x) = Σ_{t ≤ x} f(t), summing the probabilities of all values not exceeding x. The CDF is a non-decreasing step function that climbs from 0 to 1 as x increases.
累积分布函数 F(x) 给出随机变量 X 取值小于或等于 x 的概率。对于离散随机变量,F(x) = P(X ≤ x) = Σ_{t ≤ x} f(t),即对所有不超过 x 的值对应的概率求和。CDF 是一个非递减的阶梯函数,随着 x 增大从 0 递增到 1。
Understanding the CDF is crucial for calculating probabilities over intervals. For example, P(a < X ≤ b) = F(b) - F(a). When only the CDF is known, we can recover the PMF by examining jumps: f(x) = F(x) - F(x⁻) where x⁻ is the immediate previous value.
理解 CDF 对于计算区间概率至关重要。例如,P(a < X ≤ b) = F(b) - F(a)。当只知道 CDF 时,我们可以通过检查跳跃来恢复 PMF:f(x) = F(x) - F(x⁻),其中 x⁻ 是紧接的前一个值。
4. Expected Value E(X) | 期望值 E(X)
The expected value (or mean) of a discrete random variable X, denoted E(X) or μ, represents the long-run average outcome. It is computed as a probability-weighted sum: E(X) = Σ x f(x) over all possible x. The expected value is a measure of central tendency, indicating where the distribution is anchored.
离散随机变量 X 的期望值(或均值),记作 E(X) 或 μ,表示长期的平均结果。它计算为概率加权和:E(X) = Σ x f(x) 对所有可能的 x 求和。期望值是集中趋势的度量,表明了分布的锚点位置。
For a simple example, suppose X takes values 0, 1, 2 with probabilities 0.2, 0.5, 0.3. Then E(X) = 0×0.2 + 1×0.5 + 2×0.3 = 1.1. Note that the expected value need not be a value that X can actually take; it is a hypothetical average over many repetitions.
举一个简单的例子,假设 X 取值为 0、1、2,概率分别为 0.2、0.5、0.3。则 E(X) = 0×0.2 + 1×0.5 + 2×0.3 = 1.1。要注意的是期望值并不一定是 X 实际可以取到的值;它是多次重复下的理论平均值。
5. Expectation of Functions of X, E(g(X)) | X 的函数的期望 E(g(X))
Often we need the expected value of a function of X, such as X² or (X – μ)². The formula is straightforward: E(g(X)) = Σ g(x) f(x). This is essentially the same as the ordinary expected value, with each possible value transformed by the function g before weighting.
我们经常需要 X 的某个函数的期望值,例如 X² 或 (X – μ)²。公式很直接:E(g(X)) = Σ g(x) f(x)。这本质上和普通的期望值相同,只是每个可能的值在加权前先被函数 g 变换。
This result allows us to compute important quantities such as the raw second moment E(X²), which is essential for finding the variance. It is important to note that, in general, E(g(X)) is not equal to g(E(X)); the linearity property holds only for linear functions.
这个结果使我们能计算重要的量,如二阶原点矩 E(X²),它是求方差所必需的。需要注意的是,一般来说 E(g(X)) 不等于 g(E(X));线性性质仅对线性函数成立。
6. Variance and Standard Deviation | 方差与标准差
The variance of a discrete random variable, Var(X) or σ², measures the spread or dispersion of the distribution around its mean. It is defined as the expected squared deviation: Var(X) = E((X – μ)²) = Σ (x – μ)² f(x). A larger variance indicates that values are more spread out from the expected value.
离散随机变量的方差,记作 Var(X) 或 σ²,衡量分布围绕其均值的离散程度。它定义为期望平方偏差:Var(X) = E((X – μ)²) = Σ (x – μ)² f(x)。方差越大,表明取值相对于期望值越分散。
A computationally more convenient formula is Var(X) = E(X²) – [E(X)]². This form avoids having to subtract the mean from each value individually. The standard deviation, σ, is the positive square root of the variance and has the same units as the random variable, making it easier to interpret.
一个计算上更方便的公式是 Var(X) = E(X²) – [E(X)]²。这种形式避免了从每个值中减去均值。标准差 σ 是方差的正平方根,与随机变量具有相同的单位,这使它更容易解读。
7. Properties of Expectation and Variance | 期望与方差的性质
For any discrete random variables X and Y, and constants a and b, expectation is linear: E(aX + b) = a E(X) + b, and E(X + Y) = E(X) + E(Y). These properties hold regardless of independence. However, the variance behaves differently: Var(aX + b) = a² Var(X); adding a constant shifts the distribution but does not change its spread.
对于任意离散随机变量 X 和 Y 以及常数 a 和 b,期望是线性的:E(aX + b) = a E(X) + b,且 E(X + Y) = E(X) + E(Y)。无论是否独立,这些性质都成立。但方差的行为不同:Var(aX + b) = a² Var(X);加上一个常数会平移分布但不改变其离散程度。
When X and Y are independent, E(XY) = E(X) E(Y) and Var(X + Y) = Var(X) + Var(Y). If independence does not hold, the variance of the sum also involves covariance. These properties are repeatedly used in IB exam problems to simplify calculations involving linear combinations of random variables.
当 X 和 Y 相互独立时,有 E(XY) = E(X) E(Y) 以及 Var(X + Y) = Var(X) + Var(Y)。如果不独立,和的方差还会涉及协方差。这些性质在 IB 考试题目中反复出现,用于简化涉及随机变量线性组合的计算。
8. The Discrete Uniform Distribution | 离散均匀分布
The simplest discrete distribution is the uniform distribution, where a finite number of outcomes are equally likely. If X has a discrete uniform distribution over n possible values, say 1, 2, …, n, then f(x) = 1/n for each x. A fair die is a classic example with n = 6.
最简单的离散分布是均匀分布,其中有限个结果可能性相等。如果 X 在 n 个可能取值(例如 1, 2, …, n)上服从离散均匀分布,则对每个 x 有 f(x) = 1/n。一个典型的例子是均匀的六面骰子,此时 n = 6。
The expected value of a uniform distribution on 1 to n is (n + 1)/2, and the variance is (n² – 1)/12. These formulas are derived from the PMF and can be useful shortcuts. IB students should also be comfortable with uniform distributions defined over any set, such as {a, a+1, …, b} with equal probabilities.
从 1 到 n 的均匀分布的期望值是 (n + 1)/2,方差是 (n² – 1)/12。这些公式由 PMF 推导而来,可作为有用的捷径。IB 学生还应能够处理定义在任何集合上的均匀分布,例如概率均等的 {a, a+1, …, b}。
9. The Bernoulli and Binomial Distributions | 伯努利分布与二项分布
A Bernoulli trial is a single experiment with exactly two possible outcomes: success (1) or failure (0), with probability p for success. The Bernoulli distribution’s PMF is f(x) = pˣ(1-p)¹⁻ˣ for x = 0,1. Its mean is p, and variance is p(1-p).
伯努利试验是恰好有两种可能结果的一次实验:成功(1)或失败(0),成功的概率为 p。伯努利分布的 PMF 为:当 x = 0,1 时,f(x) = pˣ(1-p)¹⁻ˣ。其均值为 p,方差为 p(1-p)。
When n independent Bernoulli trials are performed with the same success probability p, the total number of successes X follows a binomial distribution: X ~ B(n, p). The PMF is P(X = k) = C(n, k) pᵏ (1-p)ⁿ⁻ᵏ for k = 0,1,…,n. The binomial coefficient C(n, k) is the number of ways to choose k successes from n trials.
当进行 n 次独立的、每次成功概率都是 p 的伯努利试验时,总成功次数 X 服从二项分布:X ~ B(n, p)。其 PMF 为 P(X = k) = C(n, k) pᵏ (1-p)ⁿ⁻ᵏ,其中 k = 0,1,…,n。二项式系数 C(n, k) 是从 n 次试验中选出 k 次成功的方式数。
The expected value of a binomial random variable is E(X) = np, and variance is Var(X) = np(1-p). The binomial distribution models numerous real-world scenarios, such as the number of defective items in a sample or the number of correct answers on a multiple-choice test.
二项随机变量的期望值为 E(X) = np,方差为 Var(X) = np(1-p)。二项分布可以模拟众多现实场景,比如样本中缺陷品的数量或多项选择题中答对的数量。
10. The Poisson Distribution | 泊松分布
The Poisson distribution models the number of random events occurring in a fixed interval of time or space, given a known average rate λ (lambda) and independence between events. It is often applied to model rare events. If X ~ Po(λ), its PMF is P(X = k) = (λᵏ e⁻ᴧ) / k! for k = 0,1,2,….
泊松分布用于模拟在固定时间或空间间隔内随机事件发生的次数,给定已知的平均发生率 λ(lambda)且事件之间相互独立。它常用于模拟稀有事件。如果 X ~ Po(λ),其 PMF 为 P(X = k) = (λᵏ e⁻ᴧ) / k!,其中 k = 0,1,2,…。
The mean and variance of a Poisson random variable are both equal to λ, which is a unique and convenient property. In the IB syllabus, students are expected to approximate binomial probabilities using the Poisson distribution when n is large and p is small, with λ = np. This approximation simplifies calculations significantly.
泊松随机变量的均值和方差都等于 λ,这是一个独特又方便的性质。在 IB 课程中,要求学生能够在 n 很大而 p 很小时用泊松分布近似二项概率,取 λ = np。这种近似能大大简化计算。
A typical example: the number of calls arriving at a call centre in 5 minutes averages 3. Then X ~ Po(3), and P(X = 2) = (3² e⁻³)/2! ≈ 0.224. It is vital to ensure that events occur independently and at a constant average rate when using the Poisson model.
典型例子:某呼叫中心每 5 分钟平均接到 3 个电话。则 X ~ Po(3),且 P(X = 2) = (3² e⁻³)/2! ≈ 0.224。使用泊松模型时,必须确保事件独立发生且平均发生率为常数。
11. Working with Probability Distributions in Context | 在情境中处理概率分布
IB exam questions often require students to switch between probability distributions, extract parameters from word problems, and combine expected values and variances. A common task is to set up a discrete distribution from a table, verify that probabilities sum to 1, and then compute E(X) and Var(X) to interpret real-world meaning.
IB 考试题目常常要求学生灵活运用概率分布,从文字题中提取参数,并结合期望与方差进行计算。常见任务是依据表格建立离散分布,验证概率之和为 1,然后计算 E(X) 和 Var(X) 并解释其现实意义。
For instance, a game spinner yields prizes of $0, $5, $10 with probabilities 0.5, 0.3, 0.2. The expected winnings per spin are E(X) = 0×0.5+5×0.3+10×0.2 = 3.5 dollars. If the game costs $4 to play, the expected gain is E(X) – 4 = –0.5 dollars, showing a long-term loss. Such reasoning underpins decision-making in probability problems.
例如,一个游戏转盘可赢得 0 美元、5 美元、10 美元,概率分别为 0.5、0.3、0.2。每次旋转的期望赢利为 E(X) = 0×0.5+5×0.3+10×0.2 = 3.5 美元。如果参与游戏花费 4 美元,期望收益为 E(X) – 4 = –0.5 美元,表明长期会亏损。这类推理是概率问题中决策的基础。
Using a GDC or spreadsheets, students can efficiently compute binomial or Poisson probabilities. However, the IB also expects an understanding of underlying formulas, especially when deriving theoretical results or solving for unknown parameters like p or n in binomial distributions.
使用图形计算器或电子表格,学生可以高效计算二项或泊松概率。然而,IB 也要求理解底层公式,尤其是在推导理论结果或求解二项分布中的未知参数(如 p 或 n)时。
12. Summary and Key Takeaways | 总结与关键要点
Discrete random variables turn real-world randomness into a structured mathematical framework. The core concepts of PMF, CDF, expectation, and variance provide tools to describe and predict outcomes. The binomial and Poisson distributions are powerful models for counting events, each with its own assumptions and formulas. Mastery of these topics not only secures high marks in the IB examination but also builds a strong foundation for further study in probability, statistics, and data science.
离散随机变量将现实世界的随机性转化为结构化的数学框架。PMF、CDF、期望和方差的核心概念提供了描述和预测结果的工具。二项分布和泊松分布是计算事件次数的强大模型,各自有其假设和公式。熟练掌握这些主题不仅能确保在 IB 考试中获得高分,还能为进一步学习概率、统计和数据科学打下坚实的基础。
Always remember to check that probabilities sum to 1, to distinguish between P(X = k) and P(X ≤ k), and to apply the correct variance formulas for independence. With consistent practice on past paper problems, discrete random variables will become a reliable and straightforward component of your IB mathematics journey.
始终记得检查概率总和为 1,区分 P(X = k) 与 P(X ≤ k),并在独立条件下使用正确的方差公式。通过持续练习历年真题,离散随机变量将成为你 IB 数学之旅中一个可靠且直截了当的组成部分。
Published by TutorHao | Mathematics Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导Cancel reply