Home / Maths for AI / Symbols / Probability and statistics

Sample mean (x bar)

Say it: "x bar"

What it means

The average of observed values: xˉ=1n∑i=1nxi\bar{x} = \frac{1}{n}\sum_{i=1}^{n} x_i. Greek μ\mu ("mu") is used for the true (population) mean.

Example

xˉ of (4,7,7,9,13)=405=8\bar{x} \text{ of } (4, 7, 7, 9, 13) = \tfrac{40}{5} = 8

In code

import numpy as np
print(np.mean([4, 7, 7, 9, 13]))

Output

8.0

Where it appears in machine learning

Feature scaling subtracts the mean; batch normalisation uses the mean of each batch.

Related symbols

Learn it properly in the free lesson Describing Data, with practice questions that check your answers.