Suppose we need to calculate the following points
I.e. the area under the gray portion in FIG.
May be performed for f (x) N samplings, calculate their average value (referred to as the formula basic Monte Carlo estimator, the estimator substantially Monte Carlo )
When N tends to infinity, F N values would converge to F, the following is a mathematical proof
Since the basic Monte Carlo estimator applies only to cases such as the probability evenly distributed, so the need to promote open:
The following is a proof of this formula
Reference: http: //www.scratchapixel.com/lessons/mathematics-physics-for-computer-graphics/monte-carlo-methods-in-practice/monte-carlo-integration