STDEV Function
Standard Library function that computes the standard deviation and (optionally) the mean of the input array.
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:
note | The above equation is well defined for complex input. |
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
See Also
Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.