Standard Library function that computes thestandard deviation and (optionally) the mean of the input array.
Variance If nonzero, the variance of array is returned instead of the standard deviation.
These equations are implemented as follows:
mean = TOTAL(array) / N_ELEMENTS(array) std = SQRT(TOTAL((array - mean)^2) / (N_ELEMENTS(array) - 1))
variance = TOTAL((array - mean)^2) / (N_ELEMENTS(array) - 1)
y = [1, 5, 9, 3, 10, 4]
std = STDEV(y, arrmean)
PRINT, std, arrmean
3.50238 5.33333