# Thread: How to applying the monte carlo method : importance sampling

1. ## How to applying the monte carlo method : importance sampling

Hello.I have a little problem with applying a Monte Carlo method : Importance Sampling.I need to calculate :
integral(0 to infinity) integral(0 to infinity) 1/(2 * pi * sqrt((1 + x^2 + y^2)^3))dxdy
Can somebody help me ? Thanks in advance.

2. ## Re: How to applying the monte carlo method : importance sampling

Originally Posted by cristinelm
Hello.I have a little problem with applying a Monte Carlo method : Importance Sampling.I need to calculate :
integral(0 to infinity) integral(0 to infinity) 1/(2 * pi * sqrt((1 + x^2 + y^2)^3))dxdy
Can somebody help me ? Thanks in advance.
More information of why you mention importance sampling. I would first switch to polars, then you are effectivly left with a one dimensional integral, then you need to find a density $p(x)$ such that:

$\frac{r}{2\pi \sqrt{(1 + r^2)^3}\; p(r)}\approx \text{ constant}$

The main consideration for choosing $p(x)$ is that it's cumulative distribution be easily inverted, so that you can easily generate pseudo-random numbers with the required distribution. Which probably means that $p(r)$ should be piecewise polynomial.

CB

3. ## Re: How to applying the monte carlo method : importance sampling

Originally Posted by CaptainBlack
More information of why you mention importance sampling. I would first switch to polars, then you are effectivly left with a one dimensional integral, then you need to find a density $p(x)$ such that:

$\frac{r}{2\pi \sqrt{(1 + r^2)^3}\; p(r)}\approx \text{ constant}$

The main consideration for choosing $p(x)$ is that it's cumulative distribution be easily inverted, so that you can easily generate pseudo-random numbers with the required distribution. Which probably means that $p(r)$ should be piecewise polynomial.

CB
Thanks very much,it was very usefull for me your answer.I have anoather problem now,how can i make a goodness fit test for sample from bivariate cauchy distribution ? Is there any book that i could find some example about goodness fit test for multivariate/bivariate distribution ?