%mathpiper,def="Mean"

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

%/mathpiper

    %output,preserve="false"
      Result: True
.   %/output



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

*PARMS

{list} -- list of values

*DESC

This function calculates the mean of a list of values.

*E.G.
In> Mean({73,94,80,37,56,94,40,21,7,24})
Result: 263/5

In> N(Mean({73,94,80,37,56,94,40,21,7,24}))
Result: 52.6

*SEE WeightedMean, Median, Mode, GeometricMean
%/mathpiper_docs


