You are here: Symbol Reference > Dew.Stats Namespace > Statistics Class > Statistics Methods > Covariance Method > Covariance Method (TMtx, TMtx, boolean)
Dew Stats for .NET
Contents
PreviousUpNext
Statistics.Covariance Method (TMtx, TMtx, boolean)

Calculate the covariance matrix (Result), assuming matrix X columns are variables and its rows are observations.

C#
public Covariance(TMtx X, TMtx Result, bool NormN);

By definition the covariance matrix is a matrix of covariances between elements of a vector. It is the natural generalization to higher dimensions of the concept of the variance of a scalar-valued random variable. 

If X columns represent observation samples (variables), it's rows sample(s) values (observables), muj Xj j-th column average value, then the covariance matrix is defined as: 

 

or in matrix form: 

 

where E is the expected value. The inverse of this matrix, is called the inverse covariance matrix or the precision matrix.

This version does all necessary calculations to calculate covariance matrix.

What do you think about this topic? Send feedback!
Copyright (c) 1999-2010 by Dew Research. All rights reserved.