All formulas

Statistics

Arithmetic mean

stats.meanAlso called mean, average, avg, arithmetic mean

xˉ=1n∑i=1nxi\bar{x} = \frac{1}{n}\sum_{i=1}^{n} x_i

The sum of the observations divided by their number.

Notation

xx

observations

x ∈ ℝn

nn

number of observations

Size, at least 1

xˉ\bar{x}

Result: the mean

scalar

Worked examples

Each result is solved exactly and confirmed by two independent computations.

  1. Given

    x=[1,2,3,4]x = [1, 2, 3, 4]

    Result

    xˉ=52\displaystyle \bar{x} = \frac{5}{2}

    ≈ 2.5

  2. Given

    x=[2,4,4,4,5,5,7,9]x = [2, 4, 4, 4, 5, 5, 7, 9]

    Result

    xˉ=5\displaystyle \bar{x} = 5
  3. Given

    x=[0.1,0.2,0.4]x = [0.1, 0.2, 0.4]

    Result

    xˉ=730\displaystyle \bar{x} = \frac{7}{30}

    ≈ 0.233333333333

Common mistakes

  • Sum without dividing by n

    The result is the total of the observations, n times the mean.

    Fix: Divide the sum by the number of observations.

Source

  • NIST/SEMATECH e-Handbook, §1.3.5.1

    NIST/SEMATECH e-Handbook of Statistical Methods. https://www.itl.nist.gov/div898/handbook/ Last updated 2022-04-27. doi:10.18434/M32189

    doi.org