Lecture5:Monte Carlo积分与方差减少技术 张伟平 Sunday 27th September,2009
Lecture 5: Monte Carlo »©Üê~E‚ ‹ï² Sunday 27th September, 2009
Contents 1 Monte Carlo Integration and Variance Reduction y 1.1 Monte Carlo Integration...............·..·· 1.1.1 Simple Monte Carlo estimator 3 1.1.2 Variance and Efficiency 12 l.2 Variance Reduction···.······-·····.···· 14 1.3 Antithetic Variables 15 1.4 Control Variates .。·。。。。。。。·。。。·24 1.4.1 Antithetic variate as control variate 30 l.4.2 Several control variates·..·.··········· 31 1.5 Importance sampling··············· 35 1.6 Stratified Sampling.············· 43 1.7 Stratified Importance Sampling ....... 47 Previous Next First Last Back Forward 1
Contents 1 Monte Carlo Integration and Variance Reduction 1 1.1 Monte Carlo Integration . . . . . . . . . . . . . . . . . . . . 3 1.1.1 Simple Monte Carlo estimator . . . . . . . . . . . . 3 1.1.2 Variance and Efficiency . . . . . . . . . . . . . . . . 12 1.2 Variance Reduction . . . . . . . . . . . . . . . . . . . . . . . 14 1.3 Antithetic Variables . . . . . . . . . . . . . . . . . . . . . . 15 1.4 Control Variates . . . . . . . . . . . . . . . . . . . . . . . . 24 1.4.1 Antithetic variate as control variate . . . . . . . . . 30 1.4.2 Several control variates . . . . . . . . . . . . . . . . 31 1.5 Importance sampling . . . . . . . . . . . . . . . . . . . . . . 35 1.6 Stratified Sampling . . . . . . . . . . . . . . . . . . . . . . . 43 1.7 Stratified Importance Sampling . . . . . . . . . . . . . . . . 47 Previous Next First Last Back Forward 1
Chapter 1 Monte Carlo Integration and Variance Reduction 蒙特卡罗(Monte Carlo)积分是一种基于随机抽样的统计方法.蒙特卡罗方法 其实也只是对一种思想的泛称,只要在解决问题时,利用产生大量随机样本, 然后对这些样本结果进行概率分析,从而来预测结果的方法,都可以称为蒙特 卡罗方法。 比如要求圆周率π的值,最著名的就是中学时学过的”割圆法”(刘徽(魏晋, 3.1416),祖冲之(南北朝,3.1415926<T<3.1415927).现在也可以使用蒙特 卡罗积分方法:由概率论知 若ruX,Yii.dU0,1),则Px2+y2≤1)= Previous Next First Last Back Forward 1
Chapter 1 Monte Carlo Integration and Variance Reduction ÑAk¤(Monte Carlo)»©¥ò´ƒuëŃ⁄Oê{. ÑAk¤ê{ Ÿ¢ èê¥Èò´géç°, êá3)˚ØKû, |^)å˛ëÅß ,È ˘ (J?1V«©¤, l 5˝ˇ(Jê{, —å±°èÑA k¤ê{. 'Xá¶±«πä, ÅÕ¶“¥•ÆûÆL”{”(4†(üA, 3.1416), y¿É(Hä, 3.1415926< π <3.1415927)). y3èå±¶^ÑA k¤»©ê{: dV«ÿ e r.v. X, Y i.i.d U(0, 1), K P(X2 + Y 2 ≤ 1) = π 4 Previous Next First Last Back Forward 1
因此,开=4P(X2+Y2≤1)≈4#{x2+2≤1}/m. ·n=1000,元=3.168 ●n=100.000,元=3.14312. ●n=107,元=3.141356. Previous Next First Last Back Forward 2
œd, π = 4P(X2 + Y 2 ≤ 1) ≈ 4#{x 2 + y 2 ≤ 1}/n. • n = 1000, ˆπ = 3.168. • n = 100, 000, ˆπ = 3.14312. • n = 107 , ˆπ = 3.141356. Previous Next First Last Back Forward 2
1.1 Monte Carlo Integration 假设g是一个可积函数,我们要计算∫公g(x)dc.回忆在概率论中,若随机变 量X的密度为f(x),则随机变量Y=9(X)的期望为 )- g(x)f(x)dz 如果从X的分布中产生了一些随机数,则Eg(X)的无偏估计就是相应的样本平 均值. 1.1.1 Simple Monte Carlo estimator 考虑估计6=g(c)dz.若X1,·,Xm为均匀分布U(0,1)总抽取的样本,则 由强大数律知 =9m=1∑g(X) m i=1 以概率1收敛到期望Eg(X).因此6g(r)dc的简单的Monte Carlo估计量 为gm(X) Previous Next First Last Back Forward 3
1.1 Monte Carlo Integration bg¥òá建Í, ·ÇáOé R b a g(x)dx. ££3V«ÿ•, eëÅC ˛Xó›èf(x), KëÅC˛Y = g(X)œ"è Eg(X) = Z ∞ −∞ g(x)f(x)dx XJlX©Ÿ•) ò ëÅÍ, KEg(X)ÆO“¥ÉA² ˛ä. 1.1.1 Simple Monte Carlo estimator ƒOθ = R 1 0 g(x)dx. eX1, · · · , Xmè˛!©ŸU(0, 1)oƒ, K dråÍÆ θˆ = gm(X) = 1 m Xm i=1 g(Xi) ±V«1¬Òœ"Eg(X). œd R 1 0 g(x)dx{¸Monte Carlo O˛ ègm(X). Previous Next First Last Back Forward 3