Let's say we want to calculate a simple integral of the form:

But we are unable do anything else with than evaluate it, so we can't get the antiderivative. If we can't solve it analytically, maybe we can do it numerically?

We could use a riemann sum, but this won't work well for high dimensional integrals, such as the rendering equation, due to the curse of dimensionality - there is just too much space to cover in the integration domain.

Instead, we can use monte carlo methods, which are stochastic methods relying on random sampling of the domain.

Monte carlo integration
...

The basic idea of monte carlo methods is to sample the domain randomly many times, and average the results.

For our purposes, we are interested in a specific kind of monte carlo method typically called monte carlo integration, which is used for estimating definite integrals like ours.

In probability theory, we have a theorem called the Law Of The Unconcious Statistician (LOTUS):

Note that we only need the probability density on to calculate the integral, not the probability density on . From this law, we can derive the estimator for monte carlo integration.

Estimators
...

The cornerstone of monte carlo integration is the monte carlo estimator. For our simple placeholder integral, it can be written as so:

  • denotes the amount of random samples we have taken
  • is a random variable
  • is the probability density function of
  • is our integrand from earlier.

TODO
...

  • Intuition for division of pdf
  • Inverse transform method
  • Importance sampling
  • Derive estimator for monte carlo integration