Statistical Distance Calculator

This program calculates the statistical distance or length of a vector given a covariance matrix.

Euclidean distance assumes the measurements are orthagonal. Mahalanobis or Statistical distance takes into account the correlations between the variables. My work uses Hotelling's T^2 statistic which is the squared statistical distance.


Covariance Matrix
Vector

2.07735368677415 = Mahalinobis Distance = sqrt( v`S^-1 v)

4.31539833995416 = Hotelling's T^2 = v` S^-1 v

4.58257569495584 = Euclidean Distance = sqrt(v`v)

Inverse Covariance:

[  5.284387181762E+01 -2.243048578668E+01 -9.722418962648E+00 ]
[ -2.243048578668E+01  1.053532173500E+01  1.111849063008E+00 ]
[ -9.722418962648E+00  1.111849063008E+00  1.325741924279E+01 ]

Covariance Matrix
Vector