7
$\begingroup$

I'm dealing with 3D data that are the trajectory of a point over time. I would like to have an indication of how much it is "spread" in space and I thought about using the volume of the 95% confidence ellipsoid as they do for stabilometric measures in 2D with the displacement of the Center of Pressure.

So I have $x,y,z$ over time and with PCA I find the three eigenvalues and eigenvectors and I can plot the ellipsoid. But then I get stuck with the confidence region...I know that probably it is trivial but I don't understand which is the coefficient that I have to multiply the axis lengths for in order to obtain the volume that I need. Can I treat my data as a trivariate distribution? I know that in the errorellipse function for MATLAB, for example, they use the chi-squared distribution to calculate the coefficient, but I don't understand why.

$\endgroup$
1
  • 1
    $\begingroup$ Thanks to @whuber for the correction. If you have the three principal radii a, b, and c, (which you'd have, presumably, or at least could figure out, if you can plot it, since it's the distance from the center to where the ellipsoid crosses the principal axes), the volume of the ellipsoid will be $\frac{4}{3}πabc$. $\endgroup$
    – Glen_b
    Commented Aug 14, 2013 at 21:22

1 Answer 1

7
$\begingroup$

Suppose $U$, $V$, and $W$ are independent and have a standard normal distribution. Then by definition of the chi-squared distribution (as a sum of squares of iid normal variables), the sum of squares $U^2 + V^2 + W^2$ has a chi-squared distribution with three degrees of freedom. We find (via tables or calculation) that its upper 95th percentile is $7.815$. This means that 95% of all the probability lies within the set $$R_{0.95}=\{(u,v,w)\vert u^2 +v^2+w^2 \le 7.815\}.$$

This is a ball of radius $r = \sqrt{7.815}=2.795$; accordingly we obtain its volume $V = 4\pi r^3/3 = 91.51.$

You believe your data are obtained by rescaling $U$ to $X'=e_1U$, $V$ to $Y'=e_2V$, and $Z'=e_3W$ where $e_1,$ $e_2,$ and $e_3$ are the PCA eigenvalues (not their squares!) and then rotating $(X',Y',Z')$ into $(X,Y,Z)$. The rotation does not change volumes, but the initial rescaling means $R_{0.95}$ corresponds to the set

$$\{(x,y,z)\vert (x/e_1)^2 + (y/e_2)^2 + (z/e_3)^2 \le 7.815\}$$

before the rotation occurs. Up to rotation, this is the so-called "confidence ellipse" and therefore has the same shape and volume. Because the orthogonal axes have been separately scaled by $e_1,$ $e_2,$ and $e_3$ (a linear transformation with determinant $e_1e_2e_3$), the new volume is $e_1 e_2 e_3 V = 91.51 e_1 e_2 e_3.$ Similar calculations handle any other level of "confidence," with $7.815$ (and thence $V$) replaced by the associated percentile of a $\chi^2_{(3)}$ distribution.


It may be worth pointing out that a trajectory of a continuously moving point rarely is approximated by a trivariate normal distribution, so this whole program has to be considered approximate and exploratory. As such you could just adopt some standard convenient value for $V$ ($100$ comes to mind, corresponding to $95.96$% of the probability) if your purpose is to compare spreads of trajectories.

$\endgroup$
3
  • $\begingroup$ What confuses me is that in all the papers about stabilometry that I read they calculate the 95% confidence ellipse after obtaining the length of the axes with 1.96*sqrt(eigenvalue)...why? $\endgroup$ Commented Aug 15, 2013 at 21:46
  • 1
    $\begingroup$ Because this construction has nothing to do with "confidence" per se, the objective is to establish some convention for describing the shape and relative size of the points. Using $1.96$ sort of works (for three variables): it contains about $72$% of the probability of the trivariate normal distribution. But as the number of variables increases this method produces ellipses that are far too small. For instance, with $10$ variables it will contain only $4.6$% of the probability; using $4.28$ instead of $1.96$ in this case will contain $95$% of the probability. $\endgroup$
    – whuber
    Commented Aug 15, 2013 at 21:59
  • $\begingroup$ The numbers in the preceding comment are explained at stats.stackexchange.com/a/69358. $\endgroup$
    – whuber
    Commented Sep 6, 2013 at 15:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.