← 返回资讯屏轩教育 · 行业资讯

Piecewise Probability Density Functions: Joining and Validating | 分段概率密度函数的拼接与验证

2026-08-02 17:51 · 本文部分内容由AI辅助创作

📚 Piecewise Probability Density Functions: Joining and Validating | 分段概率密度函数的拼接与验证

Probability density functions (PDFs) often appear in several pieces when modelling real-world data that behave differently over separate intervals. In A-Level Edexcel Statistics, you will frequently meet questions requiring you to 'join' these pieces together by finding unknown constants, ensuring the total area under the curve equals one, and then using the completed function to calculate probabilities, medians, and cumulative distributions. This article walks you through the essential concepts step by step, with examples and common pitfalls to avoid.

概率密度函数(PDF)在模拟现实数据时经常会分段定义,因为不同区间内随机变量的行为可能不同。在 Edexcel A-Level 统计学中,你经常会遇到这样的题目:需要把若干段拼接起来,求出未知常数,保证曲线下总面积为 1,然后利用完整的密度函数计算概率、中位数和累积分布。本文将循序渐进地讲解这些核心概念,并配有实例与常见错误提醒。

1. What Is a Probability Density Function? | 什么是概率密度函数?

a under the graph of f(x) over the entire range must equal exactly 1. This is written as ∫−∞∞ x) dx = 1. For any interval a ≤ x ≤ b, the probability P(a ≤ X ≤ b) is given by the area ∫ab f(x) dx.

连续型随机变量 X 的概率密度函数 f(x) 必须满足两个条件:对所有 x,f(x) ≥ 0,并且曲线下的总面积恰好等于 1,即 ∫−∞∞ f(x) dx = 1。对于任意区间 a ≤ x ≤ b,概率 P(a ≤ X ≤ b) 等于面积 ∫ab f(x) dx。

2. Why Do We Need Piecewise Definitions? | 为什么需要分段定义?

e random variables do not follow a single simple formula over their entire range. A device' is described piecewise, for example: f(x) = { kx, 0 ≤ x < 2; k(4−x), 2 ≤ x ≤ 4; 0, otherwise }. Each piece applies to a sub‑interval, and they must be joined correctly to form a valid PDF.

现实中许多随机变量并不能用一个简单的表达式描述全程。例如,设备的故障率可能先线性上升,再对称下降,或者测量值的分布呈三角形。此时,f(x) 就会分段给出,如上例:f(x) = { kx, 0 ≤ x < 2; k(4−x), 2 ≤ x ≤ 4; 0, 其它 }。每一段作用于一个子区间,它们必须被正确拼接,才能构成合法的概率密度函数。


3. First Joining Condition: Non‑negativity | 拼接的首要条件:非负性

For f(x) to be a probability density function, each piece must be non‑ tive domains. Usually, the context of the problem (e.g., linear expressions with positive slope over positive intervals) makes this easy to check after finding k, but you should always verify that the final function never dips below zero.

要使 f(x) 成为密度函数,每一段在其定义区间内都必须非负。当你引入未知常数 k 时,要确保最终表达式在各自的定义域上 ≥ 0。通常根据题目背景(例如正区间上的递增线性函数),找到 k 后很容易验证,但一定要养成确认函数永远不取负值的习惯。


4. Total Area Equals One: Solving for k | 总面积为 1:求解 k

The primary tool for joining the pieces is the normalisation condition ∫−∞∞ Because f(x) is zero outside the piecewise intervals, you only need to integrate each non‑zero piece and sum the results. For the triangular distribution mentioned above:

∫02 kx dx + ∫24 k(4−x) dx = 1

k = ¼. Always set up the equation by carefully splitting the integral at the join points.

拼接各段的主要工具是归一化条件 ∫−∞∞ f(x) dx = 1。由于 f(x) 在分段区间外均为零,你只需对每个非零段分别积分再求和。对上面提到的三角形分布:∫02 kx dx + ∫24 k(4−x) dx = 1,计算得 ½k·2² 加上从 2 到 4 的积分值,最终 2k + 2k = 4k = 1,所以 k = ¼。每次都要在连接点处小心拆分积分。


5. Continuity at the Join – Is It Required? | 连接点处的连续性——是否必须?

have jump discontinuities as long as the area condition holds and the function remains non‑ ensures continuity. If so, simply equate the two expressions at the boundary, e.g., kx at x=2 equals k(4−x) at x=2, which yields an identity that can be used alongside the area condition to find multiple constants.

在 Edexcel 考纲中,概率密度函数并不强制要求连续;只要面积条件成立且函数非负,PDF 允许存在跳跃间断。但是,很多考题故意将各段设计成在连接点处交汇,甚至会要求你求出确保连续性的常数。这时候只需在边界处令两段表达式相等,例如令 x=2 时 kx = k(4−x),这会给出一个恒等式,可与面积条件联立以确定多个常数。


6. Building the Cumulative Distribution Function (CDF) | 构建累积分布函数 (CDF)

ariable point x. When f(x) is piecewise, F(x) will also be defined in pieces. For each sub‑ ous pieces. For example, if f(x) = ¼x for 0 ≤ x < 2, then for x in this interval, F(x) = ∫0x ¼t dt = ⅛x². For 2 ≤ x ≤ 4, F(x) = F(2) + ∫2x ¼(4−t) dt, and F(2) must be computed from the first piece.

累积分布函数 F(x) = P(X ≤ x) 是通过从下限到可变点 x 对 PDF 积分得到的。当 f(x) 分段定义时,F(x) 也会分段给出。对于每一个子区间,你先对相应的 f(x) 段积分,再加上之前各段累积的概率。例如,若 f(x)=¼x, 0≤x<2,那么在该区间内,F(x)=∫0x ¼t dt=⅛x²。在 2≤x≤4 时,F(x)=F(2)+∫2x ¼(4−t) dt,其中 F(2) 需用第一段算出。


广告 / Sponsored

7. Finding the Median from a Joined PDF | 从拼接 PDF 求中位数

he triangular PDF we have F(2) = ⅛×2² = 0.5, so the median is exactly 2. If F(2) were < 0.5, the median would lie in the second piece, and you would solve 0.5 = F(join) + ∫joinm f(t) dt. Setting up the equation on the correct piece is crucial for avoiding wasted time.

中位数 m 满足 F(m)=0.5。对于分段 PDF,你需要先在连接点处求出 F 的值,从而定位中位数落在哪一段。以上三角形分布为例,F(2)=⅛×2²=0.5,因此中位数恰好为 2。如果 F(2) 小于 0.5,中位数就位于第二段,此时应解方程 0.5 = F(连接点) + ∫连接点m f(t) dt。在正确的分段上建立方程是避免浪费时间的关键。


8. Upper Quartiles, Lower Quartiles, and IQR | 上四分位数、下四分位数和四分位距

uartile range is then IQR = Q₃ − Q₁. Work piece by piece: evaluate F at boundaries, determine which interval contains the required quantile, and then integrate the appropriate density piece with the equation F(boundary) + ∫boundaryQ f(t) dt = target probability.

同样的原则适用于任何百分位数。下四分位数 Q₁ 满足 F(Q₁)=0.25;上四分位数 Q₃ 满足 F(Q₃)=0.75。四分位距 IQR = Q₃ − Q₁。要逐段分析:在各边界处计算 F,判断所需分位数落在哪一区间,然后利用方程 F(边界) + ∫边界Q f(t) dt = 目标概率解出 Q。


9. Calculating Simple Probabilities After Joining | 拼接后计算简单概率

in points, you must split the integration at the join. Using our example: P(1 < X < 3) = ∫12 ¼x dx + ∫23 ¼(4−x) dx. Evaluate each part separately and sum. Never integrate across a join without splitting, as the formula changes there.

一旦拼接出完整的 PDF,题目经常要求计算 P(1 < X < 3) 这样的概率。如果分段函数跨越连接点,必须在连接点处拆分积分。用本例:P(1 < X < 3) = ∫12 ¼x dx + ∫23 ¼(4−x) dx。分别计算每部分再相加。切记不要在函数表达式发生变化的点处直接跨过积分,而必须拆分。


10. Dealing with Multiple Unknown Constants | 处理多个未知常数

Some A‑ you will normally use the total area = 1 equation, and if continuity at the join is required (or given), set a(1)² = b(3−1) to obtain a second equation. Solving simultaneously yields the constants. Always check if the problem explicitly states 'continuous' or 'smooth' at the join.

部分 A-Level 题目会给含有两个或多个未知常数的 PDF,例如 f(x) = { ax², 0 ≤ x < 1; b(3−x), 1 ≤ x ≤ 3; 0, 其它 }。为求出 a 和 b,通常利用总面积 = 1 列出一个方程,如果需要(或已知)在连接处连续,则令 a(1)² = b(3−1) 得到第二个方程。联立求解即可。务必仔细阅读题目是否明确提出在连接点“连续”或“平滑”。


11. Modelling with Piecewise PDFs and Real‑World Joins | 分段 PDF 的建模与实际拼接情境

Piecewise PDFs are used to model waiting times, component lifetimes, and even scores in games. The 'joins' often represent natural boundaries between different processes. For instance, the time a customer spends in a shop might have a rapid increase in density over the first few minutes, then a gradual decline. By breaking the function into pieces, we can capture such behaviour while keeping the mathematics manageable. Questions may ask you to interpret the constants in context, so always relate the numerical results back to the real‑world scenario.

分段 PDF 常被用于模拟等待时间、元件寿命甚至游戏分数。其“拼接点”往往代表不同过程间的自然分界。例如,顾客在店内停留的时长,前几分钟概率密度可能快速上升,随后缓慢下降。通过把函数分成若干段,我们就可以在保持数学处理可行的同时捕捉到这种变化。题目有时要求你结合实际情境解释常数的意义,因此得到数值答案后,不妨回头联系一下现实场景。


12. Common Pitfalls and How to Avoid Them | 常见错误及其避免方法

Watch out for forgetting to add the accumulated probability when building the CDF from the second piece onward – you must include the full F(boundary) from the previous part. Another frequent mistake is using the wrong integration limits; always sketch the PDF and mark the joins. Also, students sometimes confuse the PDF and CDF formulas; remember that the PDF gives the height of the curve, while probability is area under the curve. Finally, after solving for k, quickly test a small interval to confirm that the total probability makes sense (e.g., approximate the shape as a triangle and estimate area).

务必小心:在构建第二段及之后的 CDF 时,一定要加上之前各段累积的概率,即完整的 F(边界)。另一个常见错误是用错积分限;最好随手画出 PDF 草图并标注连接点。此外,学生有时会把 PDF 和 CDF 的公式弄混;请记住,PDF 给出曲线的高度,而概率是曲线下的面积。最后,在求出 k 后,可以快速估算一下总面积(例如把形状近似为三角形心算),以确认结果合理。


Published by TutorHao | Mathematics Revision Series | aleveler.com

广告 / Sponsored
英文原版 Collins International Primary Computing 柯林斯国际小学计算机科学学生…
计算机 备考教辅 · 正版现货 · 与本文同科同级别
查看详情 / View on Taobao参考价 ¥161.0

更多咨询请联系16621398022(同微信)

备考资讯每日更新,关注不错过
考纲变化 · 科目分析 · 学习方法
扫码关注公众号 tutorhao
在微信里长按二维码识别关注
或截图后用「扫一扫 → 相册」选择本图
公众号:tutorhao