mean

mean(a, b, c, ...)

mean(A)

mean(A, dimension)

Try it yourself:


Calculate an arithmetic mean

mean returns the arithmetic average: the sum of values divided by their count. It summarizes a numeric collection with one central value.

Example

The mean of 2, 4, and 9 is 5. Use sum and count when you need the components explicitly. Compare median, which is less affected by extreme values.

Caveats

Inputs should be numeric and measured on a scale where averaging makes sense. Remove missing values deliberately with filter. Pair the mean with std to describe spread; a mean alone can conceal variation.

Try Mean in Calcul.io

Start with one of the editable examples above, then replace its arguments with your own values. Keeping the function on a separate calculator line makes the input and result easy to compare. For a longer workflow, assign the result to a variable or reference that line in the next expression.

Check the shown signature before adding optional arguments, and use the related-function links to compare operations with similar purposes.

All functions