# 置信區間

（重新導向自置信区间

## 定義

${\displaystyle \mathbb {P} \left(\theta \in \left(u(X_{1},\ldots ,X_{n}),v(X_{1},\ldots ,X_{n})\right)\right)=1-\alpha }$

${\displaystyle \left(u(x_{1},\ldots ,x_{n}),v(x_{1},\ldots ,x_{n})\right)}$

## 例子

${\displaystyle 1-\alpha }$水準的正態置信區間為：

${\displaystyle \left({\bar {x}}-z_{\alpha /2}{\frac {\sigma }{\sqrt {n}}},{\bar {x}}+z_{\alpha /2}{\frac {\sigma }{\sqrt {n}}}\right)}$ (雙邊)
${\displaystyle \left(-\infty ,{\bar {x}}+z_{\alpha }{\frac {\sigma }{\sqrt {n}}}\right)}$ (單邊)
${\displaystyle \left({\bar {x}}-z_{\alpha }{\frac {\sigma }{\sqrt {n}}},+\infty \right)}$ (單邊)

${\displaystyle 1-\alpha }$水準的雙邊正態置信區間為：

${\displaystyle \left({\bar {x}}\pm t_{n-1;\alpha /2}{\frac {s}{\sqrt {n}}}\right)}$

${\displaystyle 1-\alpha }$水準的雙邊正態置信區間為：

${\displaystyle \left({\bar {x}}-{\bar {y}}\pm t_{m+n-2;\alpha /2}\cdot s_{p}\cdot {\sqrt {{\frac {1}{m}}+{\frac {1}{n}}}}\right)}$，其中${\displaystyle s_{p}={\sqrt {\frac {(m-1)s_{x}^{2}+(n-1)s_{y}^{2}}{m+n-2}}}}$${\displaystyle s_{x},s_{y}}$分別表示${\displaystyle x}$${\displaystyle y}$的樣本標準差。

## 構造法

${\displaystyle {\bar {X}}={\frac {1}{n}}\sum _{i=1}^{n}X_{i}}$${\displaystyle S^{2}={\frac {\sum _{i=1}^{n}\left(X_{i}-{\bar {X}}\right)^{2}}{n-1}}}$

${\displaystyle {\frac {{\bar {X}}-\mu }{\sigma }}\sim N(0,1)}$${\displaystyle (n-1){\frac {S^{2}}{\sigma ^{2}}}\sim \chi _{n-1}^{2}}$

${\displaystyle t={\frac {{\bar {X}}-\mu }{S/{\sqrt {n}}}}\sim t_{n-1}}$

${\displaystyle \mathbb {P} \left(-t_{n-1;\alpha /2}

## 與參數檢定的聯繫

${\displaystyle H_{0}:\mu =\mu _{0}}$ vs ${\displaystyle H_{1}:\mu \neq \mu _{0}}$

${\displaystyle H_{0}:\mu \leq \mu _{0}}$ vs ${\displaystyle H_{1}:\mu >\mu _{0}}$

${\displaystyle H_{0}:\mu \geq \mu _{0}}$ vs ${\displaystyle H_{1}:\mu <\mu _{0}}$

## 參考文獻

1. ^ Brittany Terese Fasy; Fabrizio Lecci; Alessandro Rinaldo; Larry Wasserman; Sivaraman Balakrishnan; Aarti Singh. Confidence sets for persistence diagrams. The Annals of Statistics. 2014, 42 (6): 2301–2339.
2. ^ Box, George EP; Tiao, George C. Bayesian inference in statistical analysis. John Wiley & Sons. 2011.
3. ^ Moore, D; McCabe, George P; Craig, B. Introduction to the Practice of Statistics. San Francisco, CA: Freeman. 2012.