# 二项比例置信区间

二项比例置信区间是对二项实验中成功概率 \( p \) 的区间估计，由试验次数 \( n \) 和观测到的成功次数计算得出。存在多种不同的公式，它们在覆盖概率与名义置信水平的接近程度上差异显著，尤其是在小样本或比例接近 0 或 1 的情况下。<sup>[1](https://math.unm.edu/~james/Agresti1998.pdf)</sup>

| 关键事实 | 详情 |
|---|---|
| 沃尔德区间 | \( \hat{p} \pm z \sqrt{\hat{p}(1-\hat{p})/n} \)，教科书默认方法；除非 \( n \) 相当大，否则表现不佳，且可能产生超出 \( [0,1] \) 的界限<sup>[1](https://math.unm.edu/~james/Agresti1998.pdf)</sup> |
| 威尔逊（得分）区间 | 由威尔逊于 1927 年提出，通过使用原假设下的标准误而非估计标准误来反转得分检验；即使样本非常小，覆盖概率也接近名义水平<sup>[2](https://jhanley.biostat.mcgill.ca/c607/ch08/wilson_jasa_1927.pdf)</sup><sup> • </sup><sup>[1](https://math.unm.edu/~james/Agresti1998.pdf)</sup> |
| 克洛珀-皮尔逊区间 | 1934 年的“精确”区间，通过反转等尾二项检验构建；覆盖概率至少为名义水平但通常过大，因此区间较宽<sup>[3](https://hero.epa.gov/reference/10721587/)</sup><sup> • </sup><sup>[1](https://math.unm.edu/~james/Agresti1998.pdf)</sup> |
| 阿格雷斯蒂-库尔区间 | “调整后的沃尔德”：在数据中增加两个成功和两个失败，然后应用沃尔德公式；表现与 95% 威尔逊区间相似<sup>[1](https://math.unm.edu/~james/Agresti1998.pdf)</sup> |
| 布朗-蔡-达斯古普塔建议 | 小 \( n \) 时使用威尔逊区间或等尾杰弗里斯先验区间；较大 \( n \) 时使用阿格雷斯蒂-库尔区间<sup>[4](https://web.pdx.edu/~ihd/stat563.S17/brown.pdf)</sup> |
| 软件 | R 的 `binom.test` 给出克洛珀-皮尔逊区间；Python 的 `statsmodels.stats.proportion.proportion_confint` 提供 normal、agresti_coull、beta、wilson 和 binom_test 方法<sup>[5](https://www.statsmodels.org/v0.10.2/generated/statsmodels.stats.proportion.proportion_confint.html)</sup> |

## 沃尔德区间及其问题

最广泛讲授的区间使用样本比例 \( \hat{p} = X/n \) 的正态近似：

\[ \hat{p} \pm z_{\alpha/2} \sqrt{\hat{p}(1-\hat{p})/n} \]

其中 \( z_{\alpha/2} \) 是标准正态分布的相应分位数。这就是沃尔德区间，通过反转沃尔德检验得到，在历史上是为任何参数提出的最早的置信区间之一。<sup>[1](https://math.unm.edu/~james/Agresti1998.pdf)</sup> 其覆盖概率表现不稳定，而这种不稳定行为远比常见教科书样本量指南所暗示的更为持久；当 \( p \) 接近 0 或 1 时该区间尤其不适用，部分原因是即使二项分布高度偏斜，它仍以 \( \hat{p} \) 作为中点。<sup>[4](https://web.pdx.edu/~ihd/stat563.S17/brown.pdf)</sup><sup> • </sup><sup>[1](https://math.unm.edu/~james/Agresti1998.pdf)</sup>

一个实际症状是沃尔德界限可能落在概率的可能范围之外。当 \( \hat{p} \) 为 0 或接近 0 时，下限可能为负；区间也可能延伸到 1 以上。连续性校正版本将每个端点扩展 \( 1/(2n) \)，更为保守，但仍基于相同的正态近似。<sup>[6](https://nvlpubs.nist.gov/nistpubs/TechnicalNotes/NIST.TN.2119.pdf)</sup>

## 威尔逊得分区间

**威尔逊方法**可追溯至埃德温·比德韦尔·威尔逊（Edwin Bidwell Wilson）1927 年的论文《概然推断、相继法则与统计推断》。它不是在 \( \hat{p} \) 处估计标准误，而是反转得分检验，该检验使用在原假设下每个候选 \( p \) 值处计算的标准误。所得区间为

\[ \frac{\hat{p} + \frac{z^2}{2n} \pm z \sqrt{\frac{\hat{p}(1-\hat{p})}{n} + \frac{z^2}{4n^2}}}{1 + \frac{z^2}{n}} \]

阿格雷斯蒂和库尔证明，即使样本量非常小，该得分区间的覆盖概率也接近名义置信水平，且对于 0.15 到 0.85 之间的 \( \hat{p} \)，在任何名义水平下它都比沃尔德区间更窄。<sup>[1](https://math.unm.edu/~james/Agresti1998.pdf)</sup> 当观测到 \( x = 0 \) 次成功时，威尔逊区间为 \( [0,\ z^2/(n+z^2)] \)，扩展了“3/n 法则”的上界。<sup>[7](https://facweb1.redlands.edu/fac/jim_bentley/Data/Math%20312/CIs/AgrestiAmStat1998.pdf)</sup>

## 克洛珀-皮尔逊精确区间

为完全避免近似，克洛珀和皮尔逊于 1934 年提出反转等尾二项检验。上限 \( p_U \) 求解

\[ \sum_{k=0}^{N_d} \binom{N}{k} p_U^k (1-p_U)^{N-k} = \alpha/2 \]

下限 \( p_L \) 则用 \( N_d - 1 \) 和 \( 1 - \alpha/2 \) 求解相应方程，其中 \( N_d \) 是大小为 \( N \) 的样本中的缺陷数（成功数）。<sup>[8](https://www.itl.nist.gov/div898/handbook/prc/section2/prc241.htm)</sup> 该区间被称为精确的，因为它使用二项累积分布函数，且对每个 \( p \) 值其覆盖概率至少为名义水平。<sup>[9](https://arxiv.org/abs/1303.1288)</sup>

代价是保守性。由于二项分布是离散的，除非 \( n \) 相当大，实际覆盖概率可能远大于名义水平，因此区间比必要的更宽；阿格雷斯蒂和库尔认为将该方法视为金标准在统计实践中是不恰当的。<sup>[1](https://math.unm.edu/~james/Agresti1998.pdf)</sup> 该区间关于 \( \hat{p} \) 也不对称。<sup>[8](https://www.itl.nist.gov/div898/handbook/prc/section2/prc241.htm)</sup>

**一个计算示例。** NIST/SEMATECH 手册从生产线抽取 20 件产品，发现其中 4 件有缺陷，因此 \( \hat{p} = 0.20 \)。在 \( \alpha = 0.10 \) 下求解两个方程得 \( p_U = 0.401029 \) 和 \( p_L = 0.071354 \)，即 90% 区间为 (0.071, 0.400)。由于下限未超过假设值 0.10，使用该区间不会拒绝缺陷比例至多为 0.10 的假设。<sup>[8](https://www.itl.nist.gov/div898/handbook/prc/section2/prc241.htm)</sup>

## 阿格雷斯蒂-库尔调整沃尔德区间

阿格雷斯蒂和库尔 1998 年的论文《对于二项比例的区间估计，近似优于“精确”》提出了一个简单的折中方案：在样本中增加两个“成功”和两个“失败”，然后应用普通沃尔德公式。对于 95% 区间，该调整沃尔德区间的表现与威尔逊得分区间非常相似，在初级课程中它消除了对繁琐样本量指南的需求。<sup>[1](https://math.unm.edu/~james/Agresti1998.pdf)</sup> 调整后的点估计 \( (X+2)/(n+4) \) 也是在 Beta(2, 2) 先验下平方误差损失时 \( p \) 的贝叶斯估计。<sup>[10](https://www.sciencedirect.com/science/article/abs/pii/S0167947313002478)</sup>

## 比较与建议

**布朗、蔡和达斯古普塔。** 劳伦斯·D·布朗（Lawrence D. Brown）、蔡同尼（T. Tony Cai）和安尼尔班·达斯古普塔（Anirban DasGupta）2001 年发表在《统计科学》上的一篇被广泛引用的论文重新审视了该问题，结论是教科书中对沃尔德区间的规定具有误导性且不可信赖。他们建议小 \( n \) 时使用威尔逊区间或等尾杰弗里斯先验区间，较大 \( n \) 时使用阿格雷斯蒂-库尔区间。<sup>[4](https://web.pdx.edu/~ihd/stat563.S17/brown.pdf)</sup> NIST Dataplot 文档总结了同样的指导，指出对于 \( n > 40 \)，威尔逊、调整沃尔德和杰弗里斯方法的表现相当。<sup>[11](https://www.itl.nist.gov/div898/software/dataplot/refman1/auxillar/propconf.htm)</sup>

**纽科姆的比较。** 罗伯特·G·纽科姆（Robert G. Newcombe），威尔士大学医学院医学统计学高级讲师，在 96,000 个参数空间点上评估了七种单一比例方法，使用的标准包括实际覆盖概率与名义水平的接近程度、期望区间宽度、避免超出 \( [0,1] \) 的界限或零宽区间，以及易用性。他推荐基于尾面积的方法和更简单的得分方法。<sup>[12](https://onlinelibrary.wiley.com/doi/abs/10.1002/%28SICI%291097-0258%2819980430%2917%3A8%3C857%3A%3AAID-SIM777%3E3.0.CO%3B2-E)</sup>

**稀有事件。** 2024 年《美国统计学家》上的一项分析考察了稀有事件比例的沃尔德、克洛珀-皮尔逊、威尔逊和阿格雷斯蒂-库尔区间，表明当同时考虑覆盖概率和相对误差边际时，所有四种估计量在给定样本量和置信水平下表现大致相似；作者指出，针对估计小比例数量级的具体样本量指导在现有文献中尚未得到很好的覆盖。<sup>[13](https://www.tandfonline.com/doi/abs/10.1080/00031305.2024.2350445)</sup> 对于非常小的观测计数，也可以使用基于卡方分位数的泊松调整。<sup>[6](https://nvlpubs.nist.gov/nistpubs/TechnicalNotes/NIST.TN.2119.pdf)</sup>

## 实践中的应用

监管统计中常规使用这些区间。FDA 关于诊断测试研究的指南建议报告诊断准确性指标，如灵敏度和特异度对，连同其双侧 95% 置信区间，以分数和百分比两种形式呈现。<sup>[14](https://www.fda.gov/regulatory-information/search-fda-guidance-documents/statistical-guidance-reporting-results-studies-evaluating-diagnostic-tests-guidance-industry-and-fda)</sup> 来自 beta-二项后验的贝叶斯可信区间提供了另一种框架，NIST 技术说明 2119 比较了仪器性能数据的精确区间和贝叶斯区间。<sup>[6](https://nvlpubs.nist.gov/nistpubs/TechnicalNotes/NIST.TN.2119.pdf)</sup>

标准软件实现了大多数方法。R 的 `binom.test` 返回克洛珀-皮尔逊区间，`prop.test` 给出威尔逊区间；Python 的 statsmodels `proportion_confint` 接受方法名 normal、agresti_coull、beta、wilson 和 binom_test，其中 beta 方法通过 beta 分布分位数实现克洛珀-皮尔逊区间。<sup>[5](https://www.statsmodels.org/v0.10.2/generated/statsmodels.stats.proportion.proportion_confint.html)</sup>

## References

1. [Agresti, A. and Coull, B. A. (1998). Approximate is Better than "Exact" for Interval Estimation of Binomial Proportions. The American Statistician 52(2), 119-126.](https://math.unm.edu/~james/Agresti1998.pdf)
2. [Wilson, E. B. (1927). Probable Inference, the Law of Succession, and Statistical Inference. Journal of the American Statistical Association 22, 209-212.](https://jhanley.biostat.mcgill.ca/c607/ch08/wilson_jasa_1927.pdf)
3. [Clopper, C. and Pearson, E. S. (1934). The use of confidence or fiducial limits illustrated in the case of the binomial. Biometrika.](https://hero.epa.gov/reference/10721587/)
4. [Brown, L. D., Cai, T. T. and DasGupta, A. (2001). Interval Estimation for a Binomial Proportion. Statistical Science 16(2), 101-133.](https://web.pdx.edu/~ihd/stat563.S17/brown.pdf)
5. [statsmodels.stats.proportion.proportion_confint documentation](https://www.statsmodels.org/v0.10.2/generated/statsmodels.stats.proportion.proportion_confint.html)
6. [NIST Technical Note 2119: Estimating Instrument Performance with Confidence Intervals and Confidence Bounds](https://nvlpubs.nist.gov/nistpubs/TechnicalNotes/NIST.TN.2119.pdf)
7. [Agresti and Coull (1998) full text, University of Redlands mirror](https://facweb1.redlands.edu/fac/jim_bentley/Data/Math%20312/CIs/AgrestiAmStat1998.pdf)
8. [NIST/SEMATECH e-Handbook of Statistical Methods, section 7.2.4.1: Confidence intervals](https://www.itl.nist.gov/div898/handbook/prc/section2/prc241.htm)
9. [The cost of using exact confidence intervals for a binomial proportion (arXiv)](https://arxiv.org/abs/1303.1288)
10. [Multiple comparisons of k binomial proportions, ScienceDirect](https://www.sciencedirect.com/science/article/abs/pii/S0167947313002478)
11. [Dataplot reference: Proportion Confidence Interval](https://www.itl.nist.gov/div898/software/dataplot/refman1/auxillar/propconf.htm)
12. [Newcombe, R. G. (1998). Two-sided confidence intervals for the single proportion: comparison of seven methods. Statistics in Medicine 17, 857-872.](https://onlinelibrary.wiley.com/doi/abs/10.1002/%28SICI%291097-0258%2819980430%2917%3A8%3C857%3A%3AAID-SIM777%3E3.0.CO%3B2-E)
13. [Binomial Confidence Intervals for Rare Events: Importance of Defining Margin of Error Relative to Magnitude of Proportion. The American Statistician 78(4), 2024.](https://www.tandfonline.com/doi/abs/10.1080/00031305.2024.2350445)
14. [FDA: Statistical Guidance on Reporting Results from Studies Evaluating Diagnostic Tests](https://www.fda.gov/regulatory-information/search-fda-guidance-documents/statistical-guidance-reporting-results-studies-evaluating-diagnostic-tests-guidance-industry-and-fda)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 统计学与概率论 › Statistical inference, estimation, sampling, and testing

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/binomial-proportion-confidence-interval

English original: https://www.edgepedia.org/binomial-proportion-confidence-interval
