CovarArray (Function)

image\trumpet2.gif Disclaimer

The CovarArray function calculates the covariance of two named Arrays.

Syntax

CovarArray(IndepArray,DepArray,Size)

Returns (Double)

The covariance of two user declared arrays.

Parameters

Name

Type

Description

IndDepArray

Numeric Array

Specifies the name of a numeric array of the independent values.

DepArray

Numeric Array

Specifies the name of a numeric array of the dependent values.

Size

Numeric

Sets the number of data elements (size) in the arrays to be evaluated.

Remarks

The covariance of two data sets measures their tendency to vary together. Where the variance is the average of the squared deviation of a data set from its mean, the covariance is the average of the products of the deviations of the data set values from their means.

The value for the Size input parameter should be a whole number greater than 0. Also, Size cannot be larger than the number of elements in the smallest array.

 The first element of the array that is used by this function is element 1. Element 0 of the array is not used.

Example

Assigns to Value1 the CovarArray value of one 10 element array to another 10 element array.

Array: myIndDepArray [10](0), myDepArray [10](0);

{… (assign values to both arrays) }

Value1 = CovarArray (myIndDepArray, myDepArray, 10);