TITLE: Probability that $\sin\theta \cos\phi < 0.999772$
QUESTION [7 upvotes]: I am solving a kinematics question in particle scattering. The final answers lies in finding the probability such that
$$\sin\theta \cos\phi < 0.999772$$
The ranges of $\theta$ and $\phi$ are $0\leq\theta<\pi$ and $0\leq\phi<2\pi$.

REPLY [4 votes]: Since $\cos\phi$ is $2\pi$-periodic we can for simplicity shift the $\phi$ interval so that it becomes $[-\pi,\pi]$. For the product $\sin\theta\cos\phi$ to be close to $1$ then we must have $\sin\theta\approx 1$ and $\cos\phi\approx 1$ which means $\theta \approx \frac{\pi}{2}$ and $\phi \approx 0$. Taking $\theta = \frac{\pi}{2} + \delta\theta$ and $\phi = 0 + \delta\phi$ and performing a second order Taylor expansion gives us
$$\sin\theta\cos\phi \approx 1 - \frac{(\delta\theta)^2 + (\delta\phi)^2}{2}$$
Now $\sin\theta\cos\phi > 1-\epsilon = 0.999772$ becomes $(\delta\theta)^2 + (\delta\phi)^2 < 2\epsilon$. The area of this region in $[0,\pi]\times [-\pi,\pi]$ is just the area of a circle with radius $\sqrt{2\epsilon}$. The probability you are after is therefore approximately
$$1 - \frac{\pi\cdot 2\epsilon}{\pi\cdot 2\pi} = 1 - \frac{\epsilon}{\pi} \approx \color{red}{0.99992742}53$$
If you need a more accurate answer then a Monte-Carlo method is a simple way to go. Draw $N$ random numbers $\{\theta_i\}_{i=1}^N$ in $[0,\pi]$ and $N$ random numbers $\{\phi_i\}_{i=1}^N$ in $[-\pi,\pi]$. Then compute $\sin\theta_i\cos\phi_i$ and count how many times $=N_*$ the constraint is satisfied. An estimate for the probability you are after is $\frac{N_*}{N}$. This works, but it requires a lot of samples $N\gtrsim 10^9-10^{10}$ to get to the accuracy level where we can see a difference from the approximation found above. A more refined method is to only consider a small region around $(\theta,\phi) = (\pi/2,0)$ and use the same type of method to estimate the area we are after. With the refined method and with $N=10^{12}$ samples I find $\color{red}{0.99992742}12(2)$ thus the approximation above is good to an accuracy of a few parts in a billion.