%mathpiper,def="UnbiasedVariance"

UnbiasedVariance(list) := 
[
    Check(IsList(list), "Argument", "Argument must be a list.");
    
    Sum((list - Mean(list))^2)/(Length(list)-1);
];

%/mathpiper






%mathpiper_docs,name="UnbiasedVariance",categories="User Functions;Statistics & Probability"
*CMD UnbiasedVariance --- calculates the unbiased variance of a list of values
*STD
*CALL
	UnbiasedVariance(list)

*PARMS

{list} -- list of values

*DESC

This function calculates the unbiased variance of a list of values.

*E.G.
In> UnbiasedVariance({73,94,80,37,57,94,40,21,7,26})
Result: 88009/90

In> N(UnbiasedVariance({73,94,80,37,57,94,40,21,7,26}))
Result: 977.8777778

*SEE Variance, StandardDeviation
%/mathpiper_docs