HTBasic Help
×
Menu
Index
F_variance
Variance of an array.
 
Loading        LOADSUB ALL FROM "MEAN.HTS"
or LOADSUB FROM "MATHLIB.HTS"
 
Usage                REAL A(*),Y
CALL F_Variance(Y,A(*))
 
Description                
FNVariance returns the variance of the elements in the array A. The variance is the average value of the square of the differences between the elements in the array and the mean value of the elements. This version of the variance uses the number of points in the array A, n, as the divisor in the averaging calculation, instead of the value n - 1 used in some formulas for variance.
 
Errors                
FNVariance causes an HTBasic error if its argument is not a REAL array.
 
See Also
Mean, Std