📚 IB Mathematics: The Cumulative Distribution Function | IB数学:累积分布函数
The cumulative distribution function (CDF) is one of the most powerful ideas in probability and statistics. In IB Mathematics, whether you are studying Analysis and Approaches (AA) or Applications and Interpretation (AI), the CDF connects probability density functions, probability calculations, and quantiles in a single elegant framework.
累积分布函数是概率统计中最重要的概念之一。无论是在IB数学的“分析与方法”还是“应用与解释”课程中,累积分布函数都用一种简洁而优雅的方式将概率密度函数、概率计算和分位数联系在一起。
1. What Is a Cumulative Distribution Function? | 什么是累积分布函数?
A cumulative distribution function, usually denoted F(x), gives the probability that a random variable X takes a value less than or equal to x. In other words, it is the accumulated probability up to that point.
累积分布函数通常用F(x)表示,它给出随机变量X取值小于或等于x的概率。换句话说,它是到x这一点为止累积起来的概率。
F(x) = P(X ≤ x)
This single formula is the definition of the CDF. For any number x, F(x) must always lie between 0 and 1, because it represents a probability.
这单个公式就是累积分布函数的定义。对于任意数x,F(x)必须始终在0到1之间,因为它表示一个概率。
2. Key Properties of the CDF | 累积分布函数的核心性质
Every cumulative distribution function satisfies a set of fundamental properties. These properties are essential for solving IB exam questions and for checking whether a given function is a valid CDF.
每一个累积分布函数都满足一组基本性质。这些性质对于解答IB考试题目以及判断一个函数是否为有效的累积分布函数都至关重要。
-
F(x) is non-decreasing: If a < b, then F(a) ≤ F(b). Probabilities accumulate as x increases.
F(x)是非减的:若a < b,则F(a) ≤ F(b)。随着x增大,累积的概率不会减少。
-
Limits at infinity: As x → −∞, F(x) → 0; as x → +∞, F(x) → 1.
无穷处的极限:当x → −∞时,F(x) → 0;当x → +∞时,F(x) → 1。
-
Right-continuity: In technical terms, F(x) is right-continuous. This matters mainly for discrete random variables.
右连续性:从技术角度说,F(x)是右连续的。这一点主要对离散型随机变量很重要。
0 ≤ F(x) ≤ 1 and F(a) ≤ F(b) whenever a < b
If any of these conditions fail, the function cannot be a valid cumulative distribution function. IB questions sometimes ask you to verify this explicitly.
如果这些条件中任意一条不满足,该函数就不可能是有效的累积分布函数。IB题目有时会要求你明确验证这一点。
3. CDF for Discrete Random Variables | 离散型随机变量的累积分布函数
For a discrete random variable with probability mass function p(x), the cumulative distribution function is found by summing all probabilities where the value is less than or equal to x.
对于具有概率质量函数p(x)的离散型随机变量,累积分布函数通过将所有小于或等于x的值对应的概率相加得到。
F(x) = Σ p(xᵢ) for all xᵢ ≤ x
Because the random variable takes distinct separate values, the CDF is a step function. It remains constant between values and jumps at each possible outcome.
由于离散型随机变量取的是一个个分开的数值,累积分布函数是一个阶梯函数。它在各个取值之间保持不变,并在每个可能取值处发生跳跃。
For example, if X can take values 1, 2 and 3 with probabilities 0.2, 0.3 and 0.5, then F(1) = 0.2, F(2) = 0.5 and F(3) = 1. At x = 2.5, F(2.5) still equals 0.5, because no probability mass lies between 2 and 3.
例如,若X可取值为1、2、3,对应概率为0.2、0.3和0.5,则F(1) = 0.2,F(2) = 0.5,F(3) = 1。在x = 2.5时,F(2.5)仍然等于0.5,因为在2和3之间没有概率分布。
4. CDF for Continuous Random Variables | 连续型随机变量的累积分布函数
For a continuous random variable, the probability distribution is described by a probability density function f(x). The CDF is then the integral of f(t) from negative infinity up to x.
对于连续型随机变量,概率分布由概率密度函数f(x)描述。此时累积分布函数是f(t)从负无穷到x的积分。
F(x) = ∫₋∞ˣ f(t) dt
This means that F(x) represents the area under the density curve to the left of x. The curve itself can go above 1, but the cumulative area must never exceed 1.
这意味着F(x)表示密度曲线在x左侧所围成的面积。曲线本身可能超过1,但累积面积绝不能超过1。
For continuous random variables, the CDF is a smooth, continuous and non-decreasing function, with no jumps. This is a key visual difference from the discrete case.
对于连续型随机变量,累积分布函数是平滑、连续且非减的,没有跳跃。这是与离散情形在图像上的关键区别。
5. Relationship Between PDF and CDF | 概率密度函数与累积分布函数的关系
The density function f(x) and the cumulative distribution function F(x) are intimately connected. In fact, one can be recovered from the other.
密度函数f(x)与累积分布函数F(x)密切相关。事实上,可以由其中一个恢复出另一个。
-
From PDF to CDF: integrate the density function.
从PDF到CDF:对密度函数求积分。
-
From CDF to PDF: differentiate the cumulative distribution function.
从CDF到PDF:对累积分布函数求导。
F'(x) = f(x)
This relationship is a cornerstone of IB probability questions. If you are given a density function, you can integrate to find probabilities; if you are given a CDF, you can differentiate to recover the density.
这一关系是IB概率题目的基石。如果给定了密度函数,你可以通过积分求概率;如果给定了累积分布函数,你可以通过求导恢复密度函数。
Remember that the derivative of a CDF is only valid at points where F is differentiable. For piecewise-defined functions, check each interval separately.
请记住,累积分布函数的导数仅在F可导的点上成立。对于分段定义的函数,需要分别检查每个区间。
6. Using the CDF to Find Probabilities | 利用累积分布函数求概率
The CDF allows us to rewrite interval probabilities in a simple way. For any two numbers a and b with a < b, the probability that X lies between them is the difference of two CDF values.
累积分布函数让我们可以用简单的方式改写区间概率。对于任意两个满足a < b的数a和b,X落在它们之间的概率等于两个累积分布函数值的差。
P(a < X ≤ b) = F(b) − F(a)
For continuous random variables, it makes no difference whether the inequality is strict or inclusive, because the probability of a single exact value is zero.
对于连续型随机变量,使用严格不等式还是包含等号的不等式没有区别,因为单个精确值的概率为零。
For discrete random variables, however, the difference matters. You must check whether the endpoints are included or excluded before using the formula.
然而对于离散型随机变量,区别很重要。在使用公式之前,你必须要检查端点是否包含在内。
Another common identity is the complement rule: P(X > x) = 1 − F(x). This is especially useful when the table or function gives only left-tail probabilities.
另一个常用恒等式是补集法则:P(X > x) = 1 − F(x)。当表格或函数只给出左尾概率时,这一点特别有用。
7. The Inverse CDF and Quantiles | 反累积分布函数与分位数
If F is a cumulative distribution function, the inverse CDF answers the question: what value of x corresponds to a given cumulative probability p?
如果F是累积分布函数,反累积分布函数回答的问题是:对于给定的累积概率p,对应的x值是多少?
F⁻¹(p) = x such that F(x) = p
This is also called the p-quantile or the 100pth percentile. For example, F⁻¹(0.5) is the median, and F⁻¹(0.25) is the lower quartile.
这也被称为p分位数或第100p百分位数。例如,F⁻¹(0.5)是中位数,F⁻¹(0.25)是下四分位数。
For continuous random variables, the inverse is found by solving F(x) = p algebraically. For discrete random variables, we use the smallest x for which F(x) is at least p.
对于连续型随机变量,通过解方程F(x) = p来求逆。对于离散型随机变量,我们使用满足F(x) ≥ p的最小x值。
In IB exams, inverse CDF calculations are often performed using a graphical calculator, especially for normal distributions. However, simple algebraic cases still appear, so practice both methods.
在IB考试中,尤其是正态分布的情况下,反累积分布函数的计算通常使用图形计算器完成。然而,简单的代数情形仍然会出现,所以两种方法都需要练习。
8. Median and Interquartile Range via the CDF | 用累积分布函数求中位数和四分位距
Once you have the CDF, finding measures of central tendency and spread becomes straightforward. The median is simply the 0.5 quantile.
一旦有了累积分布函数,求集中趋势和离散程度的度量就变得很直接。中位数就是0.5分位数。
-
Median: solve F(m) = 0.5.
中位数:解方程F(m) = 0.5。
-
Lower quartile: solve F(q₁) = 0.25.
下四分位数:解方程F(q₁) = 0.25。
-
Upper quartile: solve F(q₃) = 0.75.
上四分位数:解方程F(q₃) = 0.75。
The interquartile range is then IQR = q₃ − q₁. This gives a non-parametric measure of spread that is often more robust than the standard deviation.
四分位距为IQR = q₃ − q₁。这给出了一种非参数的离散程度度量,通常比标准差更稳健。
These quantities are particularly important in Applications and Interpretation, where statistical reasoning with real-world data is a major topic.
这些量在“应用与解释”课程中尤为重要,因为利用真实数据进行统计分析是一个主要主题。
9. Worked Example: Continuous CDF | 例题:连续型累积分布函数
Let X be a continuous random variable with probability density function f(x) = 2x for 0 ≤ x ≤ 1, and f(x) = 0 otherwise. We can find the CDF step by step.
设X为连续型随机变量,其概率密度函数为f(x) = 2x,其中0 ≤ x ≤ 1,其他情况下f(x) = 0。我们可以逐步求出累积分布函数。
For x < 0, the cumulative probability is zero, so F(x) = 0. For 0 ≤ x ≤ 1, integrate the density from 0 to x.
当x < 0时,累积概率为零,因此F(x) = 0。当0 ≤ x ≤ 1时,从0到x对密度函数积分。
F(x) = ∫₀ˣ 2t dt = x²
For x > 1, the total probability must be 1, so F(x) = 1. Therefore the complete CDF is:
当x > 1时,总概率必须为1,因此F(x) = 1。所以完整的累积分布函数为:
| x < 0 | 0 ≤ x ≤ 1 | x > 1 |
| F(x) = 0 | F(x) = x² | F(x) = 1 |
Now suppose we want P(0.2 < X < 0.6). Using the CDF, this is F(0.6) − F(0.2) = 0.36 − 0.04 = 0.32.
现在假设我们要求P(0.2 < X < 0.6)。利用累积分布函数,这是F(0.6) − F(0.2) = 0.36 − 0.04 = 0.32。
To find the median, solve F(m) = 0.5, which gives m² = 0.5, so m = √0.5 ≈ 0.707.
要求中位数,解F(m) = 0.5,得到m² = 0.5,因此m = √0.5 ≈ 0.707。
10. Worked Example: Discrete CDF | 例题:离散型累积分布函数
Consider a discrete random variable Y with probability distribution as shown in the table below.
考虑一个离散型随机变量Y,其概率分布如下表所示。
| y | 1 | 2 | 3 | 4 |
| P(Y = y) | 0.1 | 0.2 | 0.3 | 0.4 |
| F(y) | 0.1 | 0.3 | 0.6 | 1.0 |
To find P(Y ≤ 3), read directly from the table: F(3) = 0.6. To find P(Y > 2), use the complement: 1 − F(2) = 1 − 0.3 = 0.7.
要求P(Y ≤ 3),直接从表中读取:F(3) = 0.6。要求P(Y > 2),使用补集:1 − F(2) = 1 − 0.3 = 0.7。
To find the median, look for the smallest y where F(y) ≥ 0.5. Since F(3) = 0.6, the median is y = 3.
要求中位数,找到满足F(y) ≥ 0.5的最小的y。由于F(3) = 0.6,中位数为y = 3。
11. Common Mistakes and Exam Tips | 常见错误与考试提示
Many students lose marks on CDF questions because of small but important errors. Let us highlight the most frequent pitfalls.
许多学生在累积分布函数题目上失分,是因为一些微小但重要的错误。让我们指出最常见的陷阱。
-
Forgetting the piecewise form: A CDF must be defined for all real numbers, so always include the cases x < a and x > b.
忘记分段形式:累积分布函数必须对所有实数有定义,所以务必包括x < a和x > b的情形。
-
Using F(b) − F(a) incorrectly for discrete variables: If you need P(a ≤ X ≤ b), check whether the endpoints are included.
对离散型变量错误使用F(b) − F(a):如果需要P(a ≤ X ≤ b),要检查端点是否包含在内。
-
Confusing f(x) and F(x): f is the density, F is the cumulative function. They are different objects.
混淆f(x)和F(x):f是密度函数,F是累积分布函数。它们是不同的对象。
-
Forgetting that F is non-decreasing: If your graph or table shows a decrease, something is wrong.
忘记F是非减的:如果你的图像或表格显示下降,那一定出了问题。
On exam day, always check that F(∞) = 1 and that F never goes outside [0, 1]. These quick sanity checks may save you from careless mistakes.
考试当天,始终检查F(∞) = 1以及F不超出[0, 1]区间。这些快速检查可以帮助你避免粗心错误。
12. CDF in the Normal Distribution | 正态分布中的累积分布函数
The normal distribution is the most common continuous distribution in the IB syllabus. Its CDF does not have an elementary algebraic formula, so probabilities are found using technology or statistical tables.
正态分布是IB课程大纲中最常见的连续型分布。其累积分布函数没有初等代数公式,因此概率通常借助技术或统计表来求。
For a normal random variable X ~ N(μ, σ²), we standardize using Z = (X − μ) / σ. The CDF of Z is often denoted Φ(z) = P(Z ≤ z).
对于正态随机变量X ~ N(μ, σ²),我们通过Z = (X − μ) / σ进行标准化。Z的累积分布函数通常记为Φ(z) = P(Z ≤ z)。
To find P(X < a), compute x = (a − μ) / σ and then read Φ(z) from the table or calculator. The inverse CDF is used to find z values corresponding to given tail probabilities.
要求P(X < a),计算z = (a − μ) / σ,然后从表格或计算器读取Φ(z)。反累积分布函数用于求与给定尾部概率对应的z值。
In the IB exam, you are usually allowed a graphical calculator, so you can use functions such as normalCDF and inverseNormal directly. Still, understanding the underlying CDF logic helps you use these tools correctly.
在IB考试中,通常允许使用图形计算器,因此你可以直接使用normalCDF和inverseNormal等功能。然而,理解累积分布函数背后的逻辑有助于你正确使用这些工具。
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课程辅导,国外大学本科硕士研究生博士课程论文辅导