0

In answering How to compute the expected minimum Hamming distance with 3 strings, I needed to integrate the minimal Cartesian coordinate over the unit sphere. Because this seems like an interesting problem in its own right, I’m posting it as a separate question and answer.

So, what is the mean value of the minimal Cartesian coordinate over the unit sphere?

joriki
  • 238,052

1 Answers1

2

By symmetry, we can integrate over the solid angle in which $x$ is the minimal coordinate and multiply by $3$. The integration can be performed in spherical coordinates $x=\sin\theta\cos\phi$, $y=\sin\theta\sin\phi$ and $z=\cos\theta$:

\begin{eqnarray} \frac3{4\pi}\int\limits_{x\lt\min(y,z)}x\,\mathrm d\Omega &=& \frac3{4\pi}\int_{\frac\pi4}^{\frac{5\pi}4}\int_0^{\operatorname{arccot}\cos\phi}\sin^2\theta\mathrm d\theta\cos\phi\mathrm d\phi \\ &=& \frac3{4\pi}\int_{\frac\pi4}^{\frac{5\pi}4}\frac12\left(\operatorname{arccot}\cos\phi-\frac{\cos\phi}{1+\cos^2\phi}\right)\cos\phi\mathrm d\phi \\ &=& -\frac3{4\sqrt2} \\ &\approx& -0.53033\;. \end{eqnarray}

By symmetry, the mean value of the maximal Cartesian coordinate over the unit sphere is then $\frac3{4\sqrt2}$.

joriki
  • 238,052