Lecture 5 / 6 Monte Carlo Flashcards

(4 cards)

1
Q

Describe the computational steps of a Monte Carlo
simulation for the estimation of the number pi

A

The ratio of the number of points inside the circle to the total number of points is approximately equal to the ratio of the area of the circle to the area of the square

Steps:

  1. Circle inside a square
  2. Generate a large number of random points within the square
  3. For each point (x, y), check if it lies inside the circle. X^2 + y^2 <= r^2
  4. Count the number of points that fall inside the circle and the total number of points
  5. The ratio of the number of points inside the circle to the total number of points is approximately equal to the ratio of the area of the circle to the area of the square
  6. Solve for Pi
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Explain how we can use the spline method to numerically sample from non-invertible probability functions. Discuss a high-level code implementation for the spline sampling

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the computational procedure to estimate the definite integral of a function h(x) in the interval [a,b] using Monte Carlo? How can you show that the Monte Carlo estimate is a good estimator for the true definite integral?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly