3D axial statistics on a surface My data is a sample of 3D axes collected over a curved surface.
I want to know whether these axes have preferential directions relative to the surface: i.e. whether their direction is preferentially either within the plane of the surface, or perpendicular to the plane of the surface (as opposed to a uniform spherical distribution of axes).
I can think of 2 methods:


*

*Apply crudely the Bingham Test of uniformity (based on the sample scatter matrix). Since my surface, although curved, happens to be rather flat, a preferential direction (or a preferential plane) should result in a large value of the Bingham statistic.

*Compute the angle between each axis and the local vector normal to the surface.Then compare the distribution of these angles to a uniform distribution.


Neither method is fully satisfactory however: (1) because it relies on the surface being rather flat; (2) because its conclusion will be very crude (deviation from a uniform distribution) and will not prove the significance of either a planar bias or a perpendicular bias.
 A: To know the relationship between the axes and the surface, you need to adopt the approach (2) of comparing the axes to the surface normal.  It sounds like you want to adopt a null hypothesis tantamount to letting the axes be completely and uniformly random within the homogeneous space of frames of $\mathbb{R}^3$.  A reasonable test statistic is indeed the least angle $\phi$ between the surface normal and any of the six vectors determined by the three axes.  The tricky part is that this angle is not uniformly distributed.
We can find the distribution of the angle between a given oriented frame axis and the unit normal by fixing the frame and allowing the surface normal to vary uniformly at random.  It has a uniform distribution on the unit sphere.  Obtaining the closest angle to the nearest oriented frame axis limits the results to 1/6th of the sphere, which is divided into six faces of a cube.  A 48 element group of symmetries operates, having a fundamental domain within a spherical triangle with vertices at $(0,0,1)$, $(1,0,1)/\sqrt{2}$, and $(1,1,1)/\sqrt{3}$.

In this figure, the colored, almost square patch on top is the locus of spherical points closest to the north pole.  It covers 1/6th of the sphere.  The meshed triangular patch, covering one-eighth of that locus, is a fundamental domain for the symmetry group of the unoriented axes.  The colors (and the mesh on it) are contours of the polar angle $\phi$.  Clearly it is more likely for $\phi$ to lie in the blue and violet areas further from the north pole than it is to lie close to the north pole, because there is more spherical area in the blue and violet.
Using this simplification, we can compute the distribution of $\phi$.  Its PDF is
$$\eqalign{
f(\phi) &= 3\sin(\phi), &0 \le \phi \le \pi/4; \\
&= \frac{12}{\pi}\left(\frac{\pi}{4} - \text{ACos}(\cot(\phi))\right), &\pi/4 \le \phi \le \text{ASec}(\sqrt{3}).\\
}$$

Plot of the PDF of $\phi$.  Colors correspond to those in the previous figure.
The CDF can be obtained in closed form, too, which is handy for simulations and computing p-values:
$$\eqalign{
&F(\phi) \\
&= 3 - 3\cos(\phi),  &0 \le \phi \le \pi/4; \\
&= \frac{3}{\pi}\left( \pi - 4\ \text{ATan}(\sqrt{-2\cos(\phi)}) + \cos(\phi)\left(\pi - 4\ \text{ASin}(\cot(\phi))\right) \right), &\pi/4 \le \phi \le \text{ASec}(\sqrt{3}).\\
}$$
From this null distribution it is straightforward to derive reasonable hypothesis tests for independent random samples from the distribution.  For this purpose you might like to know that its mean and variance are approximately 0.556779 and 0.0414345, respectively. (Exact formulas in closed form look hard to come by.)  You could, for instance, use a t-test to decide whether your set of normal angles is significantly smaller than the expectation.  You could also use this CDF to construct a probability plot of the normal angles to get a detailed comparison of their distribution to the putative null distribution.
