You are here: Symbol Reference > Statistics Namespace > Functions > Statistics.Covariance Function
Stats Master VCL
ContentsIndex
PreviousUpNext
Statistics.Covariance Function

Covariance/variance.

Pascal
procedure Covariance(const X: TVec; out aResult: double; NormN: boolean = true); overload;
Parameters 
Description 
Defines sample (variable) values (observables). In this case X is treated as row and not (as normally) column vector. 
aResult 
Returns the covariance (in this case equal to variance) for X vector elements. Because in this case X is represented as row vectro, the the result is simply scalar value E(X(T)*X)-E(X(T))E(X) = Var(X)
NormN 
If true (default value), the result will be normalized with number of observations (N), otherwise it will be normalized with N-1

The covariance between two real-valued random variables x and y,with expected values E(x)=mu and E(y)=nu is defined as:  

 

 

where E(x), E(y) are x and y expected values. 

For more info about covariance definition and properties check thd following links: 

 

  1. http://mathworld.wolfram.com/Covariance.html 

  2. http://en.wikipedia.org/wiki/Covariance
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!