VarianceArray (Function)

image\trumpet2.gif Disclaimer

The VarianceArray function calculates the estimated variance for an array of values.

Syntax

VarianceArray(PriceArray, Size, DataType)

Returns (Double)

A numeric value containing the estimated variance based either on the population or a sample of an array, as determined by the specified inputs.

Parameters

Name

Type

Description

PriceArray

Numeric

Specifies the name of a numeric array containing values upon which the variance is calculated.

Size

Numeric

Sets the number of data elements (size) in the array to evaluate.

DataType

Numeric

Sets what data elements should be based on: 1 = population, 2 = sample

Remarks

Variance is the measure of the "scatter" of prices around the mean of a sample.

The value for the Size input parameter should always be a whole number greater than 0 and is typically equal to the number of data elements in the array.

The VarianceArray function only works with one-dimensional arrays.  All array-based referencing begins with array element 1.

  This array function is similar to Variance except that you can build an array of values that does not necessarily include contiguous bar values.

Example

Assigns to Value1 the variance for the named array for all 10 elements in the array.

Array: myArray[10](0);

{… (assign values to array) }

Value1 = VarianceArray (myArray, 10);