Introduction My cubMC function Examples and Extensions Monte Carlo Algorithms Where the Integrand Size is Unknown Fred J. Hickernell Department of Applied Mathematics Illinois Institute of Technology Email: hickernell@iit.edu , Web: www.iit.edu/~hickernell Joint work with Lan Jiang, Yuewei Liu, and Art Owen Thanks to Ian Sloan, Frances Kuo, Josef Dick, and Gareth Peters for inviting me. This work is partially supported by NSF-DMS-1115392 and NSF-DMS-1135257 grants. Feb. 16, 2012 hickernell@iit.edu Adaptive Monte Carlo MCQMC 2012 1 / 28
Introduction How to Determine Sample Size My cubMC function MATLAB’s quad function Examples and Extensions Hypothetical Conversation Practitioner You, the Expert I need to evaluate integrals � µ = R d f ( x ) ρ ( x ) d x , for many different f , where ρ is a given probability density function. hickernell@iit.edu Adaptive Monte Carlo MCQMC 2012 2 / 28
Introduction How to Determine Sample Size My cubMC function MATLAB’s quad function Examples and Extensions Hypothetical Conversation Practitioner You, the Expert Try a sample average, I need to evaluate integrals � n µ = 1 � µ = R d f ( x ) ρ ( x ) d x , ˆ f ( X i ) , n i =1 for many different f , where ρ is a given where the X i are i.i.d. ∼ ρ . probability density function. hickernell@iit.edu Adaptive Monte Carlo MCQMC 2012 2 / 28
Introduction How to Determine Sample Size My cubMC function MATLAB’s quad function Examples and Extensions Hypothetical Conversation Practitioner You, the Expert Try a sample average, I need to evaluate integrals � n µ = 1 � µ = R d f ( x ) ρ ( x ) d x , ˆ f ( X i ) , n i =1 for many different f , where ρ is a given where the X i are i.i.d. ∼ ρ . probability density function. How large should I make n ? hickernell@iit.edu Adaptive Monte Carlo MCQMC 2012 2 / 28
Introduction How to Determine Sample Size My cubMC function MATLAB’s quad function Examples and Extensions Hypothetical Conversation Practitioner You, the Expert Try a sample average, I need to evaluate integrals � n µ = 1 � µ = R d f ( x ) ρ ( x ) d x , ˆ f ( X i ) , n i =1 for many different f , where ρ is a given where the X i are i.i.d. ∼ ρ . probability density function. How large should I make n ? As large as your computational budget allows. hickernell@iit.edu Adaptive Monte Carlo MCQMC 2012 2 / 28
Introduction How to Determine Sample Size My cubMC function MATLAB’s quad function Examples and Extensions Hypothetical Conversation Practitioner You, the Expert Try a sample average, I need to evaluate integrals � n µ = 1 � µ = R d f ( x ) ρ ( x ) d x , ˆ f ( X i ) , n i =1 for many different f , where ρ is a given where the X i are i.i.d. ∼ ρ . probability density function. The Central Limit Theorem says �� 1 . 96 σ � 2 � How large should I make n to obtain n = | µ − ˆ µ | ≤ ε ? ε where σ 2 is the variance of the integrand. hickernell@iit.edu Adaptive Monte Carlo MCQMC 2012 2 / 28
Introduction How to Determine Sample Size My cubMC function MATLAB’s quad function Examples and Extensions Hypothetical Conversation Practitioner You, the Expert Try a sample average, I need to evaluate integrals � n µ = 1 � µ = R d f ( x ) ρ ( x ) d x , ˆ f ( X i ) , n i =1 for many different f , where ρ is a given where the X i are i.i.d. ∼ ρ . probability density function. The Central Limit Theorem says �� 1 . 96 σ � 2 � How large should I make n to obtain n = | µ − ˆ µ | ≤ ε ? ε where σ 2 is the variance of the integrand. How do I find σ 2 ? hickernell@iit.edu Adaptive Monte Carlo MCQMC 2012 2 / 28
Introduction How to Determine Sample Size My cubMC function MATLAB’s quad function Examples and Extensions Hypothetical Conversation Practitioner You, the Expert Try a sample average, I need to evaluate integrals � n µ = 1 � µ = R d f ( x ) ρ ( x ) d x , ˆ f ( X i + n σ ) , n i =1 for many different f , where ρ is a given where the X i are i.i.d. ∼ ρ . probability density function. The Central Limit Theorem says �� 1 . 96ˆ � 2 � How large should I make n to obtain σ n = | µ − ˆ µ | ≤ ε ? ε Try the sample variance times a variance inflation factor: How do I find σ 2 ? n σ C 2 � σ 2 = µ σ ] 2 . ˆ [ f ( X i ) − ˆ n σ − 1 i =1 hickernell@iit.edu Adaptive Monte Carlo MCQMC 2012 2 / 28
Introduction How to Determine Sample Size My cubMC function MATLAB’s quad function Examples and Extensions Hypothetical Conversation Practitioner You, the Expert Try a sample average, I need to evaluate integrals � n µ = 1 � µ = R d f ( x ) ρ ( x ) d x , ˆ f ( X i + n σ ) , n i =1 for many different f , where ρ is a given where the X i are i.i.d. ∼ ρ . probability density function. The Central Limit Theorem says �� 1 . 96ˆ � 2 � How large should I make n to obtain σ n = | µ − ˆ µ | ≤ ε ? ε Try the sample variance times a variance inflation factor: How do I find σ 2 ? n σ C 2 � σ 2 = µ σ ] 2 . ˆ [ f ( X i ) − ˆ n σ − 1 i =1 Does theory guarantee that this algo- rithm works (at least 95% of the time)? hickernell@iit.edu Adaptive Monte Carlo MCQMC 2012 2 / 28
Introduction How to Determine Sample Size My cubMC function MATLAB’s quad function Examples and Extensions Hypothetical Conversation Practitioner You, the Expert Try a sample average, I need to evaluate integrals � n µ = 1 � µ = R d f ( x ) ρ ( x ) d x , ˆ f ( X i + n σ ) , n i =1 for many different f , where ρ is a given where the X i are i.i.d. ∼ ρ . probability density function. The Central Limit Theorem says �� 1 . 96ˆ � 2 � How large should I make n to obtain σ n = | µ − ˆ µ | ≤ ε ? ε Try the sample variance times a variance inflation factor: How do I find σ 2 ? n σ C 2 � σ 2 = µ σ ] 2 . ˆ [ f ( X i ) − ˆ n σ − 1 i =1 Does theory guarantee that this algo- Yes! This algorithm, with minor modifi- rithm works (at least 95% of the time)? cations, carries a limited warranty. hickernell@iit.edu Adaptive Monte Carlo MCQMC 2012 2 / 28
Introduction How to Determine Sample Size My cubMC function MATLAB’s quad function Examples and Extensions Three Perspectives � µ = E [ f ( X )] = R d f ( x ) ρ ( x ) d x =? Algorithm Design Construct an automatic multivariate integrator analogous to MATLAB’s quad for univariate integrals. Information-Based Complexity Construct an algorithm, A , satisfying | µ − A ( f ) | ≤ ǫ (definitely, with high probability, or on average) with cost( ε, A, f ) depending reasonably on ε and the unknown size( f ) . Statistics Find a nonparametric confidence interval of prescribed half-width ε for µ from a reasonable number of samples Y i = f ( X i ) . hickernell@iit.edu Adaptive Monte Carlo MCQMC 2012 3 / 28
Introduction How to Determine Sample Size My cubMC function MATLAB’s quad function Examples and Extensions MATLAB’s Quadrature Routine quad Works Well, but It Can Be Fooled 1.4 2 f(x) 2 f(x) integral integral 1.2 1.5 1.5 1 1 1 0.8 0.5 0.5 f(x) 0.6 integral data 0 0.4 0 0.1 0.12 0.14 0.16 0.18 0.2 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 x x x � 1 e − x 2 d x 2 � 1 � 1 √ π f ( x ) d x = 1 . 5436 [1+cos(200 πx )] d x = 1 0 0 0 = 0 . 8427007929497149 quad → but quad → but quad → 0.8427007929497149 in 2 0.7636784919876782 0.160521 seconds. in 0.007092 seconds. in 0.205272 seconds. hickernell@iit.edu Adaptive Monte Carlo MCQMC 2012 4 / 28
Guarantee Like This? For ni e integrands, f , quad will provide with an error ≤ ε in a reasonable amount of time, or your money ba k. Introduction How to Determine Sample Size My cubMC function MATLAB’s quad function A ni e integrand, f , satisfies the following Examples and Extensions onditions: Can We Have a . . . , i.e., quad won't be fooled, . . . , i.e., the number of fun tion values required is � b moderate. a f ( x ) d x If f is not ni e (nasty), then this guarantee is void, and quad may return an in orre t answer. ◮ ◮ hickernell@iit.edu Adaptive Monte Carlo MCQMC 2012 5 / 28
Impra ti al Guarantee For integrands, f , satisfying � f ′′ � ∞ ≤ M , a trapezoidal rule with n = Introduction How to Determine Sample Size trapezoids will provide with an My cubMC function MATLAB’s quad function Examples and Extensions absolute error ≤ ε . An � ( b − a ) 3 M/ (12 ε ) � b a f ( x ) d x To apply this guarantee, one must know M in advance, which is impractical. This is why quad (adaptive recursive Simpson’s rule) estimates the error and adaptively determines the number of function evaluations, n . If the algorithm works for f , it should normally work for cf . hickernell@iit.edu Adaptive Monte Carlo MCQMC 2012 6 / 28
Recommend
More recommend