If the probability distribution is chosen as g = | f | / ∫ ∫ Ω Ω | f ( x ) | d x then it can be shown that the variance V a r g ( f ; N ) vanishes, and the error in the estimate will be zero. In practice it is not possible to sample from the exact distribution g for an arbitrary function, so importance sampling algorithms aim to produce efficient approximations to the desired distribution.