Skip to content
p.mba

Type to search tools, guides, glossary terms, frameworks, formula sheets and pages.

Menu

Statistics & Analytics · Formula sheet

Statistics & Analytics Formula Sheet

Descriptives, probability, when to use normal/t/chi-square/F, confidence intervals, hypothesis tests, sample size and regression output, with Excel equivalents.

Prints in compact type with the site navigation removed.

A dense one-sheet for the core stats course. Each entry gives the formula, a one-line legend and a one-line “use when”. Run the numbers in the Stats toolkit; for expected-value trees see the Decision tree tool.

1. Descriptive statistics

Sample mean

xˉ=1n∑i=1nxi\bar{x} = \frac{1}{n}\sum_{i=1}^{n} x_i
  • Where: xᵢ = observation i, n = number of observations. Excel AVERAGE.
  • Use when: summarizing the center of roughly symmetric data; prefer the median (MEDIAN) when outliers or heavy skew are present.

Sample variance and standard deviation

s2=1n−1∑i=1n(xi−xˉ)2,s=s2s^2 = \frac{1}{n-1}\sum_{i=1}^{n}\left(x_i-\bar{x}\right)^2, \qquad s = \sqrt{s^2}
  • Where: n − 1 = degrees of freedom (one is used up estimating x̄). Excel VAR.S, STDEV.S.
  • Use when: measuring spread or volatility of a sample; s is in the same units as the data.

Coefficient of variation and z-score

CV=sxˉ,z=x−μσCV = \frac{s}{\bar{x}}, \qquad z = \frac{x-\mu}{\sigma}
  • Where: CV is unitless; z counts standard deviations from the mean. Excel STANDARDIZE(x, mean, sd).
  • Use when: comparing variability across series with different scales (CV) or locating one observation in a distribution (z).

Covariance and correlation

sxy=1n−1∑i=1n(xi−xˉ)(yi−yˉ),r=sxysx sys_{xy} = \frac{1}{n-1}\sum_{i=1}^{n}(x_i-\bar{x})(y_i-\bar{y}), \qquad r = \frac{s_{xy}}{s_x\, s_y}
  • Where: r lies between −1 and +1. Excel COVARIANCE.S, CORREL.
  • Use when: measuring linear co-movement; r near 0 does not rule out a non-linear relationship.

Mean and variance of a linear combination

E[aX+bY]=aE[X]+bE[Y],Var⁡(aX+bY)=a2σX2+b2σY2+2ab σXYE[aX+bY] = aE[X]+bE[Y], \qquad \operatorname{Var}(aX+bY) = a^2\sigma_X^2 + b^2\sigma_Y^2 + 2ab\,\sigma_{XY}
  • Where: a, b = constants (weights), σ_XY = covariance of X and Y (= ρσ_Xσ_Y).
  • Use when: combining random quantities, such as portfolio returns or total demand across two products.

2. Probability essentials

Expected value and variance of a discrete variable

E[X]=∑ixi pi,Var⁡(X)=∑ipi (xi−E[X])2=E[X2]−(E[X])2E[X] = \sum_i x_i\,p_i, \qquad \operatorname{Var}(X) = \sum_i p_i\,(x_i - E[X])^2 = E[X^2] - (E[X])^2
  • Where: pᵢ = probability of outcome xᵢ (probabilities sum to 1). Excel SUMPRODUCT(x, p).
  • Use when: valuing a gamble or decision branch; this is the roll-back step in a decision tree.

Bayes’ rule (Thomas Bayes, published 1763)

P(A∣B)=P(B∣A) P(A)P(B∣A) P(A)+P(B∣Ac) P(Ac)P(A \mid B) = \frac{P(B \mid A)\,P(A)}{P(B \mid A)\,P(A) + P(B \mid A^c)\,P(A^c)}
  • Where: P(A) = prior, P(B | A) = likelihood, P(A | B) = posterior, Aᶜ = “not A”.
  • Use when: updating a belief after a test result or signal (screening, fraud flags, market research readouts).

Binomial distribution

P(X=k)=(nk)pk(1−p)n−k,E[X]=np,Var⁡(X)=np(1−p)P(X=k) = \binom{n}{k}p^k(1-p)^{n-k}, \qquad E[X]=np, \qquad \operatorname{Var}(X)=np(1-p)
  • Where: n = trials, p = success probability per trial, k = number of successes. Excel BINOM.DIST(k, n, p, FALSE); use TRUE for P(X ≤ k).
  • Use when: counting yes/no outcomes across a fixed number of independent trials (conversions out of n visitors, defects in a batch).

Poisson distribution

P(X=k)=λke−λk!,E[X]=Var⁡(X)=λP(X=k) = \frac{\lambda^k e^{-\lambda}}{k!}, \qquad E[X] = \operatorname{Var}(X) = \lambda
  • Where: λ = average count per interval. Excel POISSON.DIST(k, λ, FALSE).
  • Use when: counting arrivals or events per unit of time or space (calls per hour, typos per page).

3. Which distribution, and when

Normal and the standard normal

X∼N(μ,σ2)  ⇒  Z=X−μσ∼N(0,1)X \sim N(\mu,\sigma^2) \;\Rightarrow\; Z = \frac{X-\mu}{\sigma} \sim N(0,1)
  • Where: Excel NORM.DIST(x, μ, σ, TRUE) gives P(X ≤ x); NORM.S.INV(p) gives the z with left-tail area p; NORM.INV(p, μ, σ) gives the x.
  • Use when: the variable is roughly bell-shaped, or you are working with a sample mean or proportion from a large sample (central limit theorem).

Standard error of the mean (central limit theorem)

SE(xˉ)=σn≈snSE(\bar{x}) = \frac{\sigma}{\sqrt{n}} \approx \frac{s}{\sqrt{n}}
  • Where: σ = population sd (use s when σ is unknown). Quadrupling n halves the SE.
  • Use when: describing how precisely a sample mean estimates μ; the sampling distribution of x̄ is approximately normal for moderately large n.

Student’s t (William S. Gosset, writing as “Student”, 1908)

t=xˉ−μs/n∼tn−1t = \frac{\bar{x}-\mu}{s/\sqrt{n}} \sim t_{n-1}
  • Where: df = n − 1. Excel T.INV.2T(α, df) gives the two-sided critical value; T.DIST.2T(ABS(t), df) gives the two-sided p-value.
  • Use when: inference on means with σ unknown (almost always in practice); t approaches z as df grows.

Chi-square statistic (Karl Pearson, 1900)

χ2=∑cells(O−E)2E,Eij=(rowi total)(colj total)grand total\chi^2 = \sum_{\text{cells}} \frac{(O-E)^2}{E}, \qquad E_{ij} = \frac{(\text{row}_i\ \text{total})(\text{col}_j\ \text{total})}{\text{grand total}}
  • Where: O = observed count, E = expected count under H₀. df = (rows − 1)(cols − 1) for independence; df = categories − 1 − (parameters estimated) for goodness of fit. Excel CHISQ.TEST(observed, expected) returns the p-value; CHISQ.DIST.RT(χ², df) also does.
  • Use when: testing whether two categorical variables are related (contingency table) or whether counts fit a hypothesized mix; a common rule of thumb asks for expected counts of at least 5 per cell.

F statistic

F=s12s22∼Fn1−1,  n2−1,FANOVA=MSBMSW=SSB/(k−1)SSW/(N−k)F = \frac{s_1^2}{s_2^2} \sim F_{n_1-1,\;n_2-1}, \qquad F_{\text{ANOVA}} = \frac{MSB}{MSW} = \frac{SSB/(k-1)}{SSW/(N-k)}
  • Where: MSB / MSW = mean square between / within groups, k = groups, N = total observations. Excel F.DIST.RT(F, df1, df2) for the right-tail p-value; F.TEST(range1, range2) for the two-tailed equal-variance test.
  • Use when: comparing two variances, comparing three or more group means (one-way ANOVA), or testing a regression’s overall fit (§6).

4. Confidence intervals

General shape: estimate ± (critical value) × (standard error).

Mean, σ known

xˉ±zα/2 σn\bar{x} \pm z_{\alpha/2}\,\frac{\sigma}{\sqrt{n}}
  • Where: z for 90 / 95 / 99% = 1.645 / 1.960 / 2.576. Excel CONFIDENCE.NORM(α, σ, n) returns the margin of error.
  • Use when: textbook settings where σ is given; otherwise use t.

Mean, σ unknown

xˉ±tα/2, n−1 sn\bar{x} \pm t_{\alpha/2,\,n-1}\,\frac{s}{\sqrt{n}}
  • Where: t critical value from T.INV.2T(α, n − 1). Excel CONFIDENCE.T(α, s, n) returns the margin of error.
  • Use when: estimating a population mean from sample data (the default case).

Proportion (Wald interval)

p^±zα/2p^(1−p^)n\hat{p} \pm z_{\alpha/2}\sqrt{\frac{\hat{p}(1-\hat{p})}{n}}
  • Where: p̂ = successes / n.
  • Use when: estimating a share (conversion rate, approval rate) with at least about 10 successes and 10 failures; for small samples use a Wilson interval instead.

Difference in means (unequal variances, Welch)

(xˉ1−xˉ2)±t∗s12n1+s22n2,df≈(s12n1+s22n2)2(s12/n1)2n1−1+(s22/n2)2n2−1(\bar{x}_1-\bar{x}_2) \pm t^{*}\sqrt{\frac{s_1^2}{n_1}+\frac{s_2^2}{n_2}}, \qquad df \approx \frac{\left(\frac{s_1^2}{n_1}+\frac{s_2^2}{n_2}\right)^2}{\frac{(s_1^2/n_1)^2}{n_1-1}+\frac{(s_2^2/n_2)^2}{n_2-1}}
  • Where: t* uses the Welch–Satterthwaite df (a conservative shortcut is the smaller of n₁ − 1 and n₂ − 1).
  • Use when: comparing two independent group means (region A vs region B) without assuming equal spread.

Difference in proportions

(p^1−p^2)±zα/2p^1(1−p^1)n1+p^2(1−p^2)n2(\hat{p}_1-\hat{p}_2) \pm z_{\alpha/2}\sqrt{\frac{\hat{p}_1(1-\hat{p}_1)}{n_1}+\frac{\hat{p}_2(1-\hat{p}_2)}{n_2}}
  • Where: unpooled SE (the pooled SE is for tests, §5).
  • Use when: sizing the lift in an A/B test; if the interval excludes 0 the difference is significant at that level.

5. Hypothesis tests

General shape: test statistic = (estimate − value under H₀) / SE. Reject H₀ when the p-value ≤ α (equivalently, when the statistic is beyond the critical value).

One-sample t-test

t=xˉ−μ0s/n,df=n−1t = \frac{\bar{x}-\mu_0}{s/\sqrt{n}}, \qquad df = n-1
  • Where: μ₀ = hypothesized mean.
  • Use when: checking a sample mean against a target or claim (average handle time vs a service standard).

Two-sample t-test (pooled, equal variances)

t=xˉ1−xˉ2sp1n1+1n2,sp2=(n1−1)s12+(n2−1)s22n1+n2−2t = \frac{\bar{x}_1-\bar{x}_2}{s_p\sqrt{\frac{1}{n_1}+\frac{1}{n_2}}}, \qquad s_p^2 = \frac{(n_1-1)s_1^2+(n_2-1)s_2^2}{n_1+n_2-2}
  • Where: df = n₁ + n₂ − 2. Excel T.TEST(r1, r2, tails, type) returns the p-value: type 1 = paired, 2 = equal variance, 3 = unequal variance (Welch).
  • Use when: two independent groups with similar spread; when in doubt use Welch (type 3), which is the safer default.

Paired t-test

t=dˉsd/n,df=n−1t = \frac{\bar{d}}{s_d/\sqrt{n}}, \qquad df = n-1
  • Where: dᵢ = before − after for the same unit, d̄ and s_d = mean and sd of the differences.
  • Use when: the same subjects are measured twice (before/after training, same store in two periods).

One-proportion z-test

z=p^−p0p0(1−p0)/nz = \frac{\hat{p}-p_0}{\sqrt{p_0(1-p_0)/n}}
  • Where: p₀ = hypothesized proportion (the SE uses p₀, not p̂).
  • Use when: testing a share against a benchmark (is defect rate above a stated level?).

Two-proportion z-test (pooled)

z=p^1−p^2pˉ(1−pˉ)(1n1+1n2),pˉ=x1+x2n1+n2z = \frac{\hat{p}_1-\hat{p}_2}{\sqrt{\bar{p}(1-\bar{p})\left(\frac{1}{n_1}+\frac{1}{n_2}\right)}}, \qquad \bar{p} = \frac{x_1+x_2}{n_1+n_2}
  • Where: x₁, x₂ = success counts; p̄ = pooled proportion under H₀: p₁ = p₂.
  • Use when: A/B tests on conversion or click-through rates.

Errors and power

α=P(reject H0∣H0 true),β=P(fail to reject H0∣H0 false),power=1−β\alpha = P(\text{reject } H_0 \mid H_0 \text{ true}), \quad \beta = P(\text{fail to reject } H_0 \mid H_0 \text{ false}), \quad \text{power} = 1-\beta
  • Where: two-tailed p-value = 2 × one-tailed p-value for symmetric statistics (z, t).
  • Use when: choosing α and sample size; a “not significant” result with low power is weak evidence of no effect.

6. Sample size

Always round up to the next whole unit.

Estimate a mean to within ±E

n=(zα/2 σE)2n = \left(\frac{z_{\alpha/2}\,\sigma}{E}\right)^2
  • Where: E = desired margin of error (same units as the data), σ = planning value for the sd (from a pilot or past data).
  • Use when: budgeting a survey or measurement study before collecting data.

Estimate a proportion to within ±E

n=zα/22 p(1−p)E2n = \frac{z_{\alpha/2}^2\,p(1-p)}{E^2}
  • Where: use p = 0.5 when you have no prior estimate (maximizes p(1 − p), so it is conservative).
  • Use when: sizing a poll or a conversion-rate estimate.

Compare two means (per group, two-sided)

nper group=2 (zα/2+zβ)2 σ2Δ2n_{\text{per group}} = \frac{2\,(z_{\alpha/2}+z_{\beta})^2\,\sigma^2}{\Delta^2}
  • Where: Δ = smallest difference worth detecting, z_β = NORM.S.INV(power) (0.842 for 80% power).
  • Use when: planning an experiment with a continuous outcome (basket size, time on task).

Compare two proportions (per group, approximate)

nper group≈(zα/2+zβ)2[p1(1−p1)+p2(1−p2)](p1−p2)2n_{\text{per group}} \approx \frac{(z_{\alpha/2}+z_{\beta})^2\left[p_1(1-p_1)+p_2(1-p_2)\right]}{(p_1-p_2)^2}
  • Where: p₁ = baseline rate, p₂ = rate you want to be able to detect.
  • Use when: planning an A/B test; halving the detectable lift roughly quadruples the required sample.

Finite population correction

nadj=n1+n−1Nn_{\text{adj}} = \frac{n}{1+\frac{n-1}{N}}
  • Where: N = population size, n = size from the formulas above.
  • Use when: the sample would be a noticeable fraction (roughly 5% or more) of a small, finite population.

7. Regression

Simple linear regression (least squares)

y^=b0+b1x,b1=sxysx2=r sysx,b0=yˉ−b1xˉ\hat{y} = b_0 + b_1 x, \qquad b_1 = \frac{s_{xy}}{s_x^2} = r\,\frac{s_y}{s_x}, \qquad b_0 = \bar{y} - b_1\bar{x}
  • Where: b₁ = change in predicted y per one-unit change in x. Excel SLOPE, INTERCEPT, LINEST, or the Analysis ToolPak’s Regression.
  • Use when: estimating a linear relationship between one predictor and an outcome.

Sums of squares and R²

SST=SSR+SSE,R2=SSRSST=1−SSESSTSST = SSR + SSE, \qquad R^2 = \frac{SSR}{SST} = 1-\frac{SSE}{SST}
  • Where: SST = total variation in y, SSR = explained by the model, SSE = residual. In simple regression R² = r². Excel RSQ.
  • Use when: describing the share of variation in y explained; a high R² does not establish causation or a correct model.

Adjusted R² and standard error of the regression

Rˉ2=1−(1−R2)n−1n−k−1,se=SSEn−k−1\bar{R}^2 = 1-(1-R^2)\frac{n-1}{n-k-1}, \qquad s_e = \sqrt{\frac{SSE}{n-k-1}}
  • Where: k = number of predictors (not counting the intercept). Excel STEYX gives s_e for simple regression.
  • Use when: comparing models with different numbers of predictors (adjusted R²) or sizing typical prediction error (s_e).

Coefficient t-test and confidence interval

tj=bjSE(bj),bj±tα/2, n−k−1 SE(bj)t_j = \frac{b_j}{SE(b_j)}, \qquad b_j \pm t_{\alpha/2,\,n-k-1}\,SE(b_j)
  • Where: df = n − k − 1; the output’s p-value tests H₀: βⱼ = 0.
  • Use when: deciding whether a predictor adds explanatory power holding the others constant.

Overall F-test

F=SSR/kSSE/(n−k−1)=R2/k(1−R2)/(n−k−1)F = \frac{SSR/k}{SSE/(n-k-1)} = \frac{R^2/k}{(1-R^2)/(n-k-1)}
  • Where: df = (k, n − k − 1).
  • Use when: testing whether the predictors jointly explain anything (H₀: all slopes = 0).

Variance inflation factor

VIFj=11−Rj2VIF_j = \frac{1}{1-R_j^2}
  • Where: R_j² = R² from regressing predictor j on the other predictors.
  • Use when: diagnosing multicollinearity; large VIFs inflate standard errors and make individual coefficients unstable.

Interpreting coefficients by functional form

ModelInterpretation of b₁
y on x (level–level)+1 unit of x changes y by b₁ units
ln y on x (log–level)+1 unit of x changes y by about 100 × b₁ percent (exactly 100 × (e^b₁ − 1))
y on ln x (level–log)+1% in x changes y by about b₁ / 100 units
ln y on ln x (log–log)b₁ is an elasticity: +1% in x changes y by about b₁ percent
dummy D (0/1)b₁ = shift in y for the D = 1 group vs the base group, holding other variables fixed
interaction x × Db = how much the slope on x differs for the D = 1 group

Related sheets: Operations (queueing and safety stock use the normal distribution), Marketing (conjoint and A/B metrics) and Investments (portfolio variance). For structured problem solving with data, see hypothesis-driven problem solving.