📚 8A Discrete Random Variables | 8A 离散随机变量
A discrete random variable is a fundamental concept in probability and statistics, representing a variable that can take a countable number of distinct values, each with an associated probability. In IB Mathematics, understanding discrete random variables allows you to model and analyze situations ranging from games of chance to real-world data. This article covers key ideas such as probability mass functions, expectation, variance, the binomial distribution, and the Poisson distribution, equipping you with both theoretical insight and practical problem-solving skills.
离散随机变量是概率与统计中的基本概念,它表示一个可以取可数个不同值的变量,每个值都有对应的概率。在 IB 数学中,理解离散随机变量可以帮助你对从概率游戏到真实世界数据的各种情境进行建模和分析。本文涵盖概率质量函数、期望、方差、二项分布和泊松分布等关键内容,为你提供理论洞察和实际解题能力。
1. What is a Discrete Random Variable? | 什么是离散随机变量?
A random variable is a function that assigns a numerical value to each outcome in a sample space. It is called discrete if its set of possible values is finite or countably infinite. For example, the number of heads when tossing three coins is a discrete random variable taking values 0, 1, 2, and 3.
随机变量是一个将样本空间中的每个结果赋予一个数值的函数。如果它可能的取值集合是有限集或可数无限集,则称之为离散的。例如,抛掷三枚硬币时出现正面的次数就是一个离散随机变量,其取值为 0、1、2 和 3。
P(X = x) represents the probability that the random variable X equals a specific value x.
我们通常用大写字母(如 X)表示随机变量,用小写字母(如 x)表示它具体的观测值。记号 P(X = x) 表示随机变量 X 等于特定值 x 的概率。
A discrete random variable is completely described by its probability distribution, which lists each possible value together with its probability. For a valid distribution, each probability must be between 0 and 1, and the sum of all probabilities must equal 1.
离散随机变量由其概率分布完全描述,概率分布列出了每一个可能的取值及其概率。对于一个有效的分布,每个概率必须在 0 到 1 之间,且所有概率之和必须等于 1。
2. Probability Mass Function (PMF) | 概率质量函数
x. For a fair six-sided die, the PMF is constant: P(X = x) = 1/6 for x = 1, 2, 3, 4, 5, 6.
概率质量函数,记作 p(x) 或 P(X = x),给出了离散随机变量 X 取值为 x 的概率。对于一枚均匀的六面骰子,概率质量函数是常数:当 x = 1, 2, 3, 4, 5, 6 时,P(X = x) = 1/6。
When presenting a PMF, a table is often a clear and effective method. For instance, the distribution of the sum of two dice can be tabulated with values 2 to 12 and their corresponding probabilities.
在展示概率质量函数时,表格通常是一种清晰有效的方式。例如,两个骰子点数之和的分布可以用表格列出取值 2 到 12 及其对应的概率。
| 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 |
Checking these conditions is often the first step in verifying a probability distribution.
概率质量函数必须满足两个条件:对所有 x 有 0 ≤ P(X = x) ≤ 1,且 Σ P(X = x) = 1。检查这些条件通常是验证概率分布的第一步。
3. Expected Value E(X) | 期望值 E(X)
The expected value, or mean, of a discrete random variable X is a measure of its central tendency. It is computed as the probability-weighted average of all possible values:
离散随机变量 X 的期望值(或称均值)是其集中趋势的度量。它由所有可能值的概率加权平均计算得出:
E(X) = Σ x·P(X = x)
For example, for a fair die, E(X) = 1×(1/6) + 2×(1/6) + … possible value of X; you cannot roll a 3.5, but over many rolls the average tends to 3.5.
例如,对于一枚均匀骰子,E(X) = 1×(1/6) + 2×(1/6) + … + 6×(1/6) = 21/6 = 3.5。注意,期望值不一定是 X 的一个可能取值;你不可能掷出 3.5,但在大量抛掷后平均值趋于 3.5。
Expected value has a straightforward interpretation as the long-run average outcome if an experiment is repeated many times independently. In decision-making, it helps us evaluate the fairness of a game or the profitability of an investment.
期望值有一个直观的解释:如果实验独立地重复许多次,它就是长期的平均结果。在决策中,它帮助我们评价一场游戏的公平性或一项投资的盈利性。
4. Variance and Standard Deviation | 方差与标准差
Variance measures the spread or variability of a distribution. It is the expected value of the squared deviation from the mean. The formula is:
方差衡量分布的离散程度或变异性。它是偏离均值的平方的期望值。公式为:
Var(X) = E[(X − μ)²] = Σ (x − μ)² P(X = x)
A more convenient computational formula is Var(X) = E(X²) − [E(X)]² x² P(X = x). This is particularly useful when working with raw data or probability tables.
一个更方便的计算公式是 Var(X) = E(X²) − [E(X)]²,其中 E(X²) = Σ x² P(X = x)。这在处理原始数据或概率表时特别有用。
The standard deviation is the positive square root of the variance, denoted by σ. It is expressed in the same units as the random variable and thus is often more interpretable than variance alone.
标准差是方差的正平方根,记作 σ。它与随机变量的单位相同,因此通常比方差更易解释。
For the fair die example, E(X²) = 1²/6 + 2²/6 + … = 91/6 ≈ 15.167, and E(X) = 3.5, so Var(X) = 91/6 − 12.25 = 35/12 ≈ 2.917. Then σ ≈ 1.708.
对于均匀骰子的例子,E(X²) = 1²/6 + 2²/6 + … + 6²/6 = 91/6 ≈ 15.167,E(X) = 3.5,所以 Var(X) = 91/6 − 12.25 = 35/12 ≈ 2.917,σ ≈ 1.708。
5. Linear Transformations | 线性变换
aX + b, where a and b are constants, the new expectation and variance follow simple rules:
如果我们对随机变量 X 进行线性变换得到 Y = aX + b,其中 a 和 b 为常数,则新变量的期望和方差遵循简单的规则:
E(aX + b) = a E(X) + b
Var(aX + b) = a² Var(X)
The addition of b shifts the mean by b but does not affect the variance. Multiplying by a scales both the mean and the standard deviation by |a|, while the variance is scaled by a².
加上 b 使得均值平移 b 个单位,但不影响方差。乘以 a 会使得均值和标准差按 |a| 倍缩放,而方差按 a² 倍缩放。
ar(X). These properties are extremely useful when converting units or adjusting raw scores.
例如,如果测验分数为 X,老师先加 5 分再将结果翻倍,即 Y = 2(X + 5) = 2X + 10。则 E(Y) = 2 E(X) + 10,Var(Y) = 4 Var(X)。这些性质在单位换算或调整原始分数时极为有用。
6. The Binomial Distribution | 二项分布
A binomial setting arises when we repeat an independent trial a fixed number of times, each trial having only two possible outcomes (success or failure), with a constant probability of success p. The number of successes, X, in n trials follows a binomial distribution, written X ~ B(n, p).
当我们将一个独立的试验重复固定次数,每次试验只有两种可能结果(成功或失败),且成功的概率 p 保持不变时,就构成了二项分布的条件。在 n 次试验中成功的次数 X 服从二项分布,记作 X ~ B(n, p)。
The probability mass function for a binomial random variable is given by:
二项随机变量的概率质量函数由下式给出:
P(X = r) = ⁿCᵣ pʳ (1 − p)ⁿ⁻ʳ, r = 0, 1, 2, …, n
Here ⁿCᵣ is the binomial coefficient, sometimes written as nCr or nCr. It counts the number of ways to choose r successes out of n trials. Typical examples include the number of heads in coin flips, the number of defective items in a batch, or the number of correct answers in a multiple-choice quiz.
其中 ⁿCᵣ 是二项式系数,有时写作 nCr。它计算的是从 n 次试验中选择 r 次成功的方式数。典型例子包括硬币抛掷中正面朝上的次数、一批产品中次品的数量,或单选题测验中答对的数量。
To use a binomial model, check the four conditions: fixed number of trials, two possible outcomes per trial, constant probability of success, and independence among trials.
要使用二项模型,需检查四个条件:试验次数固定、每次试验的结果只有两种、成功的概率不变、试验之间相互独立。
7. Mean and Variance of the Binomial Distribution | 二项分布的均值与方差
If X ~ B(n, p), then the expected value and variance are:
若 X ~ B(n, p),则期望值和方差为:
E(X) = np
Var(X) = np(1 − p)
These formulas can be derived from the summation definitions or from the fact that a binomial random variable is the sum of n independent Bernoulli trials each with mean p and variance p(1 − p).
这些公式可以通过求和定义推导得到,也可以利用二项随机变量是 n 个独立伯努利试验之和这一事实(每个伯努利试验的均值为 p,方差为 p(1 − p))。
For instance, if a fair coin is tossed 10 times, X ~ hen E(X) = 10 × 0.5 = 5, and Var(X) = 10 × 0.5 × 0.5 = 2.5, giving a standard deviation of √2 t on average we expect 5 heads, with typical variations of about 1.6 heads from that mean.
例如,若将一枚公平硬币抛掷 10 次,X ~ B(10, 0.5),则 E(X) = 10 × 0.5 = 5,Var(X) = 10 × 0.5 × 0.5 = 2.5,标准差为 √2.5 ≈ 1.581。这告诉我们,平均期望 5 次正面,典型波动大约偏离均值 1.6 次正面。
8. The Poisson Distribution (HL) | 泊松分布(高级)
The Poisson distribution models the number of events that occur in a fixed interval of time or space, given that these events happen at a constant average rate and independently of each other. If X represents the count of such events in a given interval, we write X ~ Po(λ), where λ is the mean rate of occurrence.
泊松分布用于对固定时间或空间间隔内发生的事件数进行建模,前提是这些事件以恒定的平均速率发生且相互独立。如果 X 表示给定间隔内的事件计数,我们记作 X ~ Po(λ),其中 λ 是事件发生的平均速率。
The probability mass function for a Poisson random variable is:
泊松随机变量的概率质量函数为:
P(X = k) = (λᵏ e⁻λ) / k!, k = 0, 1, 2, …
Here e is Euler’s number (≈ 2.71828), and k! umber of phone calls per minute at a call centre or the number of typing errors on a page.
这里 e 是欧拉数(≈ 2.71828),k! 表示 k 的阶乘。泊松分布在稀有事件的分析中特别有用,例如呼叫中心每分钟接听的电话数或一页纸上的打字错误数。
ith λ = np. This simplifies calculations when exact binomial probabilities are cumbersome.
当 n 很大而 p 很小时,泊松分布常用作二项分布 B(n, p) 的近似,此时 λ = np。当精确的二项概率计算繁琐时,这可以简化计算。
9. Mean and Variance of the Poisson Distribution | 泊松分布的均值与方差
A distinctive property of the Poisson distribution is that both its mean and its variance are equal to λ:
泊松分布的一个独特性质是其均值和方差都等于 λ:
E(X) = λ
Var(X) = λ
This makes the distribution easy to handle in modeling because a single parameter λ controls both the location and spread of the distribution. As λ increases, the distribution shifts to the right and becomes more symmetric; for small λ, it is noticeably skewed to the right.
这使得该分布在建模中容易处理,因为单个参数 λ 同时控制分布的位置和离散程度。随着 λ 增大,分布向右移动且变得更加对称;当 λ 较小时,它明显右偏。
iance is also 2. The probability of observing exactly 3 particles is P(X = 3) = (2³ e⁻²)/3! ≈ 0.1804.
例如,若一个放射源每分钟发射 2 个粒子,λ = 2。则在给定的一分钟内,平均预期 2 个粒子,方差也是 2。观测到恰好 3 个粒子的概率为 P(X = 3) = (2³ e⁻²)/3! ≈ 0.1804。
10. Using the GDC for Discrete Distributions | 使用图形计算器进行离散分布
In IB examinations, you are expected to use a graphical display calculator (GDC) to compute probabilities, cumulative probabilities, and inverse values for binomial and Poisson distributions. For a binomial distribution B(n, p), the calculator functions binompdf(n, p, x) and binomcdf(n, p, x) give P(X = x) and P(X ≤ x) respectively.
在 IB 考试中,你应使用图形计算器(GDC)来计算二项分布和泊松分布的概率、累积概率和逆运算。对于二项分布 B(n, p),计算器函数 binompdf(n, p, x) 和 binomcdf(n, p, x) 分别给出 P(X = x) 和 P(X ≤ x)。
Similarly, for Poisson distribution Po(λ), poissonpdf(λ, k) gives P(X = k), and poissoncdf(λ, k) ble to switch efficiently between pdf and cdf functions, and to use the solver for finding ‘x given probability’, is essential for exam success.
类似地,对于泊松分布 Po(λ),poissonpdf(λ, k) 给出 P(X = k),poissoncdf(λ, k) 给出 P(X ≤ k)。能否有效地在 pdf 和 cdf 函数之间切换,并使用求解器求“给定概率下的 x”,对考试成功至关重要。
When answering questions, always state which distribution you are using, list the parameters, and clearly show the calculator input or output. Even if the GDC does the heavy lifting, clear communication of your reasoning is required for method marks.
答题时,务必说明你正在使用的分布、列出参数,并清晰地展示计算器输入或输出。即使 GDC 承担了主要计算工作,也要清晰地传达你的推理过程以获得方法分。
11. Modeling with Discrete Distributions | 离散分布建模
Choosing the correct discrete distribution is a key skill. Ask whether trials are repeated (binomial) or events occur randomly over an interval (Poisson). Look for fixed n and constant p for binomial; look for a known average rate and independent events for Poisson. In some contexts, you may need to combine distributions or approximate a binomial with a Poisson.
选择正确的离散分布是一项关键技能。要问清楚:试验是否重复(二项分布)还是事件在某个区间内随机发生(泊松分布)。寻找固定的 n 和恒定的 p 以确定二项分布;寻找已知平均速率和独立事件以确定泊松分布。在某些情境中,你可能需要结合分布或用泊松分布近似二项分布。
≥ 3) involves cumulative complements. Understanding the link between pdf and cdf is vital.
对于二项模型,你可能需要计算成功次数超过某个值的概率,即 P(X > x) = 1 − P(X ≤ x)。对于泊松模型,计算诸如 P(X ≥ 3) 的概率需用到累积分布的补集。理解 pdf 和 cdf 之间的联系至关重要。
Real-world scenarios often include checking assumptions. For instance, if calls arrive at a helpline independently at an average of 4 per minute, modeling the number of calls per 2-minute period as Po(8) requires valid independence and a steady rate. Be prepared to critique models by examining whether conditions hold.
真实世界情形常常包括检查假设。例如,如果求助热线电话以平均每分钟 4 个独立到达,那么将每两分钟的电话数建模为 Po(8) 需要有效的独立性和稳定的速率。准备好通过检验条件是否成立来对模型进行评判。
12. Summary and Common Pitfalls | 总结与常见错误
Discrete random variables form the backbone of many probability models. Remember to always verify that a given probability distribution sums to 1 before proceeding. When calculating variance, using the short-cut formula E(X²) − [E(X)]² is often faster, but ensure you correctly compute E(X²).
离散随机变量构成了许多概率模型的支柱。请记住,在进行计算之前,务必验证给定的概率分布之和为 1。计算方差时,使用快捷公式 E(X²) − [E(X)]² 通常更快,但要确保你正确计算了 E(X²)。
For the binomial distribution, a common mistake is forgetting that the exponent for (1 − p) is n − r, not r. For the Poisson, misapplying the mean as the variance in all contexts and forgetting that k! grows rapidly can cause errors. Always use GDC factorial or probability functions to avoid manual miscalculations.
对于二项分布,一个常见错误是忘记 (1 − p) 的指数是 n − r 而不是 r。对于泊松分布,在所有情境中错误地认为均值等于方差以及遗忘 k! 增长极快都可能导致错误。务必使用 GDC 的阶乘或概率函数以避免人工计算失误。
Finally, practice translating word problems into mathematical statements: “at least”, “more than”, “between” all have precise cumulative probability interpretations. With a solid understanding of the theory and consistent use of technology, discrete random variables will become a confident area in your IB Mathematics revision.
最后,要练习将文字题转化为数学表达:“至少”、“超过”、“介于”等词都有精确的累积概率解释。凭借扎实的理论理解和持续使用技术,离散随机变量将成为你 IB 数学复习中一个有信心的领域。
Published by TutorHao | IB Mathematics Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)

或截图后用「扫一扫 → 相册」选择本图