2025-12-18
1. 点估计
概念
参数 \(\theta\) 的估计量 \(\hat \theta(X_1,\dots,X_n)\),定义
偏差 \(Bias(\hat \theta)=E(\hat \theta)-\theta\).
渐进无偏:\(n\to +\infty\) 时 \(Bias=0\).
均方误差 \(MSE(\hat \theta)=E((\hat\theta-\theta)^2)\).
重要等式:\(MSE(\hat \theta)=Bias(\hat \theta)^2+Var(\hat \theta)\).(展开即可证明).
一致估计量:若 \(n\to +\infty\) 时,\(\hat \theta \to_P \theta\),则其为一致估计量.
注:无偏估计量不一定一致(取 \(\hat E=X_1\) 也是无偏的),一致估计量也不一定渐进无偏(\(1/n\) 的概率取 \(n\) 而 \(1-1/n\) 的概率取真值). 但是若 \(MSE\to 0\) 则一定一致.
估计方法:
矩法:将 \(\theta_1,\dots,\theta_k\) 表示为总体若干阶矩/中心矩的函数,然后用样本的矩/中心矩来替换.
也可以用样本方差 \(S^2\) 来替换总体的方差(二阶中心矩)
最大似然法:选择参数 \(\theta\),最大化似然函数 \(L(\theta)=P(X_1=x_1,\dots,;\theta)\). 定义最大似然估计量为满足似然函数最大的统计量 \(\hat \theta\).
最大似然估计有不变性,即若 \(\theta\) 的最大似然估计量为 \(\hat \theta\),则对于有反函数的 \(g(\theta)\),其最大似然估计量也为 \(g(\hat \theta)\).
Example 1 均匀分布
总体 \(X\sim U(0,\theta)\). 考察:
\(\hat \theta_A=2 \bar X\).
首先肯定无偏且一致.
均方误差等于 \(Var(2\bar X)=\frac{2}{n^2}Var(\sum X_i)=\frac{\theta^2}{3n}\).
\(\hat \theta_B=\max X_i\)
\(E(\max X_i)=\frac{n\theta}{n+1}\),故偏差为 \(\frac{\theta}{n+1}\).
\(E((\max X_i)^2)=\int_0^{\theta^2}P(\max X_i^2\ge t)dt=\frac{n\theta ^2}{n+2}\). 故 \(Var(\max X_i)=\frac{n\theta^2}{n+2}-\frac{n^2\theta^2}{(n+1)^2}\)
均方误差等于 \(\frac{\theta^2}{(n+1)^2}+\frac{n\theta^2}{n+2}-\frac{n^2\theta}{(n+1)^2}=\frac{2\theta^2}{(n+1)(n+2)}\).
\(\hat \theta_C =\frac{n+1}{n}\max X_i\).
容易知道这是无偏的.
而均方误差则直接是 \((\frac{n+1}{n})^2 Var(\hat \theta_b)=\frac{\theta^2}{n(n+2)}\).
Example 2 高斯分布
总体 \(X\sim N(\mu,\sigma^2)\),求 \(\bar X\) 和 \(S^2\) 的联合分布.
任取正交矩阵 \(U\) 满足第一行均为 \(\frac{1}{\sqrt{n}}\),其余行任取. 由正交性知其余行每行和都为 \(0\).
于是对于随机向量 \((X_1,\dots,X_n)\),定义 \(Y=UX\),则知 \(Y\) 服从 \(n\) 维高斯分布,且 \(E(Y)=(\sqrt{n}\mu,0,\dots)\),\(Cov(Y)=\sigma^2I\). 并且 \(\sum Y_i^2=\sum X_i^2\).
首先容易知 \(\bar X\sim N(\mu,\frac{\sigma^2}{n})\).
另一方面 \(S^2=\frac{1}{n-1}\sum (X-\bar X)^2=\frac{1}{n-1}\sum_{i=2}^{n}Y_i^2\). 所以可以发现 \(S^2\) 和 \(\bar X\) 是独立的.
令 \({S^2}'=(n-1)\frac{S^2}{\sigma^2}\). 由于 \(\frac{Y_i}{\sigma}\sim N(0,1)\),故 \((\frac{Y_i}{\sigma})^2\sim \chi^2(1)\). 故 \({S^2}'\sim \chi^2(n-1)\).
用矩法设计 \(\mu\) 和 \(\sigma^2\) 的估计量.
- \(\mu\) 直接使用一阶矩即可. 均方误差即 \(Var(\sum X_i)=\frac{\sigma^2}{n}\).
- 对 \(\sigma^2\) 的估计,可以用 \(S^2\) 也可以用二阶中心矩 \(B_2\).
- \(S^2\) 是无偏的,故均方误差即 \(Var\),根据前面的结论 \((n-1)\frac{S^2}{\sigma^2}\sim \chi^2(n-1)\). 该分布方差为 \(2(n-1)\),故 \(S^2\) 的方差为 \(\frac{2\sigma^4}{n-1}\).
- 二阶中心矩有偏且 bias 为 \(\frac{\sigma^2}{n}\),方差为 \(\frac{(n-1)^2}{n^2}Var(S^2)=\frac{2(n-1)\sigma^4}{n^2}\),故均方误差为 \(\frac{(2n-1)\sigma^4}{n^2}\).
最大似然
方法是直接求导. 可能取对数之后再求导会方便一点.
- \(X\sim B(p)\) 的最大似然估计为 \(\hat p=\bar X\).
- \(X\sim \pi(\lambda)\) 的最大似然估计为 \(\hat \lambda=\bar X\).
- \(X\sim U(0,\theta)\) 的最大似然估计为 \(\hat \theta=\max X_i\).
- \(X\sim N(\mu,\sigma^2)\) 的最大似然估计为 \(\mu=\bar X\),\(\sigma^2=B_2\). 需要注意这里求导是对 \((\sigma^2)\) 这个变量求导.
2. 置信区间
对于统计量 \(\hat \theta_L\) 和 \(\hat \theta_U\),若同时有 \(\theta \ge \hat \theta_L\) 且 \(\theta \le \hat \theta _U\) 的概率 \(\ge 1-\alpha\),则称 \([\hat \theta_L,\hat \theta_R]\) 为置信水平 \(1-\alpha\) 的置信区间.
由 Union Bound 知,只要找到 \(\theta <\hat \theta_L\) 的概率 \(\le \frac{\alpha}{2}\) 的置信下界,以及类似的置信上界,就可以得到置信区间.
枢轴量法:
- 设计一个枢轴量 \(G\) 满足 \(G\) 的分布与想得到置信区间的未知参数 \(\theta\) 无关.(\(G\) 本身显然与 \(\theta\) 有关).
- 用该分布的尾不等式 / 分布函数,选择出 \(c,d\) 使得 \(P(c\le G\le d)\le 1-\alpha\). 然后通过变换得到 \(\hat \theta_L\le \theta\le \hat \theta_U\).
枢轴量的设计通常与 \(\theta\) 的点估计相关.
Example 1 高斯分布
\(\mu\) 的置信区间:
- \(G=\bar X-\mu\),则 \(G\) 的分布为 \(N(0,\frac{\sigma^2}{n})\). 直接代分布函数的反函数即可得到 \(c,d\).
- 一个用尾不等式做的办法:对于 \(G\sim N(0,\frac{\sigma^2}{n})\),\(P(|G|\ge \frac{k\sigma}{\sqrt{n}})\le 2e^{-\frac{k^2}{2}}\). 于是我们得到 \(\alpha=2e^{-\frac{k^2}{2}}\) 的置信区间.
\(\sigma^2\) 的置信区间:
- 利用上一节的推导,\(G={S^2}'=(n-1)\frac{S^2}{\sigma^2}\sim \chi^2(n-1)\). 令 \(F\) 为 \(\chi^2(n-1)\) 的分布函数,则 \(P(F^{-1}(\alpha/2)\le G\le F^{-1}(1-\alpha/2))\ge 1-\alpha\).
Example 2 伯努利分布
有两种方法.
- 第一种,由中心极限定理,对其做标准化后近似 \(N(0,1)\),于是套用高斯分布的置信区间.
- 第二种,直接做. 设计枢轴量 \(G=\bar X-p\),然后用 Chernoff Bound 得到 \(P(|\bar X-p|\ge \epsilon)\le 2e^{-2n\epsilon^2}\).