I'm trying to solve the following problem

Use Monte-Carlo methods to find a $95 \%$ confidence interval for the following integral: $$\int_{-\infty}^{\infty}\int_{-\infty}^{\infty} \exp\left( \frac{1}{2}\left[x^2 - \frac{x(y-1)}{10} +(y-1)^2\right] \right ) dx dy$$

Now, my first thoughts were that this function looks similar to a bivariate normal density. For example, considering a bivariate normal distribution with parameters $\mu_1 = 0, \mu_2 = \sigma_1 = \sigma_2 = 1$ and $\rho = \frac{1}{20}$ we would have the density

$$f(x,y) = \frac{1}{2 \pi \sqrt{399/400}} \ \exp\left(-\frac{400}{399} \ g(x,y) \right)$$ where $g(x)$ is the function being integrated, that is,

$$ g(x)= \exp\left( \frac{1}{2}\left[x^2 - \frac{x(y-1)}{10} +(y-1)^2\right] \right ). $$

I have tried to express the integral as some kind of expected value under the bivariate normal distribution, so as to simulate values under that distribution, but somehow I always end up getting stuck. If anyone has any idea on how to proceed, I would appreciate it very much.


  • 1
    $\begingroup$ The normal distribution has the shape $\exp(\mathbf{-} x^2)$, not $\exp(x^2)$. $\endgroup$ Commented Oct 10, 2020 at 5:04
  • $\begingroup$ Agreed, that's why I said similar. I was still hoping there might be a way to write the expression as an expectation of the bivariate normal density. $\endgroup$
    – Bergson
    Commented Oct 10, 2020 at 5:44

1 Answer 1


Unless there is a typo in the text of the exercise (and this is quite likely!), Monte Carlo methods are superfluous for computing this integral since the integrand diverges at $\pm\infty$. Hence $$\int_{-\infty}^{\infty}\int_{-\infty}^{\infty} \exp\left( \frac{1}{2}\left[x^2 - \frac{x(y-1)}{10} +(y-1)^2\right] \right )\, \text{d}x\,\text{d}y=+\infty$$

  • $\begingroup$ Thank you, I also think it is a typo! $\endgroup$
    – Bergson
    Commented Oct 12, 2020 at 2:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.