# Mean, Variance, and Expected Values

These are fundamental concepts in statistics that describe the central tendency and variability of a probability distribution.

## Mean

The mean, $\mu$, of a probability provides a measure of the central tendency. For a discrete random variable $X$ with a probability mass function $\mathbb{P}(x)$:

$\mu = \sum_X x \cdot \mathbb{P}(x)$For a continuous random variable $X$ with a probability density function $f(x)$:

$\mu = \int_{-\infty}^{\infty} x \cdot f(x) \, dx$The mean can also be expressed in term of the **expected value**, i.e. the weighted average value of all possible outcomes of the random variable.

## Variance

Variance measures the spread or dispersion of a set of values. It is the expected value of the squared deviation of a random variable from its mean.

$\text{Var}(X) = \sigma^2 = E[(X - \mu)^2]$ $\sigma^2 = \begin{cases} \int_{-\infty}^\infty(x-\mu)^2f(x)\,dx & \text{$x$ continuous}\\ \sum_X (x-\mu)^2\mathbb{P}(x) & \text{$x$ discrete} \end{cases}$## Standard Deviation

The standard deviation is the square root of the variance and provides a measure of the dispersion in the same units as the mean.

$\sigma = \sqrt{\text{Var}(X)}$