Statistics Formulas Cheat Sheet
Statistics Formulas Cheat Sheet
1️⃣ Z-Test
One-sample: Z = (X̄ - μ0) / (σ / √n) Variables: X̄ = sample mean, μ0 = hypothesized mean, σ = population
std, n = sample size Decision: |Z| > zα/2 (two-tailed), Z > zα (right), Z < -zα (left)
2️⃣ T-Test
One-sample: t = (X̄ - μ0) / (s / √n), df = n-1 s = sample std
Two-sample equal var: t = (X̄1 - X̄2) / (sp √(1/n1 + 1/n2)), sp² = ((n1-1)s1² + (n2-1)s2²)/(n1+n2-2)
Test of independence: χ² = Σ Σ (Oij - Eij)² / Eij, Eij = (row_i total * col_j total)/grand total, df = (rows-1)
(cols-1)
4️⃣ ANOVA
Grand mean: X̄ = ΣΣ Xij / N SSB = Σ ni (X̄i - X̄)² SSW = ΣΣ (Xij - X̄i)² MSB = SSB / (k-1), MSW = SSW / (N-k) F =
MSB / MSW Variables: k = #groups, ni = group size, Xij = observation, X̄i = group mean, X̄ = grand mean
1
6️⃣ Distributions
Discrete
Bernoulli(p): PMF: p^x (1-p)^(1-x), CDF: 0 (x<0), 1-p (0<=x<1), 1 (x>=1) Binomial(n,p): PMF: C(n,k)p^k(1-
p)^(n-k), CDF: Σ(i=0 to k) PMF(i) Geometric(p): PMF: (1-p)^(k-1)p, CDF: 1-(1-p)^k Poisson(λ): PMF: e^-λ
λ^k/k!, CDF: Σ(i=0 to k) PMF(i)
Continuous
Uniform(a,b): PDF: 1/(b-a), CDF: (x-a)/(b-a) Normal(μ,σ²): PDF: 1/√(2πσ²) e^(-(x-μ)²/(2σ²)), CDF:
0.5(1+erf((x-μ)/(σ√2))) Exponential(λ): PDF: λ e^-λx, CDF: 1-e^-λx Gamma(k,λ): PDF: λ^k / Γ(k) x^(k-1)
e^-λx, CDF: γ(k, λx)/Γ(k) Beta(α,β): PDF: 1/B(α,β) x^(α-1)(1-x)^(β-1), CDF: I_x(α,β) Chi-Square(k): PDF: 1/
(2^(k/2)Γ(k/2)) x^(k/2-1) e^-x/2, CDF: γ(k/2,x/2)/Γ(k/2) Student t(ν): PDF: Γ((ν+1)/2)/√(νπ)Γ(ν/2) (1 + x²/
ν)^(-(ν+1)/2) F(d1,d2): PDF: √((d1 x)^d1 d2^d2 / (d1 x + d2)^(d1+d2)) / (x B(d1/2,d2/2))
ANOVA is preferred over a two-sample t-test when comparing means across more than two groups because it reduces the risk of Type I error that comes with performing multiple t-tests. ANOVA evaluates whether the group means differ significantly by analyzing variance within and between groups, using F-statistic .
Assuming equal variances impacts the pooled variance calculation (sp²), simplifying the t-test formula for better power against equal variance alternatives. Violations can inflate Type I error rates. This assumption is tested using the F-test or Levene's test, validating the use of a pooled t-test or suggesting Welch's t-test, which adjusts for unequal variances .
The Central Limit Theorem justifies using the normal distribution for approximating the sampling distribution of the sample mean provided the sample size is sufficiently large (usually n > 30) or when the underlying population distribution is normal. This approximation holds regardless of population distribution shape, allowing for normal-based inference on sample means .
Degrees of freedom in a chi-square test for goodness-of-fit are calculated as the number of categories minus one (df = k-1). This determines the shape of the chi-square distribution against which the test statistic is compared. It accounts for the number of constraints or fixed parameters in the analysis, influencing the threshold for statistical significance .
Welch's t-test adjusts for unequal variances by not pooling them but rather considering separate sample variances in the test statistic calculation (t = (X̄ 1 - X̄ 2) / √(s1²/n1 + s2²/n2)), and further adjusts degrees of freedom via the Welch-Satterthwaite equation, minimizing Type I error under variance heterogeneity .
The Poisson distribution models the number of events in a fixed interval, appropriate for rare events, and uses the parameter λ (average rate). In contrast, the Binomial distribution models the number of successes in a fixed number of trials with a set probability of success in each trial (parameters n and p). Poisson is often used when the number of trials n is large and the probability p is small, whereas Binomial is used when these are well-defined .
Testing for independence in a chi-square test is crucial as it determines if two categorical variables are associated. Independence implies expected frequencies (Eij) calculated as the product of marginal totals divided by grand total (Eij = (row_i * col_j) / grand total). Significant deviation from observed values suggests association between variables .
In ANOVA, the F-distribution represents the ratio of variance estimates: between-group variance (MSB) and within-group variance (MSW). The calculated F-statistic is compared against critical values from the F-distribution to determine significance. A large F-value indicates greater variance between groups than within, suggesting differing group means and potential significance .
The Z-test is used when population variance is known or sample size is large, assuming normal population, while the T-test applies to smaller samples with unknown population variance, using sample standard deviation. T-test accounts for additional variability and degrees of freedom (df = n-1), crucial for smaller n scenarios .
In a two-sample z-test, the test statistic is calculated as Z = (X̄ 1 - X̄ 2) / √(σ1²/n1 + σ2²/n2), assuming known population variances, while in a t-test with equal variances, the test statistic is t = (X̄ 1 - X̄ 2) / (sp √(1/n1 + 1/n2)), using a pooled sample variance (sp).