Generating a Monte Carlo estimate of a function of a normal distribution

111 Views Asked by At

Suppose I have a function g(Z), where Z has a uniform normal distribution. If I wanted to estimate its expected value, via Monte Carlo simulation, would it be correct to generate a sample of Z, then plug that into g(Z)*f(Z), where f is the PDF of Z, and then take the mean? Thanks!