{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

monte_carlo_sampling

# monte_carlo_sampling - The Monte Carlo sampling What is...

This preview shows pages 1–9. Sign up to view the full content.

The Monte Carlo sampling

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
What is Monte Carlo? A method to evaluate integrals Popular in all areas of science, economics, sociology, etc. Involves: Random sampling of domain Evaluation of function Acceptance/rejection of points
Why Monte Carlo? The domain of integration is complex: Complex environment lighting The integrals are very high-dimensional: Solution of the radiative transfer equation

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Basic Monte Carlo Algorithm Suppose we want to approximate in a high-dimensional space For i = 1 to n Pick a point x i at random Accept or reject the point based on criterion If accepted, then add f(x i ) to total sum Error typically decays as ( 29 Z f d = x x 1 N
Example: multiple dimensions What is the average of a variable for a N - dimensional probability distribution? Two approaches: Quadrature Discretize each dimension into a set of n points Possibly use adaptivity to guide discretization For a reasonably smooth function, error decreases as n -N/2 Monte Carlo Sample m points from the space Possibly weight sampling based on reference function Error decreases as m -1/2

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Problems: sampling tails of distributions We want to Integrate a sharply-peaked function Use Monte Carlo with uniformly-distributed random numbers What happens? Very few points contribute to the integral (~9%) Poor computational efficiency/convergence Can we ignore the tails? NO! Solution: use a different distribution -1 -0.5 0.5 1 0.2 0.4 0.6 0.8 1 ( 29 ( 29 ( 29 12 exp 100 f x x = - 0.2 0.4 0.6 0.8 1 200 400 600 800
Improved sampling: change of variables One way to improve sampling is to change variables: New distribution is flatter Uniform variates more useful Advantages: Simplicity Very useful for generating distributions of non-uniform variates (coming up) Disadvantages Most useful for invertible functions

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Change of variables: method 1. Given an integral 1. Transform variables 1. Choose variables to give (nearly) flat distribution 1. Integrate ( 29 1.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern