The mean of a [[Math/Probability and Statistics/Dataset|dataset]] $x$ is a [[Central Tendency|central tendency]] that represents its average, denoted as $\bar{x}$ for [[Sample|samples]] and $\mu$ for [[Population|populations]], and calculated by dividing the sum with the [[Count|count]]. Due to its calculation, the mean is applicable to interval and ratio data only. Since it takes into account of every value, the mean is unique, but is influenced by the extremes.
Adding a constant to a dataset increases the mean by the same constant. Multiplying a dataset with a constant multiplies its mean by the same constant.
### Calculation
$
\begin{align*}
\bar{x} = \frac{1}{n}\sum_{i = 1}^{n}x_i
\end{align*}
$
If the data is presented in exhaustive form, the mean can be calculated via brute force.
$
\begin{align*}
\bar{x} = \frac{1}{n}\sum_{i = 1}^{n}{n_i x_i} = \sum_{i = 1}^{n}{f_i x_i}
\end{align*}
$
If the data is represented in a [[Frequency|frequency]] table, the mean can be obtained through a weighted sum.
$
\begin{align*}
\bar{u} = \frac{1}{n}\sum_{i = 1}^{n}{n_i c_i} = \sum_{i = 1}^{n}{f_i c_i}
\end{align*}
$
If the data is already grouped into classes, the mean has to be *approximated* using the midpoint of each class, denoted as $\bar{u}$.