📚 IB Mathematics: Introduction to Discrete Bivariate Distributions | IB数学:离散二元分布入门
In IB Mathematics Analysis and Approaches Higher Level (and in some extended SL applications), you must go beyond single random variables and study how two discrete variables behave together. A discrete bivariate distribution describes the probabilities of every possible pair of outcomes (X, Y), allowing us to answer questions like “What is the probability that X equals 2 and Y equals 3?” or “Are X and Y related?” This article provides a complete introduction to this essential topic.
在IB数学分析与方法高阶(以及部分拓展的SL应用)中,你需要在单个随机变量之外,进一步研究两个离散变量如何共同表现。离散二元分布描述了所有可能结果对 (X, Y) 的概率,使我们能够回答”X等于2且Y等于3的概率是多少?”或”X与Y是否相关?”等问题。本文将为这一核心主题提供完整的入门讲解。
1. What Is a Bivariate Distribution? | 什么是二元分布?
A bivariate distribution is a probability model that involves two random variables simultaneously. When both variables are discrete (each taking only countably many values), we call the model a discrete bivariate distribution. Instead of asking about P(X = x) alone, we now track probabilities of the form P(X = x, Y = y) for every combination of values x and y.
二元分布是同时涉及两个随机变量的概率模型。当两个变量都是离散的(各自仅取可数个值)时,我们称该模型为离散二元分布。我们不再只关注 P(X = x),而是需要追踪所有可能的 (x, y) 组合所对应的概率 P(X = x, Y = y)。
For example, suppose X represents the number of red marbles drawn (0, 1, or 2) and Y represents the number of blue marbles drawn (0 or 1) from a bag in two draws. The full bivariate distribution tells us the probability of each combination, such as P(X = 1, Y = 1). This is far more informative than studying X and Y separately.
例如,设X表示从袋中两次抽取中抽到红球的数量(0、1或2),Y表示抽到蓝球的数量(0或1)。完整的二元分布告诉我们每种组合的概率,如 P(X = 1, Y = 1)。这远比分别研究X和Y更具信息量。
2. The Joint Probability Mass Function (Joint PMF) | 联合概率质量函数
For two discrete random variables X and Y, the joint probability mass function, denoted p(x, y), is defined as:
p(x, y) = P(X = x, Y = y)
This function assigns a probability to every possible ordered pair (x, y) in the joint support, which is the set of all pairs with non-zero probability.
对于两个离散随机变量X和Y,联合概率质量函数记作 p(x, y),定义如下:
p(x, y) = P(X = x, Y = y)
该函数为联合支撑集(即所有概率非零的有序对集合)中的每一对 (x, y) 分配一个概率。
In IB exam questions, the joint PMF is often presented as a two-way table. Rows correspond to values of X, columns to values of Y, and each cell contains the joint probability p(x, y). You must be comfortable reading and interpreting such tables.
在IB考试中,联合PMF通常以二维表格的形式呈现:行对应X的取值,列对应Y的取值,每个单元格包含联合概率 p(x, y)。你必须熟练阅读和理解这类表格。
3. Conditions for a Valid Joint PMF | 有效联合PMF的条件
Just like a single-variable PMF, a joint PMF must satisfy two fundamental conditions. First, every probability must be non-negative:
p(x, y) ≥ 0 for all x, y
Second, the sum of all joint probabilities over every possible pair must equal 1:
Σₓ Σᵧ p(x, y) = 1
与单变量PMF一样,联合PMF必须满足两个基本条件。首先,每个概率必须非负:
p(x, y) ≥ 0 对所有 x, y 成立
其次,所有可能的组合对应的联合概率之和必须等于1:
Σₓ Σᵧ p(x, y) = 1
These conditions may seem trivial, but examiners love including a missing or incorrect cell in a table and asking you to find it. The trick is to set up the equation shown above, plug in all known probabilities, and solve for the unknown.
这些条件看似简单,但考官喜欢在表格中留一个空缺或错误单元格,要求你求出它。技巧是列出上面的方程,代入所有已知概率,然后解出未知量。
4. Marginal Distributions | 边缘分布
The marginal distribution of X is obtained by summing the joint probabilities over all possible values of Y. Likewise, the marginal distribution of Y is obtained by summing over all values of X. These are written as follows:
P(X = x) = Σᵧ p(x, y) and P(Y = y) = Σₓ p(x, y)
X的边缘分布通过对Y的所有可能取值求和获得;同理,Y的边缘分布通过对X的所有取值求和获得:
P(X = x) = Σᵧ p(x, y) 和 P(Y = y) = Σₓ p(x, y)
In terms of a table, the marginal distribution of X is precisely the row sums, while the marginal distribution of Y is the column sums. These marginals are ordinary one-variable distributions, so all the tools you already know—expectation, variance, and so on—can be applied to them directly.
就表格而言,X的边缘分布正是行和,Y的边缘分布正是列和。这些边缘分布是普通的单变量分布,因此你已掌握的所有工具——期望、方差等——都可以直接应用。
It is important to note that different joint distributions can produce exactly the same marginals. Thus, the marginal distributions alone do not capture how X and Y are related; that information lives in the joint structure itself.
重要的是,不同的联合分布可能产生完全相同的边缘分布。因此,仅靠边缘分布无法反映X与Y之间的关系;相关信息存在于联合结构本身之中。
5. Conditional Distributions | 条件分布
When we know the value of one variable, we can update our beliefs about the other. The conditional probability that Y equals y, given that X equals x, is defined using the joint PMF:
P(Y = y | X = x) = p(x, y) / P(X = x)
whenever P(X = x) > 0. Similarly, the conditional distribution of X given Y = y is p(x, y) / P(Y = y).
当知道一个变量的取值后,我们可以更新对另一个变量的判断。在给定 X = x 的条件下,Y = y 的条件概率定义为:
P(Y = y | X = x) = p(x, y) / P(X = x)
只要 P(X = x) > 0 即可。类似地,在给定 Y = y 的条件下,X的条件分布为 p(x, y) / P(Y = y)。
For example, if you know that a randomly selected student passed one exam (X = pass), the conditional distribution of their grade in a second exam (Y) may shift compared to the overall marginal distribution. This concept connects directly to the Bayes formula and helps build intuition but is also used in computing expectations of conditional means in more advanced IB work.
例如,如果你知道某位随机选取的学生通过了第一门考试(X = pass),那么他在第二门考试中成绩(Y)的条件分布相对于总体边缘分布可能会发生变化。这一概念与贝叶斯公式直接相关,有助于建立直观理解,同时也用于IB进阶内容中条件期望的计算。
6. Independence of Discrete Random Variables | 离散随机变量的独立性
Two discrete random variables X and Y are independent if and only if the joint PMF factorises into the product of the two marginal PMFs for every pair (x, y):
X, Y independent ⇔ p(x, y) = P(X = x) × P(Y = y) for all x, y
两个离散随机变量X和Y是独立的,当且仅当对于每一对 (x, y),联合PMF都能分解为两个边缘PMF的乘积:
X, Y 独立 ⇔ p(x, y) = P(X = x) × P(Y = y) 对所有 x, y 成立
This condition must hold for every single pair. To disprove independence, you only need one counterexample—one cell where the product of marginals does not equal the joint probability. To prove independence, you must verify the condition for all cells in the table.
该条件必须对每一对取值都成立。要否定独立性,只需一个反例——某个单元格中边缘乘积不等于联合概率即可。要证明独立性,则必须验证表格中所有单元格都满足该条件。
Intuitively, independence means that knowing X provides zero information about Y. In many IB exam problems, an independence assumption is given explicitly (for example, “two independent dice are rolled”), which greatly simplifies joint probability calculations.
直观地说,独立性意味着知道X不提供关于Y的任何信息。在许多IB考试题中,独立性假设会明确给出(例如”同时掷两个独立骰子”),这大大简化了联合概率的计算。
7. Expected Value of a Function of Two Variables | 二元变量函数的期望
For any function g(X, Y) of two discrete random variables, the expected value is computed by weighting each value g(x, y) by the joint probability p(x, y), summed over all pairs:
E[g(X, Y)] = Σₓ Σᵧ g(x, y) p(x, y)
对任意两个离散随机变量的函数 g(X, Y),其期望值等于每个值 g(x, y) 以联合概率 p(x, y) 加权后对所有组合求和:
E[g(X, Y)] = Σₓ Σᵧ g(x, y) p(x, y)
Three special cases are especially important. First, taking g(x, y) = x gives E[X], which can be computed either directly from the joint PMF or from the marginal distribution—both give the same result. Second, g(x, y) = xy gives E[XY], known as the joint moment or the unnormalised correlation moment. Third, by linearity of expectation, E[aX + bY] = aE[X] + bE[Y] for any constants a and b, regardless of whether X and Y are independent.
有三个特例尤为重要。第一,取 g(x, y) = x 得到 E[X],既可以直接从联合PMF计算,也可以从边缘分布计算,两者结果相同。第二,g(x, y) = xy 得到 E[XY],称为联合矩或未归一化的相关矩。第三,由期望的线性性质,对任意常数 a 和 b,无论X和Y是否独立,都有 E[aX + bY] = aE[X] + bE[Y]。
However, be careful: E[XY] = E[X]E[Y] holds only when X and Y are independent. For dependent variables, this equality generally fails, and that gap defines the covariance introduced next.
但请注意:E[XY] = E[X]E[Y] 仅在X和Y独立时成立。对于相关的变量,该等式一般不成立,而这一差值正是下面要介绍的协方差。
8. Covariance and Correlation | 协方差与相关系数
Covariance measures the direction and strength of the linear relationship between X and Y. It is defined as:
Cov(X, Y) = E[XY] − E[X]E[Y]
协方差衡量X与Y之间线性关系的方向和强度,其定义为:
Cov(X, Y) = E[XY] − E[X]E[Y]
A positive covariance suggests that larger X values tend to coincide with larger Y values, while a negative covariance indicates an inverse tendency. Importantly, if X and Y are independent, then Cov(X, Y) = 0. The converse is false: zero covariance does not imply independence—the variables may have a purely non-linear relationship.
正的协方差表明X较大时Y也倾向于较大,负的协方差则表明反向趋势。重要的是,若X和Y独立,则 Cov(X, Y) = 0。但反之不成立:协方差为零并不意味独立——变量间可能存在纯粹的非线性关系。
Covariance has units that are difficult to interpret because they involve the product of the units of X and Y. The Pearson correlation coefficient removes this unit problem by standardising:
ρ(X, Y) = Cov(X, Y) / (σ_X × σ_Y)
协方差的单位是X和Y单位的乘积,难以直接解释。皮尔逊相关系数通过标准化消除单位影响:
ρ(X, Y) = Cov(X, Y) / (σ_X × σ_Y)
The correlation coefficient always satisfies −1 ≤ ρ ≤ 1. Values near 1 or −1 indicate a strong linear association; values near 0 indicate a weak or non-existent linear association. On the IB formula booklet you will also encounter the computational form of the sample correlation, but for bivariate distributions we use the population formula above with the known standard deviations.
相关系数始终满足 −1 ≤ ρ ≤ 1。值接近1或−1表示强线性关联;接近0表示弱或无线性关联。在IB公式手册中你还会看到样本相关系数的计算形式,但在二元分布中我们使用上述以已知标准差表示的总体公式。
9. Worked Example | 完整例题
Consider two discrete random variables X and Y with the following joint PMF:
| X \ Y | 0 | 1 |
| 0 | 0.2 | 0.3 |
| 1 | 0.1 | 0.4 |
First, verify the table is valid: all entries are non-negative and 0.2 + 0.3 + 0.1 + 0.4 = 1. ✓
首先验证表格的有效性:所有项非负,且 0.2 + 0.3 + 0.1 + 0.4 = 1。✓
Step 1 — Find the marginals. The row sums give P(X = 0) = 0.2 + 0.3 = 0.5 and P(X = 1) = 0.1 + 0.4 = 0.5. The column sums give P(Y = 0) = 0.2 + 0.1 = 0.3 and P(Y = 1) = 0.3 + 0.4 = 0.7.
第一步——求边缘分布。行和为 P(X = 0) = 0.2 + 0.3 = 0.5,P(X = 1) = 0.1 + 0.4 = 0.5。列和为 P(Y = 0) = 0.2 + 0.1 = 0.3,P(Y = 1) = 0.3 + 0.4 = 0.7。
Step 2 — Test independence. Check the cell (0, 0): P(X = 0)P(Y = 0) = 0.5 × 0.3 = 0.15, but p(0, 0) = 0.2. Since 0.15 ≠ 0.2, the variables are not independent.
第二步——检验独立性。检查单元格 (0, 0):P(X = 0)P(Y = 0) = 0.5 × 0.3 = 0.15,但 p(0, 0) = 0.2。由于 0.15 ≠ 0.2,变量不独立。
Step 3 — Compute expectations. E[X] = 0 × 0.5 + 1 × 0.5 = 0.5 and E[Y] = 0 × 0.3 + 1 × 0.7 = 0.7. Next, E[XY] = (0)(0)(0.2) + (0)(1)(0.3) + (1)(0)(0.1) + (1)(1)(0.4) = 0.4.
第三步——计算期望。E[X] = 0 × 0.5 + 1 × 0.5 = 0.5,E[Y] = 0 × 0.3 + 1 × 0.7 = 0.7。接着,E[XY] = (0)(0)(0.2) + (0)(1)(0.3) + (1)(0)(0.1) + (1)(1)(0.4) = 0.4。
Step 4 — Compute covariance. Cov(X, Y) = E[XY] − E[X]E[Y] = 0.4 − (0.5 × 0.7) = 0.4 − 0.35 = 0.05. The positive value indicates a weak positive linear relationship.
第四步——计算协方差。Cov(X, Y) = E[XY] − E[X]E[Y] = 0.4 − (0.5 × 0.7) = 0.4 − 0.35 = 0.05。正值表明存在微弱的正线性关系。
Step 5 — Compute the variances. E[X²] = 0² × 0.5 + 1² × 0.5 = 0.5, so Var(X) = 0.5 − 0.25 = 0.25 and σ_X = 0.5. Similarly, E[Y²] = 0² × 0.3 + 1² × 0.7 = 0.7, so Var(Y) = 0.7 − 0.49 = 0.21 and σ_Y = √0.21 ≈ 0.4583. Hence ρ = 0.05 / (0.5 × 0.4583) ≈ 0.218.
第五步——计算方差。E[X²] = 0² × 0.5 + 1² × 0.5 = 0.5,故 Var(X) = 0.5 − 0.25 = 0.25,σ_X = 0.5。类似地,E[Y²] = 0² × 0.3 + 1² × 0.7 = 0.7,故 Var(Y) = 0.7 − 0.49 = 0.21,σ_Y = √0.21 ≈ 0.4583。因此 ρ = 0.05 / (0.5 × 0.4583) ≈ 0.218。
10. Common Pitfalls and Exam Tips | 常见错误与考试技巧
A frequent mistake is confusing joint probabilities with conditional ones. The joint p(x, y) is the probability of both events occurring simultaneously, whereas the conditional probability involves dividing by the marginal of the conditioning variable. Always identify which one the question is asking for before you start computing.
一个常见错误是混淆联合概率与条件概率。联合概率 p(x, y) 是两个事件同时发生的概率,而条件概率需要用条件变量的边缘概率相除。动笔计算前,务必先判断题目要求的是哪一个。
Another common trap is assuming that Cov(X, Y) = 0 implies independence. This is false in general. Rather than memorising the converse, remember the correct logical chain: independence → zero covariance, but not zero covariance → independence.
另一个常见陷阱是认为 Cov(X, Y) = 0 一定意味着独立。这通常不成立。与其死记反命题,不如记住正确的逻辑链:独立 → 协方差为零,但协方差为零不推出独立。
When using a two-way table, always double-check that the total sum of the cells equals 1 before proceeding. Exam answers often depend on a single missing value found by this sum, and a small arithmetic slip can cascade through every subsequent part of the question.
使用二维表格时,务必先检查所有单元格之和是否等于1。考试答案往往依赖于通过求和得到的某个缺失值,一个小的算术错误会连锁影响后续所有部分。
-
Use the formula booklet carefully: you will find all the expectation, variance, covariance, and correlation formulas in the Statistics section. Write down every substitution clearly to earn method marks.
-
In “show that” questions for independence, state the condition explicitly, substitute the numbers, and conclude with a clear sentence about whether the equality holds or fails.
-
Practice reading tables both ways: row-wise for P(X = x) and column-wise for P(Y = y). The skills you build here carry directly into IB Paper 2 and Paper 3 statistics questions.
仔细使用公式手册:期望、方差、协方差和相关系数的公式都列在统计部分。清楚地写出每一步代入,以获取方法分。
在”证明”独立性的题目中,明确写出条件,代入数值,并用清晰的句子说明等式成立或不成立。
练习按两个方向阅读表格:按行求 P(X = x),按列求 P(Y = y)。这里建立的技能可直接用于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课程辅导,国外大学本科硕士研究生博士课程论文辅导