Expectation and Variance
Expected Value
The expected value (mean, expectation) is the long-run average value of a random variable.
For discrete variables:
For continuous variables:
Notation: $E[X]$, $\mathbb{E}[X]$, or $\mu_X$
Properties of Expectation
- Linearity: $E[aX + bY] = aE[X] + bE[Y]$
- Constant: $E[c] = c$
- Independence: If $X$ and $Y$ are independent, $E[XY] = E[X]E[Y]$
-
Law of the unconscious statistician (LOTUS):
$$ E[g(X)] = \sum_x g(x) p(x) \quad \text{(discrete)} $$$$ E[g(X)] = \int_{-\infty}^{\infty} g(x) f(x) dx \quad \text{(continuous)} $$
Variance
Variance measures the spread or dispersion around the mean:
Computational formula:
Notation: $\text{Var}(X)$, $\sigma_X^2$, or $\sigma^2$
Properties of Variance
- Constant: $\text{Var}(c) = 0$
- Scaling: $\text{Var}(aX) = a^2 \text{Var}(X)$
- Shift: $\text{Var}(X + c) = \text{Var}(X)$
-
Sum of independent variables:
$$ \text{Var}(X + Y) = \text{Var}(X) + \text{Var}(Y) \quad \text{(if independent)} $$ -
General sum:
$$ \text{Var}(X + Y) = \text{Var}(X) + \text{Var}(Y) + 2\text{Cov}(X, Y) $$
Standard Deviation
Standard deviation is the square root of variance:
Same units as $X$, more interpretable than variance.
Covariance
Covariance measures how two variables vary together:
Computational formula:
Properties:
- $\text{Cov}(X, X) = \text{Var}(X)$
- $\text{Cov}(X, Y) = \text{Cov}(Y, X)$ (symmetric)
- $\text{Cov}(aX, bY) = ab \cdot \text{Cov}(X, Y)$
- $\text{Cov}(X + Y, Z) = \text{Cov}(X, Z) + \text{Cov}(Y, Z)$
Correlation
Correlation is normalized covariance (scale-free):
Properties:
- $-1 \leq \rho \leq 1$
- $\rho = 1$: perfect positive linear relationship
- $\rho = -1$: perfect negative linear relationship
- $\rho = 0$: no linear relationship (but may have nonlinear dependence)
- Independence implies zero correlation, but zero correlation does NOT imply independence
Sample Statistics
Given data $x_1, \ldots, x_n$:
Sample mean:
Sample variance (unbiased estimator):
Sample standard deviation:
Sample covariance:
Moments
Raw moments: $\mu_k’ = E[X^k]$
Central moments: $\mu_k = E[(X - \mu)^k]$
- $\mu_1 = \mu$ (mean)
- $\mu_2 = \sigma^2$ (variance)
- $\mu_3$ relates to skewness (asymmetry)
- $\mu_4$ relates to kurtosis (tail heaviness)
Moment Generating Function (MGF)
Key property: $k$-th derivative at $t=0$ gives $k$-th moment:
Uniqueness: If two distributions have the same MGF, they are identical.
Inequalities
Markov’s inequality (for non-negative $X$):
Chebyshev’s inequality:
Guarantees that most mass lies within a few standard deviations of the mean.
Law of Large Numbers
Weak LLN: Sample mean converges in probability to expected value:
Strong LLN: Sample mean converges almost surely:
Foundation of Monte Carlo methods and empirical risk minimization.
Central Limit Theorem
For i.i.d. variables $X_1, \ldots, X_n$ with mean $\mu$ and variance $\sigma^2$:
As $n \to \infty$, the sample mean approaches a Normal distribution regardless of the original distribution.