# Math Help - Monte Carlo's Simulation

1. ## Monte Carlo's Simulation

How do I use Monte Carlo's simulation to approximate part of the ellipsoid X^2/2+y^2/4+z^2/8=16, that lies in the first octant x>0,y>0,z>0?

2. Originally Posted by herbalist
How do I use Monte Carlo's simulation to approximate part of the ellipsoid X^2/2+y^2/4+z^2/8=16, that lies in the first octant x>0,y>0,z>0?
Rejection sampling:

Generate a point $(x,y,z)$ uniformly distributed over $[0,\sqrt{32}]\times[0,8]\times[0,\sqrt{128}]$ accept this point if:

$\frac{x^2}{2}+\frac{y^2}{4}+\frac{z^2}{8}\le 16$

If not accepted repeat until an acceped point is found

The resultant $(x,y,z)$ is uniformly distributed over the required ellipsoid.

The efficiency of this process is $\approx 0.507$ which means the volume of the ellipsoid in the first octant is $\approx 0.507$ of the volume of $[0,\sqrt{32}]\times[0,8]\times[0,\sqrt{128}]$

CB