「《モンテカルロ法》」の版間の差分
| 6行目: | 6行目: | ||
| − | + | <center> | |
| + | <math> | ||
\theta = E[g(Y)]=\int_{-\infty}^\infty g(y)\mathrm{d}F(y) = | \theta = E[g(Y)]=\int_{-\infty}^\infty g(y)\mathrm{d}F(y) = | ||
\int_0^1 h(u) \mathrm{d}u, \, | \int_0^1 h(u) \mathrm{d}u, \, | ||
</math> | </math> | ||
| + | </center> | ||
| 15行目: | 17行目: | ||
| − | + | <center> | |
| + | <math> | ||
A_1(N) = \sum_{i=1}^N h(U_i)/N \, | A_1(N) = \sum_{i=1}^N h(U_i)/N \, | ||
</math> | </math> | ||
| + | </center> | ||
| 23行目: | 27行目: | ||
を<math>\theta \,</math>の推定値とすることが考えられる. <math>A_1(N) \,</math>は<math>\theta \,</math>の不偏推定量であり, 分散は | を<math>\theta \,</math>の推定値とすることが考えられる. <math>A_1(N) \,</math>は<math>\theta \,</math>の不偏推定量であり, 分散は | ||
| − | + | <center> | |
| + | <math> | ||
V(A_1(N)) = \frac{\sigma^2}N, \ \ \ \ \ | V(A_1(N)) = \frac{\sigma^2}N, \ \ \ \ \ | ||
\sigma^2 = \int_0^1 h^2(x) \mathrm{d}x-\theta^2 \, | \sigma^2 = \int_0^1 h^2(x) \mathrm{d}x-\theta^2 \, | ||
</math> | </math> | ||
| + | </center> | ||
| 36行目: | 42行目: | ||
| − | + | <center> | |
| + | <math> | ||
A_2(N) = \frac 1 N \sum_{i=1}^N \frac{h(X_i)}{w(X_i)} \, | A_2(N) = \frac 1 N \sum_{i=1}^N \frac{h(X_i)}{w(X_i)} \, | ||
</math> | </math> | ||
| + | </center> | ||
| 49行目: | 57行目: | ||
| − | + | <center> | |
| + | <math> | ||
Y_\alpha = Y-\alpha(Z-\zeta) \, | Y_\alpha = Y-\alpha(Z-\zeta) \, | ||
</math> | </math> | ||
| + | </center> | ||
| 57行目: | 67行目: | ||
| − | + | <center> | |
| + | <math> | ||
V(Y_{\alpha^*})=(1-\rho^2)V(Y) \, | V(Y_{\alpha^*})=(1-\rho^2)V(Y) \, | ||
</math> | </math> | ||
| + | </center> | ||
| 67行目: | 79行目: | ||
| − | + | <center> | |
| + | <math> | ||
Y_\alpha = h(u)-\alpha(h_0(u)-\zeta) \, | Y_\alpha = h(u)-\alpha(h_0(u)-\zeta) \, | ||
</math> | </math> | ||
| + | </center> | ||
| 82行目: | 96行目: | ||
二つの特性値<math>\theta,\phi \,</math>をそれぞれ確率変数<math>X,Y \,</math>に関するモンテカルロ実験によって推定し, 比較したいものとし, <math>\theta=E[X], \phi=E[Y] \,</math>とする. | 二つの特性値<math>\theta,\phi \,</math>をそれぞれ確率変数<math>X,Y \,</math>に関するモンテカルロ実験によって推定し, 比較したいものとし, <math>\theta=E[X], \phi=E[Y] \,</math>とする. | ||
| − | + | ||
| + | <center> | ||
| + | <math> | ||
V(X-Y)=V(X)+V(Y)-2 \mathrm{Cov}(X,Y) \, | V(X-Y)=V(X)+V(Y)-2 \mathrm{Cov}(X,Y) \, | ||
</math> | </math> | ||
| + | </center> | ||
2007年7月17日 (火) 13:21時点における版
【もんてかるろほう (Monte Carlo method) 】
システムの特性値などを推定するために, 適当なモデルと乱数を使って実験し, 大数の法則や中心極限定理などを利用して推測を行う方法のこと. システムに確率的な変動が内在する場合だけでなく, 確定的な問題を解くためにも使われる.
モンテカルロ法の原理を簡単な例で示そう. 推定したい特性値を 構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \theta \,} とし, これは既知の分布関数 構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle F(y) \,} を持つ確率変数 構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle Y \,} の関数 構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle g(Y) \,} の平均値に等しいものとすれば,
と書ける. ただし, 構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle h(u)=g(F^{-1}(u)) \,}
である. そこで, 区間[0,1]上の一様乱数 構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle U_1, U_2, \cdots, U_N \,}
を発生し, 算術平均
構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle A_1(N) = \sum_{i=1}^N h(U_i)/N \, }
を構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \theta \,} の推定値とすることが考えられる. 構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle A_1(N) \,} は構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \theta \,} の不偏推定量であり, 分散は
構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle V(A_1(N)) = \frac{\sigma^2}N, \ \ \ \ \ \sigma^2 = \int_0^1 h^2(x) \mathrm{d}x-\theta^2 \, }
となる. したがって, 推定量 構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle A_1(N) \,}
に含まれる誤差の標準偏差は 構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \sigma/\sqrt N \,}
であり, 精度を十進で1桁上げるためには, サンプル数 構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle N \,}
を10倍に増やさなければならない. このように, モンテカルロ法の収束は遅いので, これを改善するための方法が種々提案されており, 分散減少法と総称されている. ただし, これらは というオーダーを改善するものではなく, 比例係数を小さくするための工夫である.
[重点サンプリング]
積分区間から一様にサンプルをとるのではなく, 重要と考えられる部分(の絶対値が大きい部分)により多くの重みをおく密度関数に従う乱数構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle X_1,\cdots, \ \ X_N \,} を発生し,
構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle A_2(N) = \frac 1 N \sum_{i=1}^N \frac{h(X_i)}{w(X_i)} \, }
で構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \theta \,}
を推定する. 構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle w(x) \,}
が構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \left| h(x) \right| \,}
に比例するように選べれば分散は最小となるので, なるべくそれに近くなるように工夫する.
[制御変量法]
構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \theta \,} に対するひとつの不偏推定量を構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle Y \,} とする. 構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle Y \,} と相関があって平均値構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \zeta \,} が既知の確率変数構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle Z \,} のことを, 構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle Y \,} の制御変量という. を定数として
と定義すれば, 構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle Y_\alpha \,}
もの不偏推定量となり, その分散は構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \alpha^* = \mathrm{Cov}(Y, Z)/V(Z) \,}
のとき最小となり, 最小値は
構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle V(Y_{\alpha^*})=(1-\rho^2)V(Y) \, }
である. ここで構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \rho \,}
はと構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle Z \,}
の相関係数であるから, 構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle Y \,}
と相関の強い制御変量を選ぶほど効果的である.
定積分の例では, に近い関数構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle h_0(u) \,} で, その積分の値が正確に計算できるものを選び,
に対して単純な一様サンプリングを適用する.
[負相関変量法]
構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \theta \,} の不偏推定量と平均値が同じで負の相関を持つ変量を利用して, 構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle W=(Y+Z)/2 \,} をの推定量とする. この分散は, に対して2回独立にサンプルをとって平均する場合の分散より小さくなる. 定積分の例では, もしが単調な関数ならば, 構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle Y=h(U),\;\;\;Z=h(1-U) \,} とするとよい.
[共通乱数法]
二つの特性値をそれぞれ確率変数に関するモンテカルロ実験によって推定し, 比較したいものとし, 構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \theta=E[X], \phi=E[Y] \,} とする.
構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle V(X-Y)=V(X)+V(Y)-2 \mathrm{Cov}(X,Y) \, }
であるから, が大きいほど推定の精度が良くなる. 構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle X \,}
と構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle Y \,}
の分布関数をそれぞれ構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle F,G \,}
とし, 構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle X \,}
と構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle Y \,}
を逆関数法で作るものとする. このとき, 構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle X \,}
と構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle Y \,}
用に別々の一様乱数列を使う代りに, ひとつの乱数列構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \{U\} \,}
を使って, 構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle X=F^{-1}(U), Y=G^{-1}(U) \,}
とすれば, 構文解析に失敗 (MathML、ただし動作しない場合はSVGかPNGで代替(最新ブラウザーや補助ツールに推奨): サーバー「https://en.wikipedia.org/api/rest_v1/」から無効な応答 ("Math extension cannot connect to Restbase."):): {\displaystyle \mathrm{Cov}(X,Y) \,}
が最大となる. これが共通乱数法の原理である.
参考文献
[1] 伏見正則, 『確率的方法とシミュレーション』(岩波講座 応用数学), 岩波書店, 1994.
[2] G. S. Fishman, Monte Carlo-Concepts, Algorithms, and Applications, Springer, 1996.
[3] A. M. Law and W. D. Kelton, Simulation Modeling and Analysis, 2nd. ed., McGraw-Hill, 1991.