Title: Monte Carlo Integration
1Monte Carlo Integration
2Goal Evaluate an integral
Why use random methods?
Computation by deterministic quadrature can
become expensive and inaccurate.
- grid points add up quickly in high dimensions
- bad choices of grid may misrepresent g(x)
3Hit-or-Miss Monte Carlo
a
b
4Sample uniformly from the rectangular region
a,bx0,c
5We can easily estimate p
- throw n uniform darts at the rectangle
- let X be the number of times you end up under
the curve yg(x)
6Dont ever give an estimate without a confidence
interval!
- note that X is binomial(n,p)
- unravel the relationships to get an approximate
confidence inerval for I
7(No Transcript)
8Example
(we know that the answer is e3-1 19.08554)
- 100,000 uniform draws over 0,3x0,e3
9Simulation Results
19.08554
0.31365 19.06217885 (18.88849413, 19.23586357)
0.31552 19.01216586 (18.83860388, 19.18572785)
0.31729 19.11882006 (18.94499712, 19.29264301)
0.31642 19.06639681 (18.8927018, 19.24009185)
0.31672 19.08447380 (18.9107346, 19.25821302)
10Sample Mean Monte Carlo
(Monte Carlo Integration)
11where Xunif(a,b)
12Example
(we know that the answer is e3-1 19.08554)
13where Xunif(0,3)
14Simulation Results true
19.08554, n100,000
Simulation
1 19.10724
2 19.08260
3 18.97227
4 19.06814
5 19.13261
15Dont ever give an estimate without a confidence
interval!
This estimator is unbiased
16 17 18- X1, X2, , Xn iid -gt g(X1), g(X2), ,
g(Xn) iid
and we can once again invoke the CLT.
19For n large enough (ngt30),
20By the way
No one ever said that you have to use the uniform
distribution
Example
21Comparison of Hit-and-Miss and Sample Mean Monte
Carlo
22Comparison of Hit-and-Miss and Sample Mean Monte
Carlo
Sample mean Monte Carlo is generally preferred
over Hit-and-Miss Monte Carlo because
- the estimator from SMMC has lower variance
- SMMC does not require a non-negative integrand
(or adjustments)
- HM MC requires that you be able to put g(x) in
a box, so you need to figure out the max
value of g(x) over a,b and you need to be
integrating over a finite integral.