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.
The ones worth learning first
| What | How |
|---|
| Sample mean | x̄ = Σx / n |
| Sample standard deviation | s = √[ Σ(x - x̄)² / (n - 1) ] Excel: STDEV.S |
| z-score | z = (x - μ) / σ |
| Normal probability | P(X < x) = NORM.DIST(x, μ, σ, TRUE) |
| Binomial, exactly k | P(k) = C(n,k) pᵏ (1-p)ⁿ⁻ᵏ BINOM.DIST(k, n, p, FALSE) |
| Standard error of the mean | SE = σ / √n |
| Confidence interval for a mean | x̄ ± t* · s/√n |
| Test statistic for a mean | t = (x̄ - μ₀) / (s/√n) |
| Bayes | P(A|B) = P(B|A) P(A) / P(B) |
| Correlation | r = Σ(zₓ z_y) / (n - 1) CORREL |
Describing data
| Mean | x̄ = Σx / n AVERAGE drill |
| Median | Middle value of the sorted list; average of the two middle values when n is even MEDIAN drill |
| Mode | Most frequent value MODE.SNGL drill |
| Range | max - min drill |
| Sample variancen - 1 for a sample, n for a population. | s² = Σ(x - x̄)² / (n - 1) VAR.S drill |
| Sample standard deviation | s = √s² STDEV.S drill |
| Population standard deviation | σ = √[ Σ(x - μ)² / N ] STDEV.P drill |
| Shortcut for variance | s² = [ Σx² - (Σx)²/n ] / (n - 1) |
| z-score | z = (x - μ) / σ STANDARDIZE drill |
| Coefficient of variation | CV = s / x̄ (as a percent) drill |
| Weighted mean | x̄_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 IQR | IQR = Q3 - Q1 QUARTILE.INC |
| Outlier fences | Below Q1 - 1.5 IQR or above Q3 + 1.5 IQR |
| Empirical rule | 68% within 1σ, 95% within 2σ, 99.7% within 3σ (normal data) |
| Chebyshev | At least 1 - 1/k² of data within k standard deviations (any shape) |
| Skewness sign | Mean > median: right-skewed. Mean < median: left-skewed. |
Probability rules
| Complement | P(not A) = 1 - P(A) |
| At least one | P(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, independent | P(A and B) = P(A) P(B) drill |
| Multiplication, general | P(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 test | A and B independent if P(A|B) = P(A) |
| Total probability | P(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 value | E(X) = Σ x P(x) drill |
| Variance of a discrete variable | Var(X) = Σ (x - μ)² P(x) |
| Odds | odds = p / (1 - p) |
Counting
| Factorial | n! = 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 principle | m 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 k | P(k) = C(n,k) pᵏ (1-p)ⁿ⁻ᵏ BINOM.DIST(k, n, p, FALSE) drill |
| Binomial, at most k | BINOM.DIST(k, n, p, TRUE) |
| Binomial, at least k | 1 - BINOM.DIST(k - 1, n, p, TRUE) drill |
| Binomial mean and SD | μ = np, σ = √[np(1-p)] drill |
| Poisson, exactly k | P(k) = e^(-λ) λᵏ / k! POISSON.DIST(k, λ, FALSE) drill |
| Poisson, at most k | POISSON.DIST(k, λ, TRUE) drill |
| Poisson mean and variance | μ = σ² = λ (scale λ to the time window asked) |
| Geometric | P(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
| Standardize | z = (x - μ) / σ |
| Below a value | P(X < x) = NORM.DIST(x, μ, σ, TRUE) or NORM.S.DIST(z, TRUE) |
| Above a value | P(X > x) = 1 - NORM.DIST(x, μ, σ, TRUE) drill |
| Between two values | NORM.DIST(b, μ, σ, TRUE) - NORM.DIST(a, μ, σ, TRUE) drill |
| Value at a percentile | x = NORM.INV(p, μ, σ) or x = μ + z σ drill |
| Common z values | 90%: 1.645 95%: 1.960 99%: 2.576 (two-sided) |
| Sampling distribution of the mean | μ_x̄ = μ, σ_x̄ = σ / √n, z = (x̄ - μ) / (σ/√n) drill |
| Central limit theorem | x̄ 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, σ known | x̄ ± z* σ/√n CONFIDENCE.NORM |
| Mean, σ unknown | x̄ ± t* s/√n, df = n - 1 CONFIDENCE.T, T.INV.2T(α, df) |
| Proportion | p̂ ± z* √[p̂(1-p̂)/n] |
| Difference of two means | (x̄₁ - x̄₂) ± t* √(s₁²/n₁ + s₂²/n₂) |
| Margin of error | E = z* σ/√n (half the width of the interval) |
| Sample size for a mean | n = (z* σ / E)² round up |
| Sample size for a proportion | n = p̂(1-p̂)(z*/E)² use 0.5 when unknown |
Hypothesis tests
| Steps | H₀ and H₁, α, test statistic, p-value (or critical value), decision, conclusion in words |
| One mean, σ known | z = (x̄ - μ₀) / (σ/√n) |
| One mean, σ unknown | t = (x̄ - μ₀) / (s/√n), df = n - 1 T.DIST.2T(|t|, df) |
| One proportion | z = (p̂ - p₀) / √[p₀(1-p₀)/n] |
| Two means (independent) | t = (x̄₁ - x̄₂) / √(s₁²/n₁ + s₂²/n₂) T.TEST(r1, r2, 2, 3) |
| Paired | t = d̄ / (s_d/√n) on the differences T.TEST(r1, r2, 2, 1) |
| p-value rule | Reject H₀ when p-value < α |
| Errors | Type 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 independence | E = (row total x column total) / n, df = (r-1)(c-1) |
| ANOVA | F = MS_between / MS_within, df = (k-1, n-k) |
Regression and correlation
| Correlation | r = Σ[(x - x̄)(y - ȳ)] / [(n-1) sₓ s_y] CORREL |
| Slope | b = r (s_y / sₓ) SLOPE |
| Intercept | a = ȳ - b x̄ INTERCEPT |
| Prediction | ŷ = a + b x FORECAST.LINEAR |
| Coefficient of determination | R² = r² (share of variation explained) RSQ |
| Residual | e = y - ŷ |
| Standard error of the estimate | s_e = √[ Σe² / (n - 2) ] STEYX |
| Test the slope | t = 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