Statisticsdrill

Statisticsdrill / Cheat sheet

Statistics formulas cheat sheet

The formulas from a first statistics course on two pages: what each one is, how to compute it by hand, the Excel or Sheets function that does it, and the mistake that costs the marks. Most entries have a problem with fresh numbers every time. Print the page or get the PDF by email.

No newsletter spam: the PDF, one follow-up with the free exercises, and nothing else unless you ask.

The ones worth learning first

WhatHow
Sample meanx̄ = Σx / n
Sample standard deviations = √[ Σ(x - x̄)² / (n - 1) ] Excel: STDEV.S
z-scorez = (x - μ) / σ
Normal probabilityP(X < x) = NORM.DIST(x, μ, σ, TRUE)
Binomial, exactly kP(k) = C(n,k) pᵏ (1-p)ⁿ⁻ᵏ BINOM.DIST(k, n, p, FALSE)
Standard error of the meanSE = σ / √n
Confidence interval for a meanx̄ ± t* · s/√n
Test statistic for a meant = (x̄ - μ₀) / (s/√n)
BayesP(A|B) = P(B|A) P(A) / P(B)
Correlationr = Σ(zₓ z_y) / (n - 1) CORREL

Describing data

Meanx̄ = Σx / n AVERAGE drill
MedianMiddle value of the sorted list; average of the two middle values when n is even MEDIAN drill
ModeMost frequent value MODE.SNGL drill
Rangemax - min drill
Sample variancen - 1 for a sample, n for a population.s² = Σ(x - x̄)² / (n - 1) VAR.S drill
Sample standard deviations = √s² STDEV.S drill
Population standard deviationσ = √[ Σ(x - μ)² / N ] STDEV.P drill
Shortcut for variances² = [ Σx² - (Σx)²/n ] / (n - 1)
z-scorez = (x - μ) / σ STANDARDIZE drill
Coefficient of variationCV = s / x̄ (as a percent) drill
Weighted meanx̄_w = Σ(wx) / Σw SUMPRODUCT(w, x)/SUM(w) drill
Percentile (inclusive)Position L = p(n - 1) + 1 on the sorted list, interpolate PERCENTILE.INC drill
Quartiles and IQRIQR = Q3 - Q1 QUARTILE.INC
Outlier fencesBelow Q1 - 1.5 IQR or above Q3 + 1.5 IQR
Empirical rule68% within 1σ, 95% within 2σ, 99.7% within 3σ (normal data)
ChebyshevAt least 1 - 1/k² of data within k standard deviations (any shape)
Skewness signMean > median: right-skewed. Mean < median: left-skewed.

Probability rules

ComplementP(not A) = 1 - P(A)
At least oneP(at least one) = 1 - P(none) drill
Addition ruleMutually exclusive: P(A and B) = 0.P(A or B) = P(A) + P(B) - P(A and B) drill
Multiplication, independentP(A and B) = P(A) P(B) drill
Multiplication, generalP(A and B) = P(A) P(B|A)
Conditional probabilityFrom a table: cell / row or column total.P(A|B) = P(A and B) / P(B) drill
Independence testA and B independent if P(A|B) = P(A)
Total probabilityP(B) = Σ P(B|Aᵢ) P(Aᵢ) drill
Bayes' theoremA positive screening test: sensitivity x prevalence over all positives.P(A|B) = P(B|A) P(A) / [ P(B|A) P(A) + P(B|A') P(A') ] drill
Expected valueE(X) = Σ x P(x) drill
Variance of a discrete variableVar(X) = Σ (x - μ)² P(x)
Oddsodds = p / (1 - p)

Counting

Factorialn! = n (n-1) ... 1 FACT
Permutations (order matters)P(n,k) = n! / (n - k)! PERMUT drill
Combinations (order does not)C(n,k) = n! / [ k! (n - k)! ] COMBIN drill
Multiplication principlem ways then n ways = m x n outcomes
Hypergeometric (without replacement)P(k) = C(K,k) C(N-K, n-k) / C(N,n) HYPGEOM.DIST drill

Discrete distributions

Binomial, exactly kP(k) = C(n,k) pᵏ (1-p)ⁿ⁻ᵏ BINOM.DIST(k, n, p, FALSE) drill
Binomial, at most kBINOM.DIST(k, n, p, TRUE)
Binomial, at least k1 - BINOM.DIST(k - 1, n, p, TRUE) drill
Binomial mean and SDμ = np, σ = √[np(1-p)] drill
Poisson, exactly kP(k) = e^(-λ) λᵏ / k! POISSON.DIST(k, λ, FALSE) drill
Poisson, at most kPOISSON.DIST(k, λ, TRUE) drill
Poisson mean and varianceμ = σ² = λ (scale λ to the time window asked)
GeometricP(first success on trial k) = (1-p)ᵏ⁻¹ p, mean 1/p
Normal approximation to binomialμ = np, σ = √[np(1-p)], use when np ≥ 10 and n(1-p) ≥ 10; continuity correction ±0.5 drill

Normal distribution

Standardizez = (x - μ) / σ
Below a valueP(X < x) = NORM.DIST(x, μ, σ, TRUE) or NORM.S.DIST(z, TRUE)
Above a valueP(X > x) = 1 - NORM.DIST(x, μ, σ, TRUE) drill
Between two valuesNORM.DIST(b, μ, σ, TRUE) - NORM.DIST(a, μ, σ, TRUE) drill
Value at a percentilex = NORM.INV(p, μ, σ) or x = μ + z σ drill
Common z values90%: 1.645 95%: 1.960 99%: 2.576 (two-sided)
Sampling distribution of the meanμ_x̄ = μ, σ_x̄ = σ / √n, z = (x̄ - μ) / (σ/√n) drill
Central limit theoremx̄ is approximately normal when n ≥ 30, whatever the population shape
Sampling distribution of a proportionμ_p̂ = p, σ_p̂ = √[p(1-p)/n]

Confidence intervals

Mean, σ knownx̄ ± z* σ/√n CONFIDENCE.NORM
Mean, σ unknownx̄ ± t* s/√n, df = n - 1 CONFIDENCE.T, T.INV.2T(α, df)
Proportionp̂ ± z* √[p̂(1-p̂)/n]
Difference of two means(x̄₁ - x̄₂) ± t* √(s₁²/n₁ + s₂²/n₂)
Margin of errorE = z* σ/√n (half the width of the interval)
Sample size for a meann = (z* σ / E)² round up
Sample size for a proportionn = p̂(1-p̂)(z*/E)² use 0.5 when unknown

Hypothesis tests

StepsH₀ and H₁, α, test statistic, p-value (or critical value), decision, conclusion in words
One mean, σ knownz = (x̄ - μ₀) / (σ/√n)
One mean, σ unknownt = (x̄ - μ₀) / (s/√n), df = n - 1 T.DIST.2T(|t|, df)
One proportionz = (p̂ - p₀) / √[p₀(1-p₀)/n]
Two means (independent)t = (x̄₁ - x̄₂) / √(s₁²/n₁ + s₂²/n₂) T.TEST(r1, r2, 2, 3)
Pairedt = d̄ / (s_d/√n) on the differences T.TEST(r1, r2, 2, 1)
p-value ruleReject H₀ when p-value < α
ErrorsType I: reject a true H₀ (probability α). Type II: fail to reject a false H₀ (β). Power = 1 - β.
Chi-square goodness of fitχ² = Σ (O - E)² / E, df = k - 1 CHISQ.TEST
Chi-square independenceE = (row total x column total) / n, df = (r-1)(c-1)
ANOVAF = MS_between / MS_within, df = (k-1, n-k)

Regression and correlation

Correlationr = Σ[(x - x̄)(y - ȳ)] / [(n-1) sₓ s_y] CORREL
Slopeb = r (s_y / sₓ) SLOPE
Intercepta = ȳ - b x̄ INTERCEPT
Predictionŷ = a + b x FORECAST.LINEAR
Coefficient of determinationR² = r² (share of variation explained) RSQ
Residuale = y - ŷ
Standard error of the estimates_e = √[ Σe² / (n - 2) ] STEYX
Test the slopet = b / SE_b, df = n - 2

statisticsdrill.com: practice every one of these with instant checking. 78 entries.

Questions

When do I divide by n and when by n - 1?

Divide by n for a population (you have every value). Divide by n - 1 for a sample, which corrects the bias from estimating the mean from the same data. Excel: STDEV.P and VAR.P for populations, STDEV.S and VAR.S for samples.

z or t?

z when the population standard deviation is known (rare in practice) or for proportions. t when you estimate the standard deviation from the sample, with n - 1 degrees of freedom. For n above about 30 the two are close.

How do I know which distribution a problem wants?

A fixed number of trials with a success or failure each: binomial. Counts of events in a time or space window with an average rate: Poisson. Measurements like heights, times, scores with a mean and standard deviation: normal. Drawing without replacement from a small group: hypergeometric.

What does the p-value mean?

The probability of a result at least as extreme as the one observed, if the null hypothesis were true. Small p-value (below α) means the data are unlikely under H₀, so you reject it. It is not the probability that H₀ is true.

A cheat sheet does not make them stick

Doing them with instant checking does. The free exercises need no account.

Start practicing