1/67
Looks like no tags are added yet.
Sample mean
x̄ = (1/n) Σ xᵢ
Mean from a frequency table
x̄ = (1/n) Σ fᵢxᵢ, where n = Σ fᵢ (total observations, not number of rows)
Geometric mean
x* = (x₁ × x₂ × … × xₙ)^(1/n). Use when data spans orders of magnitude
Median (data)
Sort first. n odd: the ((n+1)/2)-th value. n even: average of the (n/2)-th and (n/2 + 1)-th values. Robust to outliers
Mode (data)
Most frequent value. Can be none, one (unimodal), two (bimodal) or many
Range
x_max − x_min. Very sensitive to outliers
Percentile – course method
Sort data. Give point i the value yᵢ = (i − 0.5)/n. Find j with yⱼ < p/100 ≤ yⱼ₊₁. q_p = average of x₍ⱼ₎ and x₍ⱼ₊₁₎. If p/100 hits a yᵢ exactly, take that point
Percentile – index method
k = (p/100)(n + 1) = position in sorted list. Between two positions → average the two values. Whole number → take that value
Quartiles and IQR
Q1 = q25, Q2 = q50 = median, Q3 = q75. IQR = Q3 − Q1 (robust to outliers)
Box plot
5 numbers: min, Q1, median, Q3, max. Box from Q1 to Q3, line at median, whiskers to min and max
Empirical CDF
F(x) = j/n for x₍ⱼ₎ ≤ x < x₍ⱼ₊₁₎; 0 below the min, 1 from the max. Step function, jump 1/n per point (k/n for k repeats)
Biased variance σ² (divide by n)
σ² = (1/n) Σ (xᵢ − x̄)². Calculator σx
Unbiased (sample) variance s² (divide by n − 1)
s² = 1/(n − 1) Σ (xᵢ − x̄)². Standard deviation s = √s². Use this one. Units². Calculator sx
Coefficient of variation
v = s / x̄. No units. Compares spread of datasets on different scales
Mean absolute deviation
d = (1/n) Σ |xᵢ − x̄|. More robust than s
Skewness g₁ – biased (data)
g₁ = [(1/n) Σ (xᵢ − x̄)³] / σ³. Uses the biased σ (divide by n). No units
Skewness ĝ₁ – unbiased (data)
ĝ₁ (“g-hat”) = √(n(n − 1)) / (n − 2) × g₁. Correction factor applied to the biased g₁
Sign of skewness
Positive (right tail): mode < median < mean. Zero: all equal. Negative (left tail): mode > median > mean
Covariance
cov = 1/(n − 1) Σ (xᵢ − x̄)(yᵢ − ȳ). Units²
Correlation coefficient
r = cov / (sₓ s_y), −1 ≤ r ≤ 1. ±1 perfect linear, 0 no linear relation. Only detects linear relations. No units
Axioms of probability
P(Ω) = 1. P(∅) = 0. If A ∩ B = ∅ then P(A ∪ B) = P(A) + P(B)
Classical probability
P(A) = number of ways A occurs / total number of equally likely outcomes
Complement rule
P(Ā) = 1 − P(A)
De Morgan
not (A or B) = (not A) and (not B): complement of A ∪ B = Ā ∩ B̄. Use for “neither … nor …”
Addition rule
P(A ∪ B) = P(A) + P(B) − P(A ∩ B). Drop the last term only if mutually exclusive
Conditional probability
P(A|B) = P(A ∩ B) / P(B). Reduced sample space: B has happened
Multiplication rule
P(A ∩ B) = P(A|B) P(B) = P(B|A) P(A)
Independent events
One doesn't affect the other: P(A|B) = P(A), so P(A ∩ B) = P(A) P(B)
Mutually exclusive events
Can't happen together: P(A ∩ B) = 0. Exclusive ≠ independent (exclusive events are dependent)
Chain rule
P(A ∩ B ∩ C) = P(A | B ∩ C) P(B | C) P(C)
Total probability
P(B) = Σ P(B|Aᵢ) P(Aᵢ), where A₁…Aₖ partition Ω (no overlap, none empty, cover everything)
Bayes' theorem
P(Aⱼ|B) = P(B|Aⱼ) P(Aⱼ) / Σ P(B|Aᵢ) P(Aᵢ). P(Aⱼ) = prior, P(Aⱼ|B) = posterior. Table: prior × likelihood = joint; posterior = joint / sum
At least one
P(at least one) = 1 − P(none) = 1 − (1 − p)ⁿ
Return period
1 in T-year event: p = 1/T per year. P(at least one in n years) = 1 − (1 − 1/T)ⁿ
Permutations with repetition
Order matters, repeats allowed: nᵏ (or m₁ × m₂ × …). E.g. 4-digit PIN = 10⁴
Permutations
Order matters, no repeats: ₙPₖ = n! / (n − k)!. E.g. podium of 3 from 8 = 336
Combinations
Order doesn't matter, no repeats: ₙCₖ = n! / ((n − k)! k!) = ₙPₖ / k!. E.g. lottery 6 from 49
PMF
p(x) = P(X = x). Valid if p(x) ≥ 0 and Σ p(x) = 1
f(x) = dF/dx. Valid if f ≥ 0 and ∫ f dx = 1. P(a ≤ X ≤ b) = ∫ₐᵇ f(x) dx. f can exceed 1; only area is probability
CDF
F(x) = P(X ≤ x). Discrete: Σ p(k) for k ≤ x. Continuous: ∫ f(t) dt from −∞ to x. Goes 0 → 1, never decreases. Write 0 below range, 1 above
Probability from CDF
P(a < X ≤ b) = F(b) − F(a). Continuous: P(X = a) = 0, so ≤ and < are the same
Quantile function
q_p(X) = u ⇔ F(u) = p. Invert the CDF. E.g. 90th percentile: solve F(u) = 0.9
Median (random variable)
Continuous: solve F(m) = 0.5. Discrete: smallest x with F(x) ≥ 0.5. Symmetric PDF → centre of symmetry
Mode (random variable)
x that maximises p(x) or f(x) (f′(x) = 0 or an endpoint)
Expectation
E(X) = Σ x p(x) (discrete) or ∫ x f(x) dx (continuous)
Expectation of a function
E(h(X)) = Σ h(x) p(x) or ∫ h(x) f(x) dx. E(h(X)) ≠ h(E(X)) unless h is linear
Moments
m-th moment: E(Xᵐ). m-th centred moment: E((X − μ)ᵐ)
Variance (random variable)
Var(X) = E((X − μ)²) = E(X²) − μ². σ = √Var(X)
Skewness (random variable)
g₁ = E((X − μ)³) / σ³
Third centred moment shortcut
E((X − μ)³) = E(X³) − 3μE(X²) + 2μ³
Rules for E
E(a) = a. E(a + bX) = a + bE(X). E(X ± Y) = E(X) ± E(Y)
Rules for Var
Var(a) = 0. Var(a + bX) = b² Var(X). Var(X ± Y) = Var(X) + Var(Y) only if independent (plus even for minus)
E[X(X − 1)] trick
E(X²) = E[X(X − 1)] + E(X), so Var(X) = E[X(X − 1)] + E(X) − E(X)². Use when the PMF has k!
Function of a discrete RV
Y = h(X), h invertible: p_Y(y) = p_X(h⁻¹(y)). Probabilities carry over unchanged
Function of a continuous RV
Y = h(X), h monotonic: f_Y(y) = f_X(h⁻¹(y)) × |dx/dy|. Steps: x = h⁻¹(y), find dx/dy, substitute, transform the range, check ∫ f_Y = 1
Bernoulli distribution
X ~ B(1, p), one trial. P(X = k) = pᵏ(1 − p)¹⁻ᵏ, k ∈ {0, 1}. E = p. Var = p(1 − p)
Binomial distribution
X ~ B(n, p), number of successes in n independent trials with same p. P(X = k) = C(n, k) pᵏ (1 − p)ⁿ⁻ᵏ, k = 0…n. E = np. Var = np(1 − p)
Poisson distribution
X ~ Pois(μ), number of events in an interval at a mean rate. P(X = k) = μᵏ e^(−μ) / k!, k = 0, 1, 2, … E = μ. Var = μ
Poisson tips
μ = rate × interval (convert units first). P(0) = e^(−μ). P(k) = P(k − 1) × μ/k. Mean = variance
Poisson approximation to binomial
n large, p small: B(n, p) ≈ Pois(μ) with μ = np. Limit of binomial as n → ∞, p → 0, np = μ
Geometric distribution
X ~ Geom(p), failures before first success. P(X = k) = p(1 − p)ᵏ, k = 0, 1, 2, … E = (1 − p)/p. Var = (1 − p)/p²
Geometric tips
“First time in year n” → k = n − 1. P(X ≥ k) = (1 − p)ᵏ. P(X > m) = (1 − p)^(m + 1). PMF always decreasing
Memoryless property
Geometric: P(M > a + b | M > a) = P(M ≥ b). An event is never “due”
Design “x% of the time”
Percentile: smallest k with CDF F(k) ≥ x%. Round up. Never design for the mean
Binomial theorem
Σ C(n, k) pᵏ qⁿ⁻ᵏ = (p + q)ⁿ (k = 0…n). With q = 1 − p this is 1
Exponential series
eˣ = Σ xᵏ / k! = 1 + x + x²/2! + x³/3! + … (k = 0…∞)
Geometric series
Σ qᵏ = 1/(1 − q) (k ≥ 0). Σ k qᵏ⁻¹ = 1/(1 − q)² (k ≥ 1). Σ k(k − 1) qᵏ⁻² = 2/(1 − q)³ (k ≥ 2). For |q| < 1
Proof key moves
Binomial: X = sum of n Bernoullis, or k C(n, k) = n C(n − 1, k − 1). Poisson: k/k! = 1/(k − 1)!, pull out μ. Geometric: pull out q, differentiate the series. Never take k out of Σ