STDEV Function
Standard Library function that computes the
enabled.
Usage
result = STDEV(array[, mean])
Input Parameters
array—The array to be processed. Can be of any data type except string.
Output Parameters
mean—(optional) The mean of array.
Returned Value
result—The standard deviation of array. If the Dimension keyword is used, then the value of result and mean will each have the structure of the input array, but with dimension n collapsed.
Keywords
Dimension—An integer (n³ 0) indicates that the standard deviation is to be computed over dimension n of the input array.
Variance—If nonzero, the variance of array is returned instead of the standard deviation.
Discussion
Mean, standard deviation and variance are basic statistical tools used in a variety of applications. They are computed as follows:
where n is the number of elements in array.
Example
; Create a simple array.
y = [1, 5, 9, 3, 10, 4]
; Compute the standard deviation and mean array value.
std = STDEV(y, arrmean)
; Print the results.
PRINT, std, arrmean
; PV-WAVE prints: 3.50238 5.33333