Darwin Help

Back to Index

var

Function var - unbiased estimate of variance of (list of) numbers

Calling Sequence  var(L1,L2,...)
Parameters
NameTypeDescription

Li {numeric,list(numeric)}a number or list of numbers
Return Type  numeric
Synopsis Finds the variance of all the values in the arguments. This is an unbiased estimator of the variance, that is it is computed with the formula: (sum(x^2) - sum(x)^2/n) / (n-1), where n is the number of x values. This function needs at least two values to compute successfully
Examples
> var(5, 97, 22, [14,15,16] );
1166.9667
> var(2,3,5,7,11,13,17,19);
40.8393
See also avg,   max,   median,   min,   std