Cheat sheet

Statistics & modelling for analyst interviews

Companion to the 162-question statistics bank. Definitions first, formulas second, interview language throughout.

Central tendency

DefinitionUse whenExcel
Meansum ÷ nSymmetric numbersAVERAGE
Medianmiddle of sorted data (even n: average the 2 middles)Skewed data or outliers (salaries, prices)MEDIAN
Modemost frequentCategoriesMODE.SNGL

Right skew: mode < median < mean. Left skew: the reverse. Pair the mean with the standard deviation and the median with the IQR. [OpenStax 2.6]

Dispersion

Rangemax − min · easy, but driven by two points
IQRQ3 − Q1 · spread of the middle 50% · resistant to outliers
Variancemean of squared deviations · sample uses n − 1
Standard deviation√variance · same units as the data
z-score(x − μ)/σ · mean 0, SD 1 · beyond ±3 is unusual
CVSD/mean · compares relative spread across different units
Outlier rulebelow Q1 − 1.5×IQR or above Q3 + 1.5×IQR

Shift all values by c → SD unchanged. Multiply by c → SD × |c|, variance × c². Chebyshev: at least 1 − 1/k² within k SD (75% at k = 2). Normal: 68 / 95 / 99.7.

Probability

Rules

P(not A) = 1 − P(A)
P(A∪B) = P(A) + P(B) − P(A∩B)
P(A|B) = P(A∩B)/P(B)
Independent: P(A∩B) = P(A)P(B)
Mutually exclusive: P(A∩B) = 0

Bayes

P(A|B) = P(B|A)P(A) / P(B)
Base rates dominate. A 99% sensitive test for a 1% condition still gives mostly false positives.

Counting

nPr = n!/(n−r)! · nCr = n!/[r!(n−r)!]
At least one = 1 − P(none).
Two children, at least one boy → P(both boys) = 1/3.

Expectation

E(aX + b) = aE(X) + b · E(X + Y) = E(X) + E(Y)
Var(aX) = a²Var(X) · independent: Var(X+Y) = Var(X) + Var(Y).

Distributions

DistributionUse forMean · variance
Bernoulli(p)One yes/no trialp · p(1 − p)
Binomial(n, p)Count of successes in n independent trialsnp · np(1 − p)
Poisson(λ)Count of events per unit time/areaλ · λ
Normal(μ, σ)Symmetric continuous data; sample means via CLTμ · σ²
Uniform(a, b)Equally likely values in an interval(a+b)/2 · (b−a)²/12
Exponential(λ)Waiting time between Poisson events1/λ · 1/λ²

Standard normal: P(Z < 0) = 0.5 · P(|Z| < 1.96) = 0.95 · P(Z > 1.645) ≈ 0.05 (one tail).

Sampling & the CLT

Standard error

SE = σ/√n. It measures the precision of a sample estimate. Quadrupling n halves the margin of error.

Central Limit Theorem

For large n, the sampling distribution of the mean is approximately normal and centred at μ, whatever the population shape.

95% CI (known σ)

x̄ ± 1.96 × σ/√n. The procedure captures μ 95% of the time; this interval either does or does not.

Bias vs variance

Random sampling reduces bias. Increasing n reduces variance/SE. A bigger biased sample is still biased.

Hypothesis testing

H₀ trueH₀ false
Reject H₀Type I · false positive · αCorrect · power = 1 − β
Fail to reject H₀Correct · 1 − αType II · false negative · β

[OpenStax 9.2]

Which test?

QuestionTest
One mean vs a value, σ unknownOne-sample t-test
Two independent group meansIndependent two-sample t-test
Before/after on the same unitsPaired t-test
Three or more group meansOne-way ANOVA (then post-hoc)
Association between two categorical variablesChi-square test
Non-normal two-group comparisonMann–Whitney U

Correlation & regression

Correlation

r ∈ [−1, 1], unitless, measures linear association. r = 0 ≠ no relationship. Sensitive to outliers. Spearman for monotonic/ordinal.

Regression

y = a + bx. Slope = change in y per 1-unit change in x. Residual = actual − predicted. OLS minimises the sum of squared residuals.

R²

Proportion of variance in y explained. In simple regression R² = r². Adding predictors never lowers R², so use adjusted R² to compare models.

Watch for

Extrapolation · influential points · confounding · regression to the mean · Anscombe's quartet (same stats, different plots).

Multicollinearity

What · why

Predictors correlated with each other (age and experience). It gives unstable coefficients and inflated standard errors. Prediction is often still OK.

Detect · fix

Correlation matrix · VIF = 1/(1 − R²ⱼ): 1 none, >4–5 investigate, >10 serious. Fix: drop, combine/PCA, ridge. Dummy trap: use k − 1 dummies.

[Penn State STAT 462] · Lessons: 6 · 7 · 8

Business-stat traps

Simpson's paradoxA trend in every subgroup reverses when the groups are pooled.
Base rate fallacyIgnoring prevalence. Rare events produce many false positives even with accurate tests.
Survivorship biasAnalysing only the units that survived; failures are missing.
ConfoundingA third variable affects both treatment and outcome, creating a spurious link.
Selection biasThe sample is not representative because entry is related to the variables studied.
Data leakageTraining data contains information not available at prediction time; test scores look great, production fails.
Average of ratiosWeight rates by their denominators; a simple mean of store conversion rates misleads.
Novelty effectAn A/B lift that fades once users get used to the change.