Source: https://math.unice.fr/~rubentha/enseignement/poly-cours-monte-carlo-m1-im.pdf