### Covariance (fld, fld), Covariance (fld, fld, condFld), Covariance (fld, fld, condFld, cond)

Basic and Crystal syntax.

##### Arguments

- fld is any numeric field that can be evaluated by the function.
- condFld is a field used to group the values in fld by.
- cond is a String indicating the type of grouping for condFld. You only specify this argument when condFld is a Date, Time, DateTime or Boolean field. For more information on the valid strings for this argument, see Conditions for summary functions.

##### Returns

Fractional Number

##### Action

Covariance is the measure of the linear relation between paired variables (that is, the tendency of two fields to vary together). Fields are covariant when they vary according to a specific mathematical relationship. The circumference of a circle and the radius of a circle are covariant.

##### Examples

The following examples are applicable to both Basic and Crystal syntax:

`Covariance({table.FIELD1}, {table.FIELD2})`

Calculates the covariance of the two fields and returns the covariance as a fractional number.

Note: Using this function in a formula forces the formula to be evaluated at print time.

For more information on evaluation time considerations, see Evaluation Time functions.

##### Comments

Covariance is calculated using the following technique:

- It calculates the average (mean) value for the items in each sample.
- It subtracts the average value from the value of each item, in both samples.
- It multiplies the differences for each pair of items.
- It calculates the average (mean) value for all the products of that multiplication. The result is the covariance.

Seagate Software, Inc. http://www.seagatesoftware.com Please send comments to: techpubs@seagatesoftware.com