ENGIMY.IO - CHEATSHEET
PROB STATS × QUICK REFERENCE
REFERENCE v1.0

Probability & Statistics Quick Reference

Everything you need day‑to‑day – probability, distributions, and statistical inference.

Probability Basics

Definitions
  • Experiment – any procedure with uncertain outcome
  • Sample Space (S) – set of all possible outcomes
  • Event (E) – subset of sample space
  • Probability – P(E) = |E| / |S| (equally likely outcomes)
Axioms of Probability
  • 0 ≤ P(E) ≤ 1
  • P(S) = 1
  • If E₁, E₂, ... are mutually exclusive: P(∪Eᵢ) = ΣP(Eᵢ)

Key Probability Rules

  • Complement: P(E') = 1 - P(E)
  • Union (Addition Rule): P(A ∪ B) = P(A) + P(B) - P(A ∩ B)
  • Intersection (Multiplication Rule): P(A ∩ B) = P(A) · P(B) if independent
  • Conditional Probability: P(A|B) = P(A ∩ B) / P(B), P(B) > 0
  • Bayes' Theorem: P(A|B) = P(B|A) · P(A) / P(B)
  • Law of Total Probability: P(B) = Σᵢ P(B|Aᵢ) · P(Aᵢ)

Bayes' Theorem (Extended)

P(A|B) = P(B|A) · P(A) / (P(B|A)·P(A) + P(B|A')·P(A'))

Random Variables

Discrete Random Variable
  • Finite or countable outcomes
  • PMF: P(X = x)
  • Σ P(X = x) = 1
  • E[X] = Σ x · P(X = x)
  • Var(X) = Σ (x - μ)² · P(X = x)
Continuous Random Variable
  • Infinite outcomes (interval)
  • PDF: f(x), f(x) ≥ 0, ∫ f(x) dx = 1
  • CDF: F(x) = P(X ≤ x)
  • E[X] = ∫ x · f(x) dx
  • Var(X) = ∫ (x - μ)² · f(x) dx

Expectation & Variance Properties

  • E[aX + b] = aE[X] + b
  • Var(aX + b) = a² Var(X)
  • E[X + Y] = E[X] + E[Y] (always)
  • Var(X + Y) = Var(X) + Var(Y) + 2Cov(X,Y)
  • If independent: Var(X + Y) = Var(X) + Var(Y)
  • E[XY] = E[X]E[Y] if independent

Common Probability Distributions

Bernoulli

  • X ~ Bern(p), p ∈ [0,1]
  • P(X=1) = p, P(X=0) = 1-p
  • E[X] = p
  • Var(X) = p(1-p)
  • Use: Single trial (success/failure)

Binomial

  • X ~ Bin(n, p)
  • P(X = k) = C(n,k) pᵏ (1-p)ⁿ⁻ᵏ
  • E[X] = np
  • Var(X) = np(1-p)
  • Use: Number of successes in n trials

Poisson

  • X ~ Poisson(λ), λ > 0
  • P(X = k) = (e⁻λ · λᵏ) / k!
  • E[X] = λ
  • Var(X) = λ
  • Use: Count events in interval

Geometric

  • X ~ Geo(p), p ∈ [0,1]
  • P(X = k) = (1-p)ᵏ⁻¹ · p
  • E[X] = 1/p
  • Var(X) = (1-p) / p²
  • Use: Number of trials until first success

Uniform (Continuous)

  • X ~ U(a, b)
  • f(x) = 1/(b-a), x ∈ [a,b]
  • E[X] = (a+b)/2
  • Var(X) = (b-a)²/12
  • Use: Equal likelihood over interval

Normal (Gaussian)

  • X ~ N(μ, σ²)
  • f(x) = 1/(σ√2π) · e⁻(x-μ)²/(2σ²)
  • E[X] = μ
  • Var(X) = σ²
  • 68‑95‑99.7 Rule: μ±σ (68%), ±2σ (95%), ±3σ (99.7%)
  • Z‑score: Z = (X - μ)/σ

Exponential

  • X ~ Exp(λ), λ > 0
  • f(x) = λ·e⁻λˣ, x ≥ 0
  • E[X] = 1/λ
  • Var(X) = 1/λ²
  • Memoryless: P(X > s+t | X > s) = P(X > t)
  • Use: Time between events

Beta

  • X ~ Beta(α, β)
  • f(x) = (xᵅ⁻¹ (1-x)ᵝ⁻¹) / B(α, β)
  • E[X] = α/(α+β)
  • Var(X) = αβ / ((α+β)²(α+β+1))
  • Use: Probabilities (0-1)

Normal Table (Z‑Scores)

z 0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09
0.00.50000.50400.50800.51200.51600.51990.52390.52790.53190.5359
0.50.69150.69500.69850.70190.70540.70880.71230.71570.71900.7224
1.00.84130.84380.84610.84850.85080.85310.85540.85770.85990.8621
1.50.93320.93450.93570.93700.93820.93940.94060.94180.94290.9441
2.00.97720.97780.97830.97880.97930.97980.98030.98080.98120.9817
2.50.99380.99400.99410.99430.99450.99460.99480.99490.99510.9952
3.00.99870.99870.99870.99880.99880.99890.99890.99890.99900.9990

Values: P(Z ≤ z). For z > 3, use 0.9999. For negative z, use 1 - P(Z ≤ |z|).

Descriptive Statistics

Measures of Central Tendency
  • Mean (μ): Σxᵢ / n
  • Median: Middle value when sorted
  • Mode: Most frequent value
  • Robust: Median is robust to outliers
Measures of Dispersion
  • Variance (σ²): Σ(xᵢ - μ)² / n
  • Sample Variance (s²): Σ(xᵢ - x̄)² / (n-1)
  • Standard Deviation (σ): √σ²
  • IQR: Q3 - Q1
  • Range: Max - Min
Measures of Shape
  • Skewness: Symmetry of distribution
  • Positive Skew: Long right tail
  • Negative Skew: Long left tail
  • Kurtosis: Tail heaviness
Percentiles & Quartiles
  • Q1: 25th percentile
  • Q2: 50th percentile (median)
  • Q3: 75th percentile
  • Pₖ: Value below which k% of data falls

Inferential Statistics

Confidence Intervals

// For mean (known σ)
CI = x̄ ± z* · (σ / √n)

// For mean (unknown σ, t‑distribution)
CI = x̄ ± t* · (s / √n)

// For proportion
CI = p̂ ± z* · √(p̂(1-p̂) / n)

// Common z* values
90% CI: z* = 1.645
95% CI: z* = 1.96
99% CI: z* = 2.576

Hypothesis Testing

Steps
  • State H₀ (null) and H₁ (alternative)
  • Choose significance level (α = 0.05)
  • Compute test statistic
  • Find p‑value or critical value
  • Reject H₀ if p < α
Common Tests
  • Z‑test – known σ, large n
  • t‑test – unknown σ, small n
  • Chi‑square – categorical data
  • ANOVA – compare multiple means

Test Statistics

  • One‑sample Z: z = (x̄ - μ₀) / (σ / √n)
  • One‑sample t: t = (x̄ - μ₀) / (s / √n), df = n-1
  • Two‑sample t: t = (x̄₁ - x̄₂) / √(s₁²/n₁ + s₂²/n₂)
  • Paired t: t = d̄ / (s_d / √n)
  • Proportion Z: z = (p̂ - p₀) / √(p₀(1-p₀) / n)

p‑value Interpretation

  • p < 0.01 – strong evidence against H₀
  • 0.01 < p < 0.05 – moderate evidence
  • 0.05 < p < 0.10 – weak evidence
  • p > 0.10 – insufficient evidence

Correlation & Regression

Correlation Coefficient
  • r ∈ [-1, 1]
  • r = 1: perfect positive
  • r = -1: perfect negative
  • r = 0: no linear relationship
  • Formula: r = Σ((xᵢ - x̄)(yᵢ - ȳ)) / √(Σ(xᵢ - x̄)² Σ(yᵢ - ȳ)²)
Simple Linear Regression
  • y = β₀ + β₁x + ε
  • β₁ = r · (s_y / s_x)
  • β₀ = ȳ - β₁x̄
  • R²: proportion of variance explained
  • R² = r² (simple regression)

Multiple Linear Regression

  • y = β₀ + β₁x₁ + β₂x₂ + ... + ε
  • Adjusted R²: penalises added variables
  • F‑test: tests overall significance
  • t‑tests: test individual coefficients
  • VIF: measures multicollinearity

Assumptions of Linear Regression

  • Linearity
  • Independence (no autocorrelation)
  • Homoscedasticity (constant variance)
  • Normality of residuals
  • No multicollinearity

Bayesian Statistics

  • Prior: P(θ) – belief before data
  • Likelihood: P(D|θ) – data given parameter
  • Posterior: P(θ|D) ∝ P(D|θ) · P(θ)
  • Bayes Factor: ratio of likelihoods
  • Credible Interval: Bayesian equivalent of confidence interval
  • Conjugate Priors: prior and posterior from same family

Important Theorems

Law of Large Numbers (LLN)
  • As n → ∞, sample mean → population mean
  • Converges in probability
Central Limit Theorem (CLT)
  • Sample mean distribution → Normal
  • Mean = μ, variance = σ²/n
  • Approx normal for n ≥ 30

CLT Conditions

  • Independent and identically distributed (iid)
  • Finite variance
  • n sufficiently large (≥ 30 generally)
  • Applies to sums, means, proportions

Bayes' Theorem Example

P(A|B) = P(B|A) · P(A) / P(B)

Example: Medical Test
• Disease prevalence: P(D) = 0.01
• Test sensitivity: P(+|D) = 0.95
• Test false positive: P(+|no D) = 0.05

P(D|+) = (0.95 × 0.01) / (0.95×0.01 + 0.05×0.99)
       = 0.0095 / (0.0095 + 0.0495)
       = 0.161

Common Statistical Tests Summary

Test Purpose Data Type Assumptions
Z‑test Mean vs known value Continuous Normal (or large n), known σ
t‑test (1‑sample) Mean vs known value Continuous Normal (or large n), unknown σ
t‑test (2‑sample) Compare two means Continuous Normal, independent
Paired t‑test Before/after comparison Continuous Normal differences
ANOVA Compare ≥3 means Continuous Normal, independent, equal variance
Chi‑Square Categorical association Categorical Expected ≥ 5 per cell
Wilcoxon Non‑parametric mean Continuous No normality assumption
Mann‑Whitney Compare two means (non‑parametric) Continuous No normality assumption

Probability Distributions Quick Reference

Distribution Parameters E[X] Var(X) Use Case
Bernoulli p p p(1-p) Single success/failure
Binomial n, p np np(1-p) # successes in n trials
Poisson λ λ λ Count over interval
Geometric p 1/p (1-p)/p² Trials until first success
Uniform a, b (a+b)/2 (b-a)²/12 Equal likelihood over range
Normal μ, σ² μ σ² Most common, CLT
Exponential λ 1/λ 1/λ² Time between events
Beta α, β α/(α+β) αβ/((α+β)²(α+β+1)) Probabilities (0‑1)
📌 Quick Reference
Bayes: P(A|B) = P(B|A)P(A) / P(B)
CLT: sample mean → Normal for n ≥ 30
Normal: Z = (X-μ)/σ, 68‑95‑99.7 rule
Confidence: μ = x̄ ± z*(σ/√n), z*: 1.645 (90%), 1.96 (95%), 2.576 (99%)
Test types: Z‑test (known σ), t‑test (unknown σ), Chi‑square (categorical)
Correlation: r ∈ [-1,1], r² = variance explained
Regression: y = β₀ + β₁x + ε, β₁ = r·s_y/s_x, β₀ = ȳ - β₁x̄
← Back to All Cheatsheets