LaTeX for Statistics: Writing Distributions, Tests, and Formulas
Statistics relies heavily on precise mathematical notation. This guide covers the most common statistical formulas you'll encounter.
Basic Statistical Notation
Sample mean: `\bar{x} = \frac{1}{n}\sum_{i=1}^{n} x_i`. Population mean: \\mu. Standard deviation: \\sigma or s.
Probability Distributions
Normal distribution: X \\sim N(\\mu, \\sigma^2). Binomial: X \\sim \\text{Bin}(n, p). Poisson: X \\sim \\text{Pois}(\\lambda).
Hypothesis Testing
t-statistic: t = \\frac{\\bar{x} - \\mu_0}{s / \\sqrt{n}}. Chi-square: \\chi^2 = \\sum \\frac{(O_i - E_i)^2}{E_i}.
Regression
Linear regression: y_i = \\beta_0 + \\beta_1 x_i + \\epsilon_i. R²: R^2 = 1 - \\frac{SS_{\\text{res}}}{SS_{\\text{tot}}}.
✏️ Try it now — open the MathEditor and experiment with these formulas!