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.

All functions