covariance Function

public pure function covariance(x, y) result(rst)

Computes the sample covariance of two data sets.

The covariance computed is the sample covariance such that .

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in), dimension(:) :: x

The first N-element data set.

real(kind=real64), intent(in), dimension(size(x)) :: y

The second N-element data set.

Return Value real(kind=real64)

The covariance.


Contents