7

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$.

  • 2
    Are $\phi$ and $\theta$ independently, uniformly distributed, or are you really picking a uniformly random point on a sphere and calculating $\phi, \theta$ from there? Or are they distributed in some other manner? – Arthur May 14 '17 at 22:02
  • 1
    Numerically I get 99.9927382% picking uniformly at random. – Mike Miller May 14 '17 at 22:07
  • Yep $\phi$ and $\theta$ are uniformly valued over the range – JamieBondi May 14 '17 at 22:09
  • Note that $\phi$ and $\theta$ are spherical coordinates (according to the comment posted under my answer), and a distribution on $\theta$ that is uniform on $[0,\pi)$ gives a highly non-uniform distribution over the surface of a sphere: the distribution is concentrated near the poles (at $\theta=0$ and $\theta=\pi$). So the question is what is supposed to be uniformly distributed: direction/spherical area, or coordinates within the rectangle $[0,\pi)\times[0,2\pi)$? – David K May 15 '17 at 00:42

2 Answers2

4

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.

Winther
  • 24,478
  • Just to note, my numerical solution in the comments is the above Monte-Carlo method with $N = 10^9$. – Mike Miller May 14 '17 at 23:02
  • 1
    @MikeMiller Nice, it seems to agree quite well. I tried with $N=10^{10}$ samples and got $0.99992743$. I was underestimating the number of samples needed with the naive method I describe here. With $N=10^{10}$ samples and only generating points in a circle of twice the approximate radius found here I get $0.999927421(4)$. – Winther May 14 '17 at 23:16
2

Let $\theta$ and $\phi$ be the two angles of a set of spherical coordinates, with $\theta$ the angle from the polar axis. Assume the probability distribution is uniform over the area of a sphere centered at the origin, or equivalently, it is uniform over direction from the origin, so it is proportional to the solid angle subtended by whatever cone the angles $\theta$ and $\phi$ lie within.

Making the conventional mapping between spherical and Cartesian coordinates, we have that $\sin\theta \cos\phi$ is the $x$-coordinate of a point on the unit sphere at spherical coordinates $(1, \theta, \phi).$ The region of the sphere with angles in the specified region is the entire sphere except for a small spherical cap near the $x$-axis.

The area of the surface of a sphere between two parallel planes (intersecting or tangent to the sphere) is $2\pi r$ times the distance between the planes, where $r$ is the radius of the sphere. Since the unit sphere has radius $1,$ the small spherical cap has area $(1-0.999772)\times2\pi,$ the area of the rest of the sphere is $(1+0.999772)\times 2\pi,$ and the area of the entire sphere is $4\pi.$ Therefore the probability is $$\frac{(1+0.999772)\times 2\pi}{4\pi} = 0.999886.$$

David K
  • 98,388