Investment Studio > Expressions > Functions > Statistical > DEVSQ

float devsq(float data [, ...])

Returns the sum of the squares of the deviations of the numbers from their arithmetic mean.

All elements in the argument list are converted to floats, with exclusion if conversion fails. The list may contain array arguments, in which case each array element is treated as a separate list element.

Mathematically, given a sequence x[n] containing N values, its deviation squared is computed as

  N  

devsq(x) = 

å

(x[k] - <x>)2

  k = 1  

where <x> is the arithmetic mean of the sequence.

Example

=devsq(1, 5, 3, 9, 8, 4)

returns 46.

See also avedev, average, kurt, skew, stdev, stdevp, var, varp.