Cheat Sheet

Statistics Formulas

Every statistics formula a student needs from intro stats through inferential analysis: descriptive measures, probability rules, the normal distribution, hypothesis testing, and linear regression. Each comes with a one-line use note. Pair with AI-Math's solvers for plug-and-chug verification.

Descriptive statistics

Mean (population)

μ=1Ni=1Nxi\mu = \frac{1}{N}\sum_{i=1}^N x_i

Average of all population values.

Mean (sample)

xˉ=1ni=1nxi\bar{x} = \frac{1}{n}\sum_{i=1}^n x_i

Sample average.

Variance (population)

σ2=1N(xiμ)2\sigma^2 = \frac{1}{N}\sum (x_i - \mu)^2

Spread squared, divides by N.

Variance (sample)

s2=1n1(xixˉ)2s^2 = \frac{1}{n-1}\sum (x_i - \bar{x})^2

Bessel's correction: divide by n1n-1.

Standard deviation

σ=σ2\sigma = \sqrt{\sigma^2}

Square root of variance — same units as data.

Range

R=xmaxxminR = x_{\max} - x_{\min}

Simplest spread measure.

Probability rules

Addition rule

P(AB)=P(A)+P(B)P(AB)P(A \cup B) = P(A) + P(B) - P(A \cap B)

Probability of A or B (inclusion-exclusion).

Multiplication rule

P(AB)=P(A)P(BA)P(A \cap B) = P(A) \cdot P(B \mid A)

Probability of A and B; reduces to product when independent.

Conditional probability

P(BA)=P(AB)P(A)P(B \mid A) = \frac{P(A \cap B)}{P(A)}

Probability of B given A occurred.

Bayes' theorem

P(AB)=P(BA)P(A)P(B)P(A \mid B) = \frac{P(B \mid A) P(A)}{P(B)}

Reverse conditional probabilities — diagnostic tests, machine learning.

Independence

P(AB)=P(A)P(B)P(A \cap B) = P(A) P(B)

Holds iff AA and BB are independent.

Counting

Permutations

P(n,r)=n!(nr)!P(n,r) = \frac{n!}{(n-r)!}

Order matters: arrange rr from nn.

Combinations

C(n,r)=(nr)=n!r!(nr)!C(n,r) = \binom{n}{r} = \frac{n!}{r!(n-r)!}

Order doesn't matter: choose rr from nn.

Discrete distributions

Binomial PMF

P(X=k)=(nk)pk(1p)nkP(X = k) = \binom{n}{k} p^k (1-p)^{n-k}

kk successes in nn independent trials with success prob pp.

Binomial mean

μ=np\mu = np

Expected number of successes.

Binomial variance

σ2=np(1p)\sigma^2 = np(1-p)

Spread of the binomial.

Poisson PMF

P(X=k)=λkeλk!P(X = k) = \frac{\lambda^k e^{-\lambda}}{k!}

Rare-event count with mean rate λ\lambda.

Normal distribution

PDF

f(x)=1σ2πexp ⁣((xμ)22σ2)f(x) = \frac{1}{\sigma\sqrt{2\pi}} \exp\!\bigl(-\tfrac{(x-\mu)^2}{2\sigma^2}\bigr)

Bell curve, mean μ\mu, std σ\sigma.

Z-score

z=xμσz = \frac{x - \mu}{\sigma}

Standardise to compare across distributions.

Standard normal

ZN(0,1)Z \sim N(0, 1)

After z-score transformation.

68-95-99.7 rule

P(Xμ<kσ): 0.68, 0.95, 0.997P(|X - \mu| < k\sigma):\ 0.68,\ 0.95,\ 0.997

For k=1,2,3k = 1, 2, 3 — only valid for normal data.

Inferential statistics

Standard error of mean

SE=snSE = \frac{s}{\sqrt{n}}

Standard deviation of xˉ\bar{x} as estimator.

Confidence interval (mean, known $\sigma$)

xˉ±zα/2σn\bar{x} \pm z_{\alpha/2} \cdot \frac{\sigma}{\sqrt{n}}

zα/2=1.96z_{\alpha/2} = 1.96 for 95% CI.

t-statistic (one sample)

t=xˉμ0s/nt = \frac{\bar{x} - \mu_0}{s/\sqrt{n}}

Test mean = μ0\mu_0 when σ\sigma unknown.

Chi-square statistic

χ2=(OiEi)2Ei\chi^2 = \sum \frac{(O_i - E_i)^2}{E_i}

Goodness-of-fit / independence test for categorical data.

Linear regression

Slope

b1=(xixˉ)(yiyˉ)(xixˉ)2b_1 = \frac{\sum (x_i - \bar{x})(y_i - \bar{y})}{\sum (x_i - \bar{x})^2}

Best-fit slope (least squares).

Intercept

b0=yˉb1xˉb_0 = \bar{y} - b_1 \bar{x}

Forces line through (xˉ,yˉ)(\bar{x}, \bar{y}).

Pearson correlation

r=(xixˉ)(yiyˉ)(xixˉ)2(yiyˉ)2r = \frac{\sum (x_i - \bar{x})(y_i - \bar{y})}{\sqrt{\sum (x_i - \bar{x})^2 \sum (y_i - \bar{y})^2}}

Strength + direction of linear relation, r[1,1]r \in [-1, 1].

Coefficient of determination

R2=r2R^2 = r^2

Fraction of variance in yy explained by xx.

Try the formulas in our free solvers

  • /solver/statistics/mean-median-mode
  • /solver/statistics/standard-deviation
  • /solver/statistics/probability