# 均值插补

均值插补是一种处理缺失数据的统计方法，它将变量中每个缺失值替换为该变量已观测值的均值。<sup>[1](https://stat.columbia.edu/%7Egelman/arm/missing.pdf)</sup> 这是让不完整记录保留在分析中而非被丢弃的最简单方式，正因如此它被广泛使用。<sup>[2](https://link.springer.com/article/10.1007/s41060-025-00825-9)</sup> 这种简单性也正是其核心缺陷的来源：用一个常数填充会扭曲被插补变量的分布，使其方差收缩、标准误偏小、相关性衰减，从而导致下游检验和置信区间变得不可靠。<sup>[3](https://blogs.sas.com/content/iml/2017/12/06/problems-mean-imputation.html)</sup>

| 关键事实 | 详情 |
|---|---|
| 操作 | 将一列中每个缺失值替换为该列已观测值的均值；样本均值在构造上保持不变，方差则不然。<sup>[4](https://afraenkel.github.io/ds-in-practice/content/06/single-valued-imputation.html)</sup> |
| MCAR下的有效性 | 当数据完全随机缺失时，均值的点估计是有效的；方差估计则无效。<sup>[5](https://rmisstastic.netlify.app/tutorials/Sadinle_course_StatisticalMethodsMissingData_2019/Lecture03.pdf)</sup> |
| 方差偏倚 | 在MCAR下，样本方差存在一个因子 \( (n_{(j)} - 1)/(n - 1) \) 的偏倚，其中 \( n_{(j)} \) 是变量 \( j \) 的已观测个案数。<sup>[6](https://escholarship.org/content/qt84j7c2w5/qt84j7c2w5_noSplash_341adffc23852b00dc0320ed164d334a.pdf)</sup> |
| I类错误 | 在12,000个模拟数据集中，相对于金标准检验，均值插补平均将I类错误率提高了4.57%（范围0.2%至11.6%）。<sup>[7](https://www.surveypractice.org/article/2874-increased-accuracy-of-distribution-based-missing-value-imputation-an-alternative-to-mean-imputation-in-real-world-environment-survey-research)</sup> |
| 预测用途 | 对于先插补后回归流程，均值插补是渐近最优的，而众数插补则不然。<sup>[8](https://lbsresearch.london.edu/id/eprint/3719/1/Missing_Data_Imputation_for_Prediction-8.pdf)</sup> |
| 软件 | scikit-learn的 `SimpleImputer(strategy="mean")` 和Feature-engine的 `MeanMedianImputer` 对数值数据实现了该方法。<sup>[9](https://sklearn.org/stable/modules/generated/sklearn.impute.SimpleImputer.html)</sup> |
| 专家观点 | “无条件均值插补不能被普遍推荐”（利特尔，1992）。<sup>[6](https://escholarship.org/content/qt84j7c2w5/qt84j7c2w5_noSplash_341adffc23852b00dc0320ed164d334a.pdf)</sup> |

## 工作原理

设 \( Y_{j} \) 为一个变量，共有 \( n \) 个个案，其中 \( n_{(j)} \) 个被观测到。均值插补用已观测个案的均值 \( \bar{Y}_{j}^{\mathrm{obs}} \) 填充每个缺失的 \( Y_{j} \)。这实际上是在插补 \( \mathrm{E}(Y_{j} \mid R_{j} = 1) \) 的估计值，其中 \( R_{j} \) 表示可观测性；当数据完全随机缺失（MCAR）时，它产生有效的均值点估计。<sup>[5](https://rmisstastic.netlify.app/tutorials/Sadinle_course_StatisticalMethodsMissingData_2019/Lecture03.pdf)</sup>

其统计代价可由数学分析推导得出，而非仅凭个别事例判断。假设MCAR成立，插补后 \( Y_{j} \) 的样本方差存在因子 \( (n_{(j)} - 1)/(n - 1) \) 的偏倚，\( Y_{j} \) 与 \( Y_{k} \) 的样本协方差也存在相应因子的偏倚。<sup>[6](https://escholarship.org/content/qt84j7c2w5/qt84j7c2w5_noSplash_341adffc23852b00dc0320ed164d334a.pdf)</sup> 两个机制驱动了这一结果：填充值不像真实值那样变化，而名义样本量增加却没有增添真实信息，因此标准误过小。<sup>[10](https://pzs.dstu.dp.ua/DataMining/preprocessing/bibl/MissingDataReview.pdf)</sup> 均值插补后的变量保持其均值不变，但标准差变小，这使得标准单样本t检验失效，并产生过小的p值。<sup>[3](https://blogs.sas.com/content/iml/2017/12/06/problems-mean-imputation.html)</sup> 该估计在形式意义上也是不一致的（海托夫斯基，1968）。<sup>[6](https://escholarship.org/content/qt84j7c2w5/qt84j7c2w5_noSplash_341adffc23852b00dc0320ed164d334a.pdf)</sup>

## 操作方式

过程分两步：计算每列在其已观测值上的均值，然后将该均值代入该列每个缺失单元格。在Python中，scikit-learn的 `SimpleImputer` 以 `strategy="mean"` 提供此功能，这是四种单值策略（均值、中位数、最频繁值、常数）之一；均值策略只能用于数值数据。<sup>[9](https://sklearn.org/stable/modules/generated/sklearn.impute.SimpleImputer.html)</sup> 同一库将 `SimpleImputer` 定位为基础策略，与基于模型的 `IterativeImputer` 和 `KNNImputer` 并列，使均值插补成为自然的基线。<sup>[11](https://sklearn.org/stable/modules/impute.html)</sup> Feature-engine的 `MeanMedianImputer` 执行相同操作，通常应用于对称分布的变量，对偏态变量则优先使用中位数插补。<sup>[12](https://feature-engine.trainindata.com/en/latest/user_guide/imputation/MeanMedianImputer.html)</sup>

## 起源

有文献记载的相关工作始于哈罗德·霍特林（Harold Hotelling）1935年在《美国统计协会杂志》上对R. A. 费希尔（R. A. Fisher）著作《实验设计》（*The Design of Experiments*）的书评；所引条目即为该书评，而非合著论文，且此处的任何来源都未证实它讨论了缺失值的单一插补。<sup>[13](https://doi.org/10.2307/2277749)</sup> 用于从不完整数据中求最大似然的EM算法由A. P. 登普斯特（A. P. Dempster）、N. M. 莱尔德（N. M. Laird）和D. B. 鲁宾（D. B. Rubin）于1977年在《皇家统计学会杂志B辑》上发表，提供了后来方法所依托的基于似然的替代方案。<sup>[14](https://doi.org/10.1111/j.2517-6161.1977.tb01600.x)</sup> 唐纳德·B. 鲁宾（Donald B. Rubin）的《调查无应答的多重插补》（*Multiple Imputation for Nonresponse in Surveys*，威利，1987）是对单一插补缺陷的直接回应：鲁宾观察到，为每个缺失条目插补一个值在一般情况下不可能正确，他的解决方案是创建反映插补不确定性的多重插补。<sup>[15](https://doi.org/10.1002/9780470316696)</sup>

## 变体

**分组均值插补。** 当缺失性依赖于另一个已观测变量时（随机缺失，MAR），用总体均值插补会使估计均值产生偏倚；以该变量为条件进行分组插补可校正均值偏倚，不过分组插补通常仍会低估总体方差。<sup>[4](https://afraenkel.github.io/ds-in-practice/content/06/single-valued-imputation.html)</sup>

**回归（条件均值）插补**通过在该个案中对已观测变量做线性回归来插补缺失值，系数由完整个案估计；这是对无条件均值插补的有价值改进。<sup>[6](https://escholarship.org/content/qt84j7c2w5/qt84j7c2w5_noSplash_341adffc23852b00dc0320ed164d334a.pdf)</sup> 由于预测值“过于”拟合数据、缺乏随机误差，回归插补同样会使标准误偏小。<sup>[16](https://pzs.dstu.dp.ua/DataMining/preprocessing/bibl/social.pdf)</sup>

**热卡插补**用来自相似捐赠受访者的已观测值替换接受者的缺失值，捐赠者随机选择或按距离选择，通常应用于调查数据。<sup>[17](https://www.homepages.ucl.ac.uk/~rmjbale/Stat/13.pdf)</sup> 专业手册将（分组）均值、回归、比率和热卡捐赠插补视为一个相关方法家族，连同针对插补数据的方差估计方法一并处理。<sup>[18](https://onlinelibrary.wiley.com/doi/10.1002/9780470904848.ch7)</sup>

## 应用

均值插补在实践中存续下来，因为它快速、透明，并且保持数据集的总体均值不变，这在统计报告上可能很重要。<sup>[19](https://arxiv.org/html/2511.01196)</sup> 文献中出现了三种站得住脚的用途。第一，作为预测中的基线：对于先插补后回归流程，均值插补是渐近最优的，而众数插补是渐近次优的；简单插补配合强大的下游学习器可以表现良好，尽管配合弱学习器时通常表现不佳。<sup>[8](https://lbsresearch.london.edu/id/eprint/3719/1/Missing_Data_Imputation_for_Prediction-8.pdf)</sup><sup> • </sup><sup>[9](https://sklearn.org/stable/modules/generated/sklearn.impute.SimpleImputer.html)</sup> 第二，用于缺失率极低的小规模低维数据集。<sup>[2](https://link.springer.com/article/10.1007/s41060-025-00825-9)</sup> 第三，一篇基于模拟的综述报告称，当缺失数据低于10%且变量间相关性较低时，均值插补的局限性几乎不存在，该文引用了雷蒙德（1986）和齐克里克齐斯（2005）。<sup>[20](https://www.paultwin.com/wp-content/uploads/Lodder_1140873_Paper_Imputation.pdf)</sup>

## 局限与替代方法

失效模式直接源于其机制。代入常数降低了变异性，可能将原本非离群的点推到基于四分位距的离群阈值之外；它扭曲相关性和协方差，尤其在缺失量大时；均值对偏态和离群值敏感，这就是偏态变量优先使用中位数插补的原因。<sup>[12](https://feature-engine.trainindata.com/en/latest/user_guide/imputation/MeanMedianImputer.html)</sup> 在高维数据中，均值插补忽略了特征间的依赖结构。<sup>[21](https://bookdown.org/mike/data_analysis/imputation-missing-data.html)</sup>

定量比较倾向于替代方法。在一项基于真实492个个案数据集、含MAR值的模拟中，均值代入是五种方法中效果最差的，而带误差项的回归和EM算法最接近原始变量。<sup>[22](https://pubmed.ncbi.nlm.nih.gov/12428897/)</sup> 完整个案（列表删除）分析给出相对无偏但高度分散的心理测量估计，<sup>[23](https://journals.sagepub.com/doi/10.1177/109442810031003)</sup> 且在MAR下其偏倚取决于缺失机制和所涉变量，可能朝任一方向，而多重插补在广泛情景下偏倚更小、效率更高。<sup>[24](https://onlinelibrary.wiley.com/doi/10.1002/sim.3944)</sup> 多重插补在MCAR和MAR下产生无偏估计，标准误略高以计入插补不确定性，尽管它在MNAR下同样会退化。<sup>[25](https://cris.maastrichtuniversity.nl/ws/portalfiles/portal/64128744/Viechtbauer_2016_Bias_in_regression_coefficient_estimates_when_assu.pdf)</sup> 在患者报告结局的Rasch模型验证中，包括流行的个人平均得分法在内的确定性方法应被弃用，且当缺失率超过约10%时，所研究的方法中没有一个能对大多数参数产生准确结果。<sup>[26](https://link.springer.com/article/10.1186/1471-2288-11-105)</sup>

已发表的比较在可接受使用的范围上存在分歧。一项模拟研究发现，在MCAR、MAR和MNAR下同样存在系数偏倚和更大的模型误差，并建议完全不应使用均值插补，<sup>[27](https://proceedings.scipy.org/articles/Majora-4af1f417-008.pdf)</sup> 而讲义和预测理论则发现MCAR下均值有效、且对预测是渐近最优的。<sup>[5](https://rmisstastic.netlify.app/tutorials/Sadinle_course_StatisticalMethodsMissingData_2019/Lecture03.pdf)</sup><sup> • </sup><sup>[8](https://lbsresearch.london.edu/id/eprint/3719/1/Missing_Data_Imputation_for_Prediction-8.pdf)</sup> 调和之处在于：均值插补对于点预测可以接受，但不适合对方差、协方差和标准误进行推断。

近期的基准测试强化了较早的批评。一项针对超过26,000例重症监护病房住院的重症监护基准测试发现，均值插补因忽略时间结构而持续表现不佳，且基于MCAR的检验设计低估了现实世界的误差，使MCAR成为一个乐观的下界。<sup>[28](https://www.nature.com/articles/s41598-026-39035-z)</sup> 一项2025年的医疗研究重申了标准误低估问题，<sup>[2](https://link.springer.com/article/10.1007/s41060-025-00825-9)</sup> 一项PLOS One的比较发现预测均值匹配通常略优于其他方法，<sup>[29](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0319784)</sup> 而ImputeBench（2025）等新基准工具使方法选择系统化。<sup>[30](https://www.medrxiv.org/content/10.1101/2025.02.02.25321536v1)</sup> 一份近期实用指南报告称，对于中小规模数据集，`mice_cart` 和 `mice_rf` 等多重插补变体能较好地恢复数值。<sup>[31](https://arxiv.org/html/2601.14796v1)</sup>

## References

1. [Missing-data chapter (Gelman & Hill, Data Analysis Using Regression and Multilevel/Hierarchical Models)](https://stat.columbia.edu/%7Egelman/arm/missing.pdf)
2. [A comparative study of imputation techniques for missing values in healthcare diagnostic datasets](https://link.springer.com/article/10.1007/s41060-025-00825-9)
3. [3 problems with mean imputation - The DO Loop (SAS)](https://blogs.sas.com/content/iml/2017/12/06/problems-mean-imputation.html)
4. [Single-Valued Imputation, Data Science in Practice](https://afraenkel.github.io/ds-in-practice/content/06/single-valued-imputation.html)
5. [Statistical Methods for Analysis with Missing Data - Lecture 3: naïve methods: complete-case analysis and imputation (Sadinle)](https://rmisstastic.netlify.app/tutorials/Sadinle_course_StatisticalMethodsMissingData_2019/Lecture03.pdf)
6. [Regression With Missing X's: A Review (Roderick J. A. Little, JASA 1992)](https://escholarship.org/content/qt84j7c2w5/qt84j7c2w5_noSplash_341adffc23852b00dc0320ed164d334a.pdf)
7. [Increased Accuracy of Distribution Based Missing Value Imputation: An Alternative to Mean Imputation in Real World Environment Survey Research](https://www.surveypractice.org/article/2874-increased-accuracy-of-distribution-based-missing-value-imputation-an-alternative-to-mean-imputation-in-real-world-environment-survey-research)
8. [Simple Imputation Rules for Prediction with Missing Data: Theoretical Guarantees vs. Empirical Performance (Bertsimas, Delarue, Pauphilet)](https://lbsresearch.london.edu/id/eprint/3719/1/Missing_Data_Imputation_for_Prediction-8.pdf)
9. [SimpleImputer, scikit-learn documentation](https://sklearn.org/stable/modules/generated/sklearn.impute.SimpleImputer.html)
10. [A Review of Methods for Missing Data](https://pzs.dstu.dp.ua/DataMining/preprocessing/bibl/MissingDataReview.pdf)
11. [8.4. Imputation of missing values, scikit-learn documentation](https://sklearn.org/stable/modules/impute.html)
12. [MeanMedianImputer, Feature-engine user guide](https://feature-engine.trainindata.com/en/latest/user_guide/imputation/MeanMedianImputer.html)
13. [Harold Hotelling, R. A. Fisher (1935). The Design of Experiments.. Journal of the American Statistical Association.](https://doi.org/10.2307/2277749)
14. [A. P. Dempster, N. M. Laird, D. B. Rubin (1977). Maximum Likelihood from Incomplete Data Via the EM Algorithm. Journal of the Royal Statistical Society Series B (Statistical Methodology).](https://doi.org/10.1111/j.2517-6161.1977.tb01600.x)
15. [Donald B. Rubin (1987). Multiple Imputation for Nonresponse in Surveys. Wiley series in probability and statistics.](https://doi.org/10.1002/9780470316696)
16. [Imputing Missing Data: A Comparison of Methods for Social Work Researchers](https://pzs.dstu.dp.ua/DataMining/preprocessing/bibl/social.pdf)
17. [0_11_IMPUTATION (UCL lecture notes)](https://www.homepages.ucl.ac.uk/~rmjbale/Stat/13.pdf)
18. [Handbook of Statistical Data Editing and Imputation, Chapter 7](https://onlinelibrary.wiley.com/doi/10.1002/9780470904848.ch7)
19. [An Interdisciplinary and Cross-Task Review on Missing Data Imputation (arXiv, 2025)](https://arxiv.org/html/2511.01196)
20. [To Impute or not Impute: That's the Question (Lodder)](https://www.paultwin.com/wp-content/uploads/Lodder_1140873_Paper_Imputation.pdf)
21. [Chapter 13 Imputation (Missing Data) | A Guide on Data Analysis](https://bookdown.org/mike/data_analysis/imputation-missing-data.html)
22. [A comparison of imputation techniques for handling missing data](https://pubmed.ncbi.nlm.nih.gov/12428897/)
23. [A Monte Carlo Study of Missing Item Methods](https://journals.sagepub.com/doi/10.1177/109442810031003)
24. [Bias and efficiency of multiple imputation compared with complete-case analysis for missing covariate values](https://onlinelibrary.wiley.com/doi/10.1002/sim.3944)
25. [Bias in regression coefficient estimates when assumptions for handling missing data are violated: a simulation study (Viechtbauer 2016)](https://cris.maastrichtuniversity.nl/ws/portalfiles/portal/64128744/Viechtbauer_2016_Bias_in_regression_coefficient_estimates_when_assu.pdf)
26. [Imputation by the mean score should be avoided when validating a Patient Reported Outcomes questionnaire by a Rasch model in presence of informative missing data](https://link.springer.com/article/10.1186/1471-2288-11-105)
27. [Safe handling instructions for missing data (SciPy Proceedings)](https://proceedings.scipy.org/articles/Majora-4af1f417-008.pdf)
28. [Benchmarking imputation strategies for missing time-series data in critical care using real-world-inspired scenarios](https://www.nature.com/articles/s41598-026-39035-z)
29. [A comparison of various imputation algorithms for missing data](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0319784)
30. [ImputeBench: Benchmarking Single Imputation Methods (medRxiv, 2025)](https://www.medrxiv.org/content/10.1101/2025.02.02.25321536v1)
31. [A Practical Guide to Modern Imputation (arXiv)](https://arxiv.org/html/2601.14796v1)

---
*Initially written Sep 29, 2026 · Edited: 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/mean-imputation

English original: https://www.edgepedia.org/mean-imputation
