StandardDevArray (Function)

image\trumpet2.gif Disclaimer

The StandardDevArray function calculates a standard deviation of array values.

Syntax

StandardDevArray(PriceArray, Size, DataType)

Returns (Double)

A numeric value containing the Standard Deviation for the specified array.

Parameters

Name

Type

Description

PriceArray

Numeric Array

Specifies the name of a numeric array upon which the standard deviation 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

To derive the standard deviation, first find the variance and then take its square root:

StdDev = image\standarddev_formula.gif

…where

N is the number of elements

D is the individual elements in the sample

M is the sample mean

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 StandardDevArray function only works with one-dimensional arrays.  The first element of the array that is used by this function is element 1. Element 0 of the array is not used.

Example

The following assigns the lowest value of the 20 elements in the array to Value1:

Array: myArray[20](0);

{… add EL statements here to assign values to array elements... }

Value1 = StandardDevArray(MyArray, 20);

See Also

ExtremesArray