# Variance

Advanced Analysis Library Only

AnalysisLibErrType Variance (double inputArray[], int numberOfElements, double *mean, double *variance);

## Purpose

Calculates the variance and the mean, or average, values of the input array. Variance uses the following formulas to find the mean and the variance:

## Parameters

Input
Name | Type | Description
inputArray | double-precision array | Input array used to compute the mean and the variance.
numberOfElements | integer | Number of elements used to compute the mean and the variance values of the input array.
Output
Name | Type | Description
mean | double-precision | The mean value of the input array.
variance | double-precision | Variance value of the input array.

## Return Value

Name | Type | Description
status | AnalysisLibErrType | A value that specifies the type of error that occurred. Refer to analysis.h for definitions of these constants.