# 重要性抽樣

## 理論

### 蒙地卡羅

${\displaystyle G=\int _{a}^{b}g(x)\,{\mbox{d}}x}$

${\displaystyle G=(b-a)\int _{a}^{b}g(x)f_{X}(x)\,{\mbox{d}}x=(b-a)\,\mathbb {E} (g(X))}$

${\displaystyle {\hat {g}}_{N}={\frac {(b-a)}{N}}\sum _{i=1}^{N}g(x_{i})}$

${\displaystyle \sigma _{{\hat {g}}_{N}}^{2}={\frac {(b-a)^{2}\sigma _{g}^{2}}{N}}}$

${\displaystyle \sigma _{g}^{2}={\frac {1}{(b-a)}}\int _{a}^{b}g^{2}(x)\,{\mbox{d}}x-\left({\frac {1}{b-a}}\int _{a}^{b}g(x)\,{\mbox{d}}x\right)^{2}}$

#### 優惠抽樣原理

${\displaystyle G=\int _{a}^{b}{\frac {g(x)}{f^{\ast }(x)}}f^{\ast }(x)\,{\mbox{d}}x}$

${\displaystyle G=\mathbb {E} ^{\ast }[w(X)]}$

${\displaystyle {\tilde {g}}_{N}={\frac {1}{N}}\sum _{i=1}^{N}w(x_{i})}$

${\displaystyle {\mbox{Var}}^{\ast }({\tilde {g}}_{N})={\frac {{\mbox{Var}}^{\ast }[w(X)]}{N}}}$

${\displaystyle {\mbox{Var}}^{\ast }[w(X)]={\mbox{Var}}^{\ast }\left[{\frac {g(X)}{f^{\ast }(X)}}\right]=\int _{a}^{b}\left[{\frac {g(x)}{f^{\ast }(x)}}\right]^{2}f^{\ast }(x)\,{\mbox{d}}x-G^{2}}$

${\displaystyle f^{\ast }(x)={\frac {|g(x)|}{\displaystyle \int _{a}^{b}|g(x)|\,{\mbox{d}}x}}}$

### Quasi蒙地卡羅

${\displaystyle G=\int _{a}^{b}g(x)\,{\mbox{d}}x\quad \simeq \quad {\frac {b-a}{N}}\sum _{i=1}^{N}g\left(a+(b-a){\frac {i}{N}}\right)}$

${\displaystyle G=\int _{a}^{b}g(x)\,{\mbox{d}}x=\int _{a}^{b}{\frac {g(x)}{f^{*}(x)}}f^{*}(x)\,{\mbox{d}}x\quad =\quad \int _{F(a)}^{F(b)}{\frac {g(F^{-1}(y))}{f^{*}(F^{-1}(y))}}\,{\mbox{d}}y}$

${\displaystyle \int _{F(a)}^{F(b)}{\frac {g(F^{-1}(y))}{f^{*}(F^{-1}(y))}}\,{\mbox{d}}y\quad =\quad \int _{0}^{1}{\frac {g(F^{-1}(y))}{f^{*}(F^{-1}(y))}}\,{\mbox{d}}y}$

## 引書

Morio, J.; Balesdent, M. (2015). Estimation of Rare Event Probabilities in Complex Aerospace and Other Systems (英文). Cambridge: Elsevier Science. p. 216. ISBN 978-0-08-100091-5.