# 贝叶斯参数估计

贝叶斯参数估计（Bayesian parameter estimation）是一种统计方法：它借助贝叶斯定理，把先验分布与由观测数据导出的似然函数结合起来，据此推断未知的模型参数。它的输出是参数之上的完整后验分布，而非单个数值，而这一分布同时也可用于预测。<sup>[1](https://www.nature.com/articles/s43586-020-00001-2)</sup>由于后验是真正的概率分布，它允许对参数取值作出直接的概率陈述，例如某个系数落在给定区间内的概率。<sup>[2](https://mspeekenbrink.github.io/sdam-book/ch-Bayes-estimation.html)</sup>点估计与区间是从中提取出来的摘要，其取舍取决于手头的决策需要。<sup>[3](https://groups.inf.ed.ac.uk/teaching/ccs/reading/FL_c6_bayesian_parameter_estimation.pdf)</sup>

| 关键事实 | 说明 |
|---|---|
| 输出 | 完整的后验分布 p(θ\|y)；后验均值、众数与可信区间都是它的摘要<sup>[2](https://mspeekenbrink.github.io/sdam-book/ch-Bayes-estimation.html)</sup> |
| 核心恒等式 | p(θ\|y) ∝ p(y\|θ) p(θ)；归一化常数即边缘似然<sup>[4](https://data102.org/ds-102-book/content/chapters/02/parameter-estimation/)</sup> |
| 共轭示例 | Beta(α, β) 先验配二项数据（n 次抛掷中 h 次正面），得到 Beta(α + h, β + n − h) 后验<sup>[3](https://groups.inf.ed.ac.uk/teaching/ccs/reading/FL_c6_bayesian_parameter_estimation.pdf)</sup> |
| 主要计算 | MCMC（Metropolis–Hastings、Gibbs、哈密顿蒙特卡洛）<sup>[5](https://atlas.cancer.org.au/ebook/ebook2/Chapter_3.html)</sup> |
| 收敛判据 | 秩归一化 R-hat < 1.01，有效样本量高于 400，且至少四条链<sup>[6](https://sites.stat.columbia.edu/gelman/research/published/rhat.pdf)</sup> |
| 起源 | 贝叶斯（Bayes）1763 年的论文，由理查德·普莱斯（Richard Price）呈交；实用的贝叶斯 MCMC 可追溯至盖尔芬德（Gelfand）与史密斯（Smith）1990 年的论文<sup>[7](https://doi.org/10.1098/rstl.1763.0053)</sup><sup> • </sup><sup>[8](https://doi.org/10.1080/01621459.1990.10476213)</sup> |

## 工作原理

贝叶斯模型指定未知参数上的先验 \( p(\theta) \) 与数据分布 p(y|θ)。推断即计算条件分布 p(θ|y) ∝ p(θ) p(y|θ)。<sup>[9](https://users.aalto.fi/~ave/Bayesian-Workflow.pdf)</sup>比例常数是边缘似然的倒数 1/p(y)，其中 p(y) = ∫ p(y|θ) p(θ) dθ，由似然在整个参数空间上以先验为权重积分而得。<sup>[2](https://mspeekenbrink.github.io/sdam-book/ch-Bayes-estimation.html)</sup><sup> • </sup><sup>[5](https://atlas.cancer.org.au/ebook/ebook2/Chapter_3.html)</sup><sup> • </sup><sup>[39](https://www.princeton.edu/~umueller/HOE.pdf)</sup>由于它不依赖于 θ，当目标只是后验的形状时尽可忽略；但对多数模型它难以计算，而在模型比较中又不可或缺。<sup>[3](https://groups.inf.ed.ac.uk/teaching/ccs/reading/FL_c6_bayesian_parameter_estimation.pdf)</sup>

当先验与似然共轭——即后验仍留在同一分布族内——后验便可写成闭式，无需计算该积分。贝塔分布与伯努利似然共轭：Beta(α, β) 先验给出 Beta(α + Σxᵢ, β + Σ(1 − xᵢ)) 后验，<sup>[4](https://data102.org/ds-102-book/content/chapters/02/parameter-estimation/)</sup>伽马分布则与泊松似然共轭，给出 λ|x ~ Ga(a₀ + Σxᵢ, n + b₀)。<sup>[10](https://bookdown.org/lehre_rdusl/BayesLearn/bayesian-inference.html)</sup>

摘要量由损失函数决定。在平方误差损失下，贝叶斯估计是后验均值，它使均方误差最小；在 0-1 损失下则是后验众数，而在平坦先验下众数等于最大似然估计。<sup>[4](https://data102.org/ds-102-book/content/chapters/02/parameter-estimation/)</sup><sup> • </sup><sup>[11](https://gwern.net/doc/statistics/bayes/2003-brooks.pdf)</sup>

## 实施方法

工作流程从模型与先验的设定出发，经由计算，走到模型检验与改进，其中包含先验预测检验与后验预测检验。<sup>[1](https://www.nature.com/articles/s43586-020-00001-2)</sup>实践中，后验靠随机模拟来概括，而这需要数学上与计算上都相当精巧的算法。<sup>[9](https://users.aalto.fi/~ave/Bayesian-Workflow.pdf)</sup>

马尔可夫链蒙特卡洛（MCMC）方法包括 Metropolis–Hastings、Gibbs 抽样、自适应拒绝抽样、哈密顿蒙特卡洛（HMC）与切片抽样。<sup>[5](https://atlas.cancer.org.au/ebook/ebook2/Chapter_3.html)</sup>Stan 用 No-U-Turn Sampler（HMC 的一种自适应形式）执行完整的贝叶斯推断；它与 BUGS 和 JAGS 的不同之处，在于采用命令式建模语言和 HMC，而非 Gibbs 或 Metropolis–Hastings 抽样。<sup>[12](https://mbrubake.github.io/files/CarpenterJSS2017.pdf)</sup>面对大数据或复杂模型，变分推断通过拟合一个近似分布族，把抽样转化为优化；其随机化变体支撑起大规模下的近似贝叶斯推断。<sup>[13](https://doi.org/10.1080/01621459.2017.1285773)</sup>

诊断用来防范不可靠的链。R-hat 统计量比较链内方差与链间方差，应当趋近于 1；韦赫塔里（Vehtari）、格尔曼（Gelman）、辛普森（Simpson）、卡彭特（Carpenter）与比尔克纳（Bürkner）建议对秩归一化版本采用 1.01 的阈值——远比格尔曼与鲁宾（Rubin）早期工作中的 1.1 严格——并要求秩归一化有效样本量高于 400、至少四条链。<sup>[6](https://sites.stat.columbia.edu/gelman/research/published/rhat.pdf)</sup>模型的适当性则用后验预测检验来核查：把从 p(ỹ|y) = ∫ p(ỹ|θ) p(θ|y) dθ 中抽取的复制数据 y_rep 与观测数据相比较。<sup>[14](https://mc-stan.org/docs/stan-users-guide/posterior-prediction.html)</sup>

## 起源

托马斯·贝叶斯（Thomas Bayes）身后发表的《论求解机遇学说中一个问题的方法》（"An Essay Towards Solving a Problem in the Doctrine of Chances"）是在他的遗稿中发现的，由理查德·普莱斯呈交皇家学会（Royal Society）。<sup>[7](https://doi.org/10.1098/rstl.1763.0053)</sup><sup> • </sup><sup>[15](https://www.leman.stat.vt.edu/VTCourses/WDBIBB.pdf)</sup>贝叶斯假定 θ 上取均匀先验，并求 θ 落在两个值之间的后验概率，这需要计算不完全贝塔函数。<sup>[16](http://arxiv.org/pdf/2004.06425)</sup>

拉普拉斯（Laplace）1774 年的论文对二项推断问题作了更精细的处理，并主张采用均匀先验；直到二十世纪中叶，“逆概率”（inverse probability）一直是通用的说法。<sup>[15](https://www.leman.stat.vt.edu/VTCourses/WDBIBB.pdf)</sup>1953 年的那篇论文是迈向 MCMC 的重要一步，1970 年发表于《Biometrika》的论文将其推广，并把它介绍给更广泛的统计学界。<sup>[17](https://doi.org/10.1063/1.1699114)</sup><sup> • </sup><sup>[18](https://doi.org/10.1093/biomet/57.1.97)</sup><sup> • </sup><sup>[16](http://arxiv.org/pdf/2004.06425)</sup>艾伦·E. 盖尔芬德（Alan E. Gelfand）与阿德里安·F. M. 史密斯（Adrian F. M. Smith）1990 年发表于《美国统计学会会刊》（Journal of the American Statistical Association）的论文，把 MCMC 确立为贝叶斯推断的一条实用途径，清除了难以计算的积分这道障碍——而这正是许多科学家弃用贝叶斯统计的主要现实原因。<sup>[8](https://doi.org/10.1080/01621459.1990.10476213)</sup><sup> • </sup><sup>[1](https://www.nature.com/articles/s43586-020-00001-2)</sup>

## 变体

在共轭分析之外，还有若干类方法扩展了这套基本配方。经验贝叶斯（empirical Bayes）从数据本身估计先验：赫伯特·罗宾斯（Herbert Robbins）为处理复合情形创造了这一名称——未知的先验密度 \( g(\theta) \) 生成未观测到的 θᵢ，后者又产生已观测到的 xᵢ；罗宾斯公式直接由边缘密度 f(x) 估计后验期望 E{θ|x}。<sup>[19](https://doi.org/10.1525/9780520313880-015)</sup><sup> • </sup><sup>[20](https://www.efron.ckirby.su.domains/papers/2021EB-concepts-methods.pdf)</sup>参数经验贝叶斯假定先验除一个有限维参数外均已知，<sup>[21](https://doi.org/10.1080/01621459.1983.10477920)</sup>两种估计策略分别是在 θ 尺度上的 g 建模与在 x 尺度上的 f 建模，后者包括特威迪公式（Tweedie's formula），它通过 d/dx log f(x) 估计 E{θ|x}，无需涉及未知的先验。<sup>[22](https://doi.org/10.1214/13-sts455)</sup>一种完全贝叶斯的替代做法是在先验之上再设超先验并积分，其精神源自 J. J. 迪利（J. J. Deely）与 D. V. 林德利（D. V. Lindley）的《贝叶斯经验贝叶斯》一文。<sup>[23](https://doi.org/10.1080/01621459.1981.10477731)</sup>

尖峰-平板先验（spike-and-slab priors）用于贝叶斯变量选择，由爱德华·I. 乔治（Edward I. George）与罗伯特·E. 麦卡洛克（Robert E. McCulloch）借助探索模型空间的 MCMC 技术推广开来。<sup>[24](https://doi.org/10.1080/01621459.1993.10476353)</sup><sup> • </sup><sup>[1](https://www.nature.com/articles/s43586-020-00001-2)</sup>

当似然难以计算时，可采用基于模拟的变体：近似贝叶斯计算（ABC）、贝叶斯合成似然，<sup>[25](https://www.annualreviews.org/content/journals/10.1146/annurev-statistics-033121-110254)</sup>以及神经模拟推断——用模拟器输出训练神经网络，去近似后验（如帕帕马卡里奥斯（Papamakarios）与默里（Murray）的贝叶斯条件密度估计方法，以及吕克曼（Lueckmann）等人、格林伯格（Greenberg）、农嫩马赫（Nonnenmacher）与马克（Macke）对其所作的序贯与柔性密度扩展）、近似似然（如带自回归流的序贯神经似然），或近似似然比（如杜尔坎（Durkan）、默里与帕帕马卡里奥斯的对比学习方法）。<sup>[26](https://doi.org/10.48550/arxiv.1605.06376)</sup><sup> • </sup><sup>[27](https://doi.org/10.48550/arxiv.1711.01861)</sup><sup> • </sup><sup>[28](https://doi.org/10.48550/arxiv.1905.07488)</sup><sup> • </sup><sup>[29](https://doi.org/10.48550/arxiv.1805.07226)</sup><sup> • </sup><sup>[30](https://doi.org/10.48550/arxiv.2002.03712)</sup>

## 应用

已发表的文献涵盖了经验贝叶斯的各类应用，如火灾报警概率、收入分成、质量保证与法学院招生，<sup>[31](https://biostat.jhsph.edu/~fdominic/teaching/bio656/labs/labs09/Casella.EmpBayes.pdf)</sup>以及神经模拟推断在宇宙学、流行病学、生态学、合成生物学与电信领域的应用。<sup>[32](https://proceedings.neurips.cc/paper_files/paper/2025/file/4bbd69ce4cea6aa3a08bde08a40fd65a-Paper-Conference.pdf)</sup>在一些应用领域，神经 SBI 方法正迅速成为比 ABC 更受青睐的途径。<sup>[32](https://proceedings.neurips.cc/paper_files/paper/2025/file/4bbd69ce4cea6aa3a08bde08a40fd65a-Paper-Conference.pdf)</sup>

## 局限与替代方法

若干失效模式反复出现。在数据稀疏或模型复杂时，模型与先验的细节可能对最终推断产生很大影响。<sup>[9](https://users.aalto.fi/~ave/Bayesian-Workflow.pdf)</sup>先验-数据冲突——即数据落在先验认为不合理的区域——可以被形式化地检验，如迈克尔·埃文斯（Michael Evans）与哈达斯·莫绍诺夫（Hadas Moshonov）的框架。<sup>[33](https://doi.org/10.1214/06-ba129)</sup>模型设定错误则更为严重：用有缺陷的模型做贝叶斯推断可能得出不可靠的结论，而在严重设定错误下，常规的贝叶斯分析在多数情形中并无意义。<sup>[34](https://www.annualreviews.org/content/journals/10.1146/annurev-statistics-040522-015915)</sup>彼得·格林瓦尔德（Peter Grünwald）与泰斯·范奥门（Thijs van Ommen）记录了贝叶斯推断在设定错误的线性模型下的不相合性，并提出一种基于带学习率的广义后验的修补方案；修补方案分三类：受限似然方法、模块化推断，以及把参照模型投影到更简单的模型上。<sup>[35](https://doi.org/10.1214/17-ba1085)</sup><sup> • </sup><sup>[34](https://www.annualreviews.org/content/journals/10.1146/annurev-statistics-040522-015915)</sup>计算是另一项代价：面对数亿条观测，每次 MCMC 迭代中计算似然可能要花上几天，累积成本难以承受；而且 MCMC 抽样通常是正相关的，这削弱了它们所携带的信息。<sup>[25](https://www.annualreviews.org/content/journals/10.1146/annurev-statistics-033121-110254)</sup>

与频率学派估计相比，孰优孰劣取决于目的。一般而言，没有任何估计量能在所有可能的世界状态下都具最小风险：贝叶斯方法在先验下最小化期望风险，而极小化极大的频率学派估计最小化最大风险。<sup>[36](https://www.stat.berkeley.edu/~stark/Preprints/freqBayesPrimer09.pdf)</sup>贝叶斯 1 − α 可信集的频率学派覆盖概率，通常并非对所有参数值都等于 1 − α；对某些参数值它可能高得多，对另一些则低得多。<sup>[36](https://www.stat.berkeley.edu/~stark/Preprints/freqBayesPrimer09.pdf)</sup>在参数连续的标准参数问题中，客观贝叶斯方法与频率学派方法常给出相似甚至相同的答案，标准正态线性模型便是典型例子；伯恩斯坦-冯·米泽斯定理（Bernstein–von Mises theorems）表明对于标准参数模型，两种方法在大样本下趋于一致，假设检验则是显著的例外。<sup>[37](https://errorstatistics.com/wp-content/uploads/2025/07/bayarri-berger.pdf)</sup><sup> • </sup><sup>[38](http://www.scholarpedia.org/article/Bayesian_inference)</sup>

## References

1. [Bayesian statistics and modelling | Nature Reviews Methods Primers](https://www.nature.com/articles/s43586-020-00001-2)
2. [Chapter 15 Introduction to Bayesian estimation (Peekenbrink)](https://mspeekenbrink.github.io/sdam-book/ch-Bayes-estimation.html)
3. [6 Bayesian Parameter Estimation (Farrell & Lewandowsky, Computational Modeling of Cognition)](https://groups.inf.ed.ac.uk/teaching/ccs/reading/FL_c6_bayesian_parameter_estimation.pdf)
4. [Parameter estimation and Bayesian Inference Fundamentals (Data 102 textbook)](https://data102.org/ds-102-book/content/chapters/02/parameter-estimation/)
5. [Chapter 3 Overview of Bayesian Statistical Modelling and Computation | Developing a Cancer Atlas using Bayesian Methods](https://atlas.cancer.org.au/ebook/ebook2/Chapter_3.html)
6. [Rank-normalization, folding, and localization: An improved R-hat for assessing convergence of MCMC (Vehtari, Gelman, Simpson, Carpenter, Bürkner)](https://sites.stat.columbia.edu/gelman/research/published/rhat.pdf)
7. [Thomas Bayes (1763). LII. An essay towards solving a problem in the doctrine of chances. By the late Rev. Mr. Bayes, F. R. S. communicated by Mr. Price, in a letter to John Canton, A. M. F. R. S. Philosophical Transactions of the Royal Society of London.](https://doi.org/10.1098/rstl.1763.0053)
8. [Alan E. Gelfand, Adrian F. M. Smith (1990). Sampling-Based Approaches to Calculating Marginal Densities. Journal of the American Statistical Association.](https://doi.org/10.1080/01621459.1990.10476213)
9. [Bayesian Workflow (Gelman et al., book draft)](https://users.aalto.fi/~ave/Bayesian-Workflow.pdf)
10. [Introduction to Bayesian Inference and Statistical Learning (lecture notes)](https://bookdown.org/lehre_rdusl/BayesLearn/bayesian-inference.html)
11. [Bayesian computation: a statistical revolution (S. P. Brooks, 2003)](https://gwern.net/doc/statistics/bayes/2003-brooks.pdf)
12. [Stan: A Probabilistic Programming Language (JSS 2017)](https://mbrubake.github.io/files/CarpenterJSS2017.pdf)
13. [David M. Blei, Alp Kucukelbir, Jon D. McAuliffe (2017). Variational Inference: A Review for Statisticians. Journal of the American Statistical Association.](https://doi.org/10.1080/01621459.2017.1285773)
14. [Stan User's Guide: Posterior Predictive Sampling](https://mc-stan.org/docs/stan-users-guide/posterior-prediction.html)
15. [When Did Bayesian Inference Become "Bayesian"? (Stephen E. Fienberg)](https://www.leman.stat.vt.edu/VTCourses/WDBIBB.pdf)
16. [Computing Bayes: Bayesian Computation from 1763 to the 21st Century](http://arxiv.org/pdf/2004.06425)
17. [Nicholas Metropolis and colleagues (1953). Equation of State Calculations by Fast Computing Machines. The Journal of Chemical Physics.](https://doi.org/10.1063/1.1699114)
18. [W. K. Hastings (1970). Monte Carlo sampling methods using Markov chains and their applications. Biometrika.](https://doi.org/10.1093/biomet/57.1.97)
19. [Herbert Robbins (1956). AN EMPIRICAL BAYES APPROACH TO STATISTICS. .](https://doi.org/10.1525/9780520313880-015)
20. [Empirical Bayes: Concepts and Methods (Efron)](https://www.efron.ckirby.su.domains/papers/2021EB-concepts-methods.pdf)
21. [Carl N. Morris (1983). Parametric Empirical Bayes Inference: Theory and Applications. Journal of the American Statistical Association.](https://doi.org/10.1080/01621459.1983.10477920)
22. [Bradley Efron (2014). Two Modeling Strategies for Empirical Bayes Estimation. Statistical Science.](https://doi.org/10.1214/13-sts455)
23. [J. J. Deely, D. V. Lindley (1981). Bayes Empirical Bayes. Journal of the American Statistical Association.](https://doi.org/10.1080/01621459.1981.10477731)
24. [Edward I. George, Robert E. McCulloch (1993). Variable Selection via Gibbs Sampling. Journal of the American Statistical Association.](https://doi.org/10.1080/01621459.1993.10476353)
25. [Approximate Methods for Bayesian Computation | Annual Reviews](https://www.annualreviews.org/content/journals/10.1146/annurev-statistics-033121-110254)
26. [Papamakarios, George, Murray, Iain (2016). Fast $ε$-free Inference of Simulation Models with Bayesian Conditional Density Estimation. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1605.06376)
27. [Lueckmann, Jan-Matthis and colleagues (2017). Flexible statistical inference for mechanistic models of neural dynamics. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1711.01861)
28. [Greenberg, David S., Nonnenmacher, Marcel, Macke, Jakob H. (2019). Automatic Posterior Transformation for Likelihood-Free Inference. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1905.07488)
29. [Papamakarios, George, Sterratt, David C., Murray, Iain (2018). Sequential Neural Likelihood: Fast Likelihood-free Inference with Autoregressive Flows. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1805.07226)
30. [Durkan, Conor, Murray, Iain, Papamakarios, George (2020). On Contrastive Learning for Likelihood-free Inference. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2002.03712)
31. [An Introduction to Empirical Bayes Data Analysis (Casella, The American Statistician, 1985)](https://biostat.jhsph.edu/~fdominic/teaching/bio656/labs/labs09/Casella.EmpBayes.pdf)
32. [Multilevel neural simulation-based inference (NeurIPS 2025)](https://proceedings.neurips.cc/paper_files/paper/2025/file/4bbd69ce4cea6aa3a08bde08a40fd65a-Paper-Conference.pdf)
33. [Michael Evans, Hadas Moshonov (2006). Checking for prior-data conflict. Bayesian Analysis.](https://doi.org/10.1214/06-ba129)
34. [Bayesian Inference for Misspecified Generative Models | Annual Reviews](https://www.annualreviews.org/content/journals/10.1146/annurev-statistics-040522-015915)
35. [Peter Grünwald, Thijs van Ommen (2017). Inconsistency of Bayesian Inference for Misspecified Linear Models, and a Proposal for Repairing It. Bayesian Analysis.](https://doi.org/10.1214/17-ba1085)
36. [A Primer of Frequentist and Bayesian Approaches to Estimation (Stark)](https://www.stat.berkeley.edu/~stark/Preprints/freqBayesPrimer09.pdf)
37. [The Interplay of Bayesian and Frequentist Analysis (Bayarri & Berger)](https://errorstatistics.com/wp-content/uploads/2025/07/bayarri-berger.pdf)
38. [Bayesian statistics - Scholarpedia](http://www.scholarpedia.org/article/Bayesian_inference)
39. [princeton.edu](https://www.princeton.edu/~umueller/HOE.pdf)

---
*Initially written Sep 29, 2026 · Edited: Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 统计学与概率论 › Bayesian statistics › Bayesian probability and inference foundations › Bayesian estimation and filtering

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/bayesian-parameter-estimation

English original: https://www.edgepedia.org/bayesian-parameter-estimation
