Multivariate Mean and Covariance Calculator

This program Should take a multivariate dataset, one observation per line, and calculate the mean and covariance matrix. The covariance is the interrelatedness between random variables, the mean is the expected value of the vector.

4 Observations of 3 Dimensional Data


Enter Multivariate Data - one observation vector per line

Mean

[  1.500000000000E+00 ]
[  2.500000000000E+00 ]
[  4.250000000000E+00 ]

Covariance Matrix

[  3.333333333333E-01  6.666666666667E-01  1.166666666667E+00 ]
[  6.666666666667E-01  1.666666666667E+00  2.833333333333E+00 ]
[  1.166666666667E+00  2.833333333333E+00  4.916666666667E+00 ]

The first observation differs from the mean by:
[ -5.000000000000E-01 -5.000000000000E-01 -1.250000000000E+00 ]
where the inverse covariance matrix is:
[  1.800000000005E+01  2.999999999954E+00 -5.999999999986E+00 ]
[  2.999999999954E+00  2.999999999926E+01 -1.799999999956E+01 ]
[ -5.999999999986E+00 -1.799999999956E+01  1.199999999974E+01 ]

David Forrest 3 june 1998

Uses Perl, Math::MatrixReal. Calculations per eqn 1.40, Rencher, A. 1998. Multivariate Statistical Inference and Applications. New York:Wiley. p. 9.

Known Bugs:

other items of interest:

This page is
Validate