Part 11: Basic Statistics: Mean, Variance, Covariance
11.1 Mean and Variance: Actual and Expected
Sample Mean:
Expected (Population) Mean:
where are probabilities with .
Law of Large Numbers: As , the sample mean converges to the expected mean:
Sample Variance:
The (instead of ) is Bessel's correction for unbiased estimation.
Population Variance:
Standard Deviation: (same units as the data).
11.2 Probability Distributions: Binomial, Poisson, Normal
Binomial Distribution: models the number of successes in independent trials, each with success probability .
- Mean:
- Variance:
Poisson Distribution: The limit of Binomial as , , with (fixed). Models rare events.
- Mean:
- Variance: (mean equals variance!)
Normal (Gaussian) Distribution:
Standard Normal: with .
Central Limit Theorem (CLT): The average of independent samples from any distribution (with finite mean and variance ) approaches a normal distribution as :
The CLT is why the normal distribution appears everywhere in statistics.
11.3 Covariance Matrices and Joint Probabilities
Covariance measures how two variables vary together:
- Positive covariance: and tend to increase together
- Negative covariance: one increases as the other decreases
- Zero covariance: no linear relationship (but doesn't imply independence)
Covariance Matrix for a random vector :
where . Entry is . Diagonal entries are variances .
Properties of Covariance Matrices:
- is symmetric and positive semidefinite
- of rank-1 positive semidefinite matrices
- is positive definite iff the variables are linearly independent
- For independent variables, is diagonal (covariances are zero)
Multivariate Normal Distribution:
The contours of constant probability are ellipsoids defined by , with axes aligned with the eigenvectors of and axis lengths proportional to .
11.4 Three Basic Inequalities of Statistics
1. Markov's Inequality: For a nonnegative random variable and :
This gives a crude bound on tail probabilities using only the mean.
2. Chebyshev's Inequality: For any random variable with mean and variance :
This bounds the probability of being far from the mean using only the variance. It implies that most probability mass lies within a few standard deviations of the mean.
3. Chernoff's Inequality: For a sum of independent random variables:
This gives exponential tail bounds, which are much sharper than Chebyshev (which only gives decay). Chernoff bounds are essential for understanding the concentration of measure phenomenon and are the foundation for PAC learning theory.
11.5 Markov Matrices and Markov Chains
A Markov matrix (also called a stochastic matrix) satisfies:
- (all entries nonnegative)
- Each column sums to 1 (the probability leaving a state is distributed to other states)
Perron-Frobenius Theorem:
- The largest eigenvalue is
- All other eigenvalues satisfy
- If all entries are positive (not just nonnegative), then for all
- The eigenvector for has all positive entries (up to scaling)
Markov Chain: A sequence of probability vectors evolving as:
Each entry is the probability of being in state at step .
Steady State: The stationary distribution satisfies:
i.e., is the eigenvector of corresponding to , scaled so that its entries sum to 1.
Convergence to Steady State: The distance from to decays at a rate governed by the second eigenvalue :
The spectral gap determines the mixing time of the Markov chain. A larger gap means faster convergence.
Applications: Markov chains model random processes across physics, chemistry, economics, and computer science -- from Google's PageRank algorithm to Monte Carlo simulations.