STATISTICS FOR
DATA ANALYST & Engineer
A Complete Reference Guide
CONTENTS AT A GLANCE
1. Introduction to Statistics & Data Types
2. Measures of Central Tendency
3. Measures of Dispersion & Variability
4. Quartiles, Percentiles & Outlier Detection
5. Correlation & Covariance
6. Probability Fundamentals
7. Bayes Theorem
8. Probability Distributions — Discrete
9. Probability Distributions — Continuous
10. Inferential Statistics & Estimation
11. Hypothesis Testing
12. Statistical Tests (Z, T, ANOVA, Chi-Square)
13. Quick Reference — Formulas & Decision Guide
1. Introduction to Statistics
Statistics is the science of collecting, organizing, analyzing, interpreting, and presenting data to extract
meaningful insights and make informed decisions. It forms the mathematical backbone of data science.
1.1 The Two Branches
DESCRIPTIVE STATISTICS INFERENTIAL STATISTICS
DESCRIPTIVE STATISTICS Summarizes & INFERENTIAL STATISTICS Uses sample data to
describes what the data looks like. Includes: make conclusions about a population. Includes:
Mean, Median, Mode, Standard Deviation, Hypothesis Testing, Confidence Intervals,
Histograms, Box Plots Regression, Probability Distributions
1.2 Data Types & Variables
Understanding data types is critical — it determines which statistical methods, visualizations, and tests are
appropriate.
Data Type Examples Key Characteristic
Continuous Height, Weight, Temperature, Any value in a range, decimals
Price allowed
Discrete Student count, Goals scored, Countable whole numbers only
Clicks
Nominal Blood type, Country, Color Categories with no order
Ordinal Satisfaction ratings, Education Categories with meaningful order
level
Binary Yes/No, True/False, 0/1 Only two possible outcomes
Ratio Weight, Salary, Distance Numerical, equal spacing, true
zero
Interval Temperature in °C, IQ score Numerical, equal spacing, no true
zero
1.3 Population vs Sample
KEY CONCEPT
Population = the complete set of all items under study. Sample = a subset of the population selected
for analysis. We study samples because studying an entire population is usually impractical,
expensive, or impossible. Statistical inference lets us generalize from sample findings to population
truths.
1.4 Sampling Methods
Method How It Works Example
Simple Random Each member has equal chance Lottery draw, random number
table
Systematic Every kth element after random Survey every 10th customer
start
Stratified Divide into strata, sample from Sample proportionally by gender
each
Cluster Select entire random clusters Survey all students in 5 random
schools
2. Measures of Central Tendency
Central tendency measures identify the "center" or typical value of a dataset. Choose the right measure
based on your data's characteristics.
2.1 Mean (Average)
The arithmetic average — sum all values, divide by count. Most commonly used because it considers every
data point.
Mean (x̅) = (x₁ + x₂ + ... + xₙ) / n OR μ = Σxᵢ / N
Example
Test scores: 75, 80, 85, 90, 95 Mean = (75+80+85+90+95) / 5 = 425 / 5 = 85 WHEN TO USE:
Symmetrical data with no extreme outliers. WEAKNESS: Highly sensitive to outliers — one extreme
value can distort the mean significantly.
2.2 Median
The middle value when data is sorted in order. Not affected by extreme outliers, making it ideal for skewed
distributions.
Sort data ascending → Odd n: middle value | Even n: average of two
middle values
Example
Odd (5 values): [12, 15, 18, 22, 30] → Median = 18 Even (6 values): [10, 15, 20, 25, 30, 35] →
Median = (20+25)/2 = 22.5 WHEN TO USE: Skewed data, income/house prices, when outliers are
present.
2.3 Mode
The value that appears most frequently. The only measure applicable to nominal (categorical) data.
Example
Shoe sizes sold: 7, 8, 8, 9, 8, 10, 7, 8 → Mode = 8 (appears 4 times) A dataset can be: Unimodal (1
mode), Bimodal (2 modes), or Multimodal (3+ modes) WHEN TO USE: Categorical data, fashion/retail
(most popular item), nominal variables.
2.4 Decision Guide — Which Measure to Use?
Situation Best Measure Reason
Symmetrical data, no outliers Mean Most mathematically powerful
Skewed data or outliers present Median Robust to extreme values
Categorical / nominal data Mode Only valid option for categories
Income, house prices Median Income distributions are skewed
right
Machine learning features Mean or Median Depends on distribution shape
3. Measures of Dispersion & Variability
Dispersion measures show how spread out data values are from the center. Always use dispersion
measures alongside central tendency — a mean alone tells only half the story.
3.1 Range
The simplest measure of spread — the difference between maximum and minimum values.
Range = Maximum Value − Minimum Value
Note
Scores: 60, 70, 75, 85, 95 → Range = 95 - 60 = 35 SIMPLE but FLAWED: uses only two data points
and is extremely sensitive to outliers.
3.2 Variance
The average of squared deviations from the mean. Quantifies overall data variability in squared units.
Population Variance (σ²) = Σ(xᵢ - μ)² / N | Sample
Variance (s²) = Σ(xᵢ - x̅)² / (n-1)
Example — Step by Step
Data: 4, 8, 6, 5, 7 Mean = (4+8+6+5+7)/5 = 6 Deviations from mean: (4-6)²=4, (8-6)²=4, (6-6)²=0,
(5-6)²=1, (7-6)²=1 Variance = (4+4+0+1+1) / 5 = 10/5 = 2 NOTE: Use n-1 (not n) for sample variance
to get an unbiased estimate of population variance.
3.3 Standard Deviation
The square root of variance — returns values to original units, making it directly interpretable.
Standard Deviation (σ or s) = √Variance
Interpretation
From example above: SD = √2 ≈ 1.41 Low SD → Data clustered closely around the mean
(consistent/precise) High SD → Data spread widely from the mean (variable/uncertain) REAL
EXAMPLE: If average exam score = 75 with SD = 5, most students scored between 70-80. If SD = 20,
scores range wildly from 35-100.
3.4 Skewness & Distribution Shape
Shape Relationship Characteristics
Left Skew (Negative) Mean < Median < Mode Long tail to the LEFT E.g., Age at
retirement
Symmetric (Normal) Mean = Median = Mode Bell-shaped, balanced E.g.,
Heights, test scores
Right Skew (Positive) Mode < Median < Mean Long tail to the RIGHT E.g.,
Income, house prices
PRACTICAL RULE
If Mean > Median → Data is right-skewed (positively skewed) If Mean < Median → Data is left-skewed
(negatively skewed) If Mean ≈ Median → Data is approximately symmetric Kurtosis measures the
"peakedness" of a distribution. High kurtosis = heavy tails (more outliers than normal).
4. Quartiles, Percentiles & Outlier Detection
4.1 Quartiles
Quartiles divide a sorted dataset into four equal parts, providing a robust picture of data spread.
Measure Position Meaning
Q1 (First Quartile) 25th percentile Splits lowest 25% from rest
Q2 (Median) 50th percentile Splits data in half
Q3 (Third Quartile) 75th percentile Splits lowest 75% from top 25%
IQR (Interquartile Range) Q3 − Q1 Middle 50% of data — robust spread
measure
IQR = Q3 − Q1 Lower Fence = Q1 − 1.5 × IQR Upper Fence = Q3 + 1.5
× IQR
4.2 Box Plot (Whisker Plot)
The box plot visualizes the five-number summary and is the most powerful single chart for understanding
data distribution.
Five-Number Summary: Minimum | Q1 | Median (Q2) | Q3 | Maximum
Points beyond the fences (Q1-1.5×IQR or Q3+1.5×IQR) are flagged as outliers (shown as individual dots).
4.3 Outlier Detection Methods
Method 1: Z-Score Method
Z = (X − μ) / σ → |Z| > 3 means the point is an outlier
Best for normally distributed data. A Z-score > 3 means the point is more than 3 standard deviations from
the mean — extremely rare in a normal distribution (0.3% of data).
Method 2: IQR Method (Tukey's Fences)
Outlier if: X < Q1 − 1.5×IQR OR X > Q3 + 1.5×IQR
More robust than Z-score — works well even for non-normal distributions. Preferred method in exploratory
data analysis (EDA).
WHEN TO HANDLE OUTLIERS
DO remove outliers when: Data entry errors, instrument malfunction, wrong units entered. DO KEEP
outliers when: They represent genuine rare events (e.g., a viral tweet in engagement data). DO
investigate outliers: Before removing, always understand WHY they exist.
5. Correlation & Covariance
5.1 Covariance
Measures the direction of the linear relationship between two variables X and Y.
Cov(X, Y) = Σ[(Xᵢ − X̅)(Yᵢ − Y̅)] / n
Interpretation
Positive Cov → Both variables increase together Negative Cov → When one increases, the other
decreases Cov = 0 → No linear relationship LIMITATION: Covariance depends on the scale/units of
variables, making it hard to compare across datasets.
5.2 Pearson Correlation Coefficient (r)
A standardized version of covariance — scale-independent and always between -1 and +1.
r = Cov(X, Y) / (σₓ × σᵧ) Range: −1 ≤ r ≤ +1
r Value Interpretation Visual Pattern
r = +1.0 Perfect positive linear relationship All points on upward line
r = +0.7 to +0.9 Strong positive correlation Points cluster near upward line
r = +0.3 to +0.6 Moderate positive correlation Loose upward trend visible
r≈0 No linear correlation Random scatter, no pattern
r = −0.3 to −0.6 Moderate negative correlation Loose downward trend
r = −0.7 to −0.9 Strong negative correlation Points cluster near downward line
r = −1.0 Perfect negative linear All points on downward line
relationship
CRITICAL WARNING: Correlation ≠ Causation
Even a perfect correlation (r=1) does NOT prove that X causes Y. Famous example: Ice cream sales
and drowning deaths are positively correlated — because both increase in summer. The cause is hot
weather, not ice cream. Always consider: Confounding variables, reverse causation, and coincidence.
6. Probability Fundamentals
Probability is the mathematical measure of how likely an event is to occur. It is the foundation of all statistical
inference.
P(Event E) = (Favorable Outcomes) / (Total Possible Outcomes)
Range: 0 ≤ P(E) ≤ 1
6.1 Key Terms
Term Definition Example
Random Experiment Process with uncertain outcome Tossing a coin, rolling a die
Sample Space (S) Set of all possible outcomes Rolling a die: S = {1,2,3,4,5,6}
Event (E) Subset of sample space Getting even number: E = {2,4,6}
Complement (E') All outcomes NOT in E P(E') = 1 − P(E)
Union (A∪B) A OR B occurs (or both) P(A∪B) = P(A)+P(B)−P(A∩B)
Intersection (A∩B) Both A AND B occur P(A∩B) = P(A) × P(B|A)
6.2 Types of Events
Event Type Formula Example
Independent Events P(A∩B) = P(A) × P(B) Tossing coin twice — outcomes
don't affect each other
Mutually Exclusive P(A∩B) = 0 Rolling a 2 and rolling a 5 in same
throw
Exhaustive Events P(E₁ ∪E₂ ∪...En) = 1 All possibilities covered
Dependent Events P(A|B) ≠ P(A) Drawing cards without
replacement
6.3 Conditional Probability
The probability of event A occurring given that event B has already occurred.
P(A|B) = P(A ∩ B) / P(B) where P(B) > 0
Example
Roll a fair die. Event A = Even number {2,4,6} | Event B = Number > 3 {4,5,6} P(A∩B) = 2/6
(numbers 4 and 6) | P(B) = 3/6 P(A|B) = (2/6) / (3/6) = 2/3 ≈ 0.667 Interpretation: Given the number
is greater than 3, there is a 66.7% chance it is even.
6.4 Bayes' Theorem
Allows us to update our probability beliefs when new evidence arrives. Foundation of Bayesian machine
learning, medical diagnostics, and spam filtering.
P(A|B) = [P(B|A) × P(A)] / P(B) Where: P(A) = Prior probability |
P(B|A) = Likelihood | P(A|B) = Posterior probability
Classic Example — Medical Test
Disease prevalence: P(Disease) = 1% = 0.01 Test accuracy: P(Positive | Disease) = 99%, P(Positive
| No Disease) = 5% P(Disease | Positive) = (0.99 × 0.01) / [(0.99×0.01) + (0.05×0.99)] =
0.0099/0.0594 ≈ 16.7% Surprising result: Even a 99% accurate test gives only ~17% chance of
disease given a positive result, because the disease is rare. This is why mass screening can generate
many false positives.
7 & 8. Probability Distributions
A probability distribution describes how probability is assigned to all possible outcomes of a random
variable. It is the complete mathematical description of a random phenomenon.
Function Used For Meaning
PMF — Probability Mass Function Discrete random variables P(X=x) = exact probability at each
value
PDF — Probability Density Continuous random variables Probability = area under curve
Function between points
CDF — Cumulative Distribution Both types F(x) = P(X ≤ x) — always 0 to 1,
Function never decreasing
7.1 Discrete Distributions
Bernoulli Distribution
Models a single trial with exactly two outcomes: success (1) or failure (0). The building block of all other
discrete distributions.
P(X=x) = pˣ(1−p)^¹⁻ ˣ for x = 0, 1 | Mean = p |
Variance = p(1−p)
Use Cases
Coin flip (p=0.5), Customer makes purchase (p=0.2), Email is spam (p=0.3) Binary classification
outputs in machine learning (logistic regression, decision trees)
Binomial Distribution B(n, p)
Models the number of successes in n independent Bernoulli trials with the same success probability p. A
sum of n Bernoulli random variables.
P(X=k) = C(n,k) × pᵏ × (1−p)^ⁿ⁻ ᵏ Mean = np | Variance =
np(1−p) | Parameters: n (trials), p (success probability)
Example
Toss a coin 10 times (n=10, p=0.5). What is P(exactly 6 heads)? P(X=6) = C(10,6) × 0.5⁶ × 0.5⁴ = 210
× 0.015625 × 0.0625 ≈ 0.205 ≈ 20.5% USE WHEN: Fixed number of independent trials, binary
outcome, same p each trial. EXAMPLES: A/B testing conversions, defective items in quality control,
election polling.
Poisson Distribution Pois(λ)
Models the number of events occurring in a fixed time interval or space, given a known average rate λ. A
limiting case of Binomial when n→∞ and p→0.
P(X=k) = (e⁻ λ × λᵏ) / k! | Mean = λ | Variance = λ
| k = 0, 1, 2, ...
Example & Use Cases
Emails received per hour (avg=5), Website clicks per minute, Customer arrivals per day
Requirements: Events are independent, rate is constant, two events can't happen at same instant. IF
avg calls/hour = 3 (lambda=3): P(exactly 5 calls) = e⁻ ³ × 3⁵ / 5! ≈ 10.1%
Geometric Distribution Geom(p)
Models the number of failures before the first success in a sequence of Bernoulli trials. The ONLY
memoryless discrete distribution.
P(X=k) = p(1−p)ᵏ for k = 0, 1, 2, ... | Mean = (1−p)/p
| Variance = (1−p)/p²
Memoryless Property: P(X ≥ n+m | X ≥ m) = P(X ≥ n) — past failures don't affect future probability.
8 (Cont.). Continuous Distributions
8.1 Normal (Gaussian) Distribution N(μ, σ²)
The most important distribution in statistics — naturally arises whenever many independent random effects
combine (Central Limit Theorem). Symmetric, bell-shaped, described entirely by mean μ and standard
deviation σ.
f(x) = (1/√(2πσ²)) × exp[−½ × ((x−μ)/σ)²] | Mean = μ |
Variance = σ²
The Empirical Rule (68-95-99.7 Rule)
±1σ from the mean contains ≈ 68.2% of data ±2σ from the mean contains ≈ 95.4% of data ±3σ from
the mean contains ≈ 99.7% of data Practical use: In quality control, any measurement beyond 3σ is
flagged as a defect or anomaly.
8.2 Standard Normal Distribution & Z-Scores
A special normal distribution with μ=0 and σ=1. We convert any normal variable to a Z-score to find
probabilities using standard tables.
Z = (X − μ) / σ → Z tells you how many standard deviations
X is from the mean
Example
Student scores 85 on a test where Mean=70, SD=10: Z = (85 − 70) / 10 = 1.5 This student scored 1.5
standard deviations ABOVE average. From Z-table: P(X < 85) = P(Z < 1.5) ≈ 93.3% → student
outperformed 93% of class.
8.3 Central Limit Theorem (CLT)
THE MOST IMPORTANT THEOREM IN STATISTICS
If you take sufficiently large random samples (n ≥ 30) from ANY distribution with mean μ and variance
σ², the distribution of the SAMPLE MEANS will be approximately Normal: X̅ ~ N(μ, σ²/n) WHY IT
MATTERS: This is why normal distribution methods work in practice even when raw data is not
normal. It justifies t-tests, Z-tests, and confidence intervals.
8.4 Other Key Continuous Distributions
Distribution Key Properties When to Use
Uniform U(a,b) All outcomes equally likely in [a,b] Random number generation,
Mean=(a+b)/2, Variance=(b- simulations, lotteries
a)²/12
Exponential Exp(λ) Time between Poisson events Time between customer arrivals,
Mean=1/λ, Variance=1/λ² equipment lifespan, radioactive
Memoryless property decay
t-Distribution Like normal but heavier tails Used Small sample hypothesis testing
for small samples (n<30) when population σ unknown
Approaches normal as n→∞
Chi-Square χ² Sum of squared standard normals Goodness-of-fit tests, variance
Mean=df, Variance=2df testing, categorical variable tests
F-Distribution Ratio of two chi-square variables ANOVA, comparing variances
Always positive, right-skewed between groups
Beta Beta(α,β) Probabilities between 0 and 1 Bayesian priors, modeling rates
Flexible shape depending on α,β and proportions
9. Inferential Statistics & Estimation
9.1 Point Estimation
Using a single sample statistic as our best guess for an unknown population parameter.
Parameter Estimator How Calculated
Population Mean (μ) Sample Mean (x̅) Average of sample values
Population Proportion (p) Sample Proportion (p̂) Fraction with characteristic
Population Variance (σ²) Sample Variance (s²) Use n-1 in denominator
Population Std Dev (σ) Sample Std Dev (s) Square root of sample variance
9.2 Confidence Intervals
A range of plausible values for a population parameter, constructed from sample data, accompanied by a
confidence level (e.g., 95%).
CI = Point Estimate ± (Critical Value × Standard Error)
How to interpret a 95% CI
CORRECT: "If we repeated this study 100 times, approximately 95 of the resulting CIs would contain
the true population parameter." INCORRECT: "There is a 95% probability that the true value lies in
this specific interval." (The parameter is fixed — it either is or isn't in the interval.)
9.3 Z vs T Confidence Intervals
Z-INTERVAL Use when: • Sample size LARGE T-INTERVAL Use when: • Sample size SMALL (n
(n ≥ 30) • Population SD (σ) is KNOWN Formula: < 30) • Population SD (σ) is UNKNOWN
CI = x̅ ± Z* × (σ/√n) Common Z* values: 90% CI: Formula: CI = x̅ ± t* × (s/√n) Degrees of freedom:
Z* = 1.645 95% CI: Z* = 1.960 99% CI: Z* = 2.576 df = n - 1 t* values are slightly larger than Z*
(heavier tails = more uncertainty)
Width of a CI depends on:
1. Confidence Level: Higher confidence (99% vs 95%) → Wider interval (more uncertainty) 2. Sample
Size: Larger n → Narrower interval (less uncertainty) 3. Population Variability: Higher σ or s → Wider
interval (more spread) To halve the margin of error, you need to QUADRUPLE the sample size.
10. Hypothesis Testing
A formal procedure to test claims about a population using sample data. Think of it as a court trial: H₀ is
"innocent until proven guilty."
10.1 Setting Up Hypotheses
NULL HYPOTHESIS (H₀ ) The "status quo" or ALTERNATIVE HYPOTHESIS (H₁ or H_a) The
"no effect" claim. We assume H₀ is true unless claim you're testing — what you suspect might be
evidence proves otherwise. Examples: H₀ : μ = true. Examples: H₁ : μ ≠ 100 (two-tailed: any
100 (mean is exactly 100) H₀ : μ₁ = μ₂ (no difference) H₁ : μ > 100 (right-tailed: specifically
difference between groups) H₀ : Drug has no greater) H₁ : μ < 100 (left-tailed: specifically less)
effect
10.2 Decision Errors
Error Type What Happens Details
Type I Error (α) Reject H₀ when it's actually False alarm — crying wolf P(Type
TRUE I) = α (significance level)
Type II Error (β) Fail to reject H₀ when it's actually Miss a real effect — missing the
FALSE wolf P(Type II) = β
Power (1 - β) Correctly reject a false H₀ Test's ability to detect real effects
Increase by: larger n, higher α,
larger effect
10.3 P-Value Interpretation
Understanding P-Value
P-value = The probability of observing your result (or more extreme) IF H₀ were true. SMALL p-value
(p < α) → Your result would be very unlikely if H₀ were true → REJECT H₀ LARGE p-value (p ≥ α)
→ Your result is plausible under H₀ → FAIL TO REJECT H₀ COMMON MISTAKE: p-value is NOT
the probability that H₀ is true. It is the probability of your DATA given H₀ is true. Typical significance
levels: α = 0.05 (standard), α = 0.01 (strict), α = 0.10 (lenient)
11. Statistical Tests
11.1 Z-Test
Compares sample mean to known population mean (or compares two sample means) when sample is large
(n ≥ 30) and population σ is known.
One-Sample Z = (x̅ − μ₀ ) / (σ/√n) Two-Sample Z = (x̅₁ − x̅₂ ) /
√(σ₁ ²/n₁ + σ₂ ²/n₂ )
Example
Factory claims chocolate bars weigh 100g (μ=100). Historical data: σ=5g. You sample 50 bars and
find x̅=98g. Test at α=0.05 (left-tailed). Z = (98 − 100) / (5/√50) = −2 / 0.707 = −2.83 P-value = 0.0023
< α = 0.05 Decision: REJECT H₀ — strong evidence bars are underweight!
11.2 T-Test
The most commonly used test in practice — used when σ is unknown (almost always) and especially for
small samples.
One-Sample T = (x̅ − μ₀ ) / (s/√n) df = n−1 Two-Sample T = (x̅₁
− x̅₂ ) / √(s₁ ²/n₁ + s₂ ²/n₂ ) df = n₁ +n₂ −2
Type Purpose Example
One-Sample T-Test Compare sample mean to Does our product weigh 500g as claimed?
a specific value
Independent Two-Sample Compare means of two Does new drug lower blood pressure vs
T-Test separate groups placebo?
Paired T-Test Compare the same Did training improve employee performance?
subjects before/after
11.3 ANOVA (Analysis of Variance)
Compares means across THREE OR MORE groups simultaneously. Controls error better than running
multiple t-tests (which inflates Type I error rate).
F-statistic = Between-Group Variance / Within-Group Variance = MSB
/ MSW Reject H₀ if F > F-critical or p-value < α
When to use ANOVA & Post-Hoc Tests
USE WHEN: Comparing 3+ groups on a continuous outcome. ANOVA tells you: "At least one group is
different" — but NOT which ones. USE POST-HOC TESTS (Tukey's HSD, Bonferroni) to identify
which specific pairs differ. Why not multiple t-tests? With 4 groups and α=0.05: P(at least one false
positive) = 1-(0.95)^6 = 26.5%! ANOVA keeps overall α at 5%.
11.4 Chi-Square Test
Tests relationships between CATEGORICAL variables using frequencies and counts. Does NOT work with
means.
χ² = Σ [(Observed − Expected)² / Expected] df =
(rows−1)(cols−1)
CHI-SQUARE TEST OF INDEPENDENCE CHI-SQUARE GOODNESS OF FIT Question:
Question: Are two categorical variables related? Does observed data match expected distribution?
Example: Is gender associated with product Example: Is this die fair? Roll 60 times. Expect
preference? Set up contingency table, calculate each face 10 times. Compare actual counts to
expected frequencies, compute χ². Large χ² = big expected. Large χ² = observed data does NOT fit
difference between observed and expected = expected distribution.
variables are RELATED.
11.5 Choosing the Right Test
Situation Test to Use Key Formula/Approach
1 group, 1 mean vs value, σ Z-Test z = (x̅-μ)/(s/√n)
known, n≥30
1 group, 1 mean vs value, σ One-Sample T-Test t = (x̅-μ)/(s/√n)
unknown
2 independent groups, Two-Sample T-Test Compare two means
continuous outcome
Same subjects, before & after Paired T-Test Difference = after - before
3+ groups, continuous outcome One-Way ANOVA F = MSB/MSW
Relationship between 2 Chi-Square Independence χ² on contingency table
categorical vars
Distribution fit check Chi-Square Goodness of Fit Observed vs expected counts
2+ groups, 2 factors, continuous Two-Way ANOVA Tests interaction effects
12. Master Formula Reference
Central Tendency
Mean: x̅ = Σxᵢ/n Median: Middle value of sorted data Mode: Most
frequent value
Dispersion
Range = Max − Min Variance: s² = Σ(xᵢ-x̅)²/(n-1) Std Deviation: s
= √s² IQR = Q3 − Q1
Probability
P(A∪B) = P(A) + P(B) − P(A∩B) P(A|B) = P(A∩B)/P(B) Bayes: P(A|B) =
P(B|A)×P(A) / P(B)
Z-Score & Standardization
Z = (X − μ) / σ | X = μ + Zσ
Confidence Intervals
Z-CI: x̅ ± Z*(σ/√n) | T-CI: x̅ ± t*(s/√n) Margin of Error:
E = Z* × SE where SE = σ/√n
Hypothesis Testing
Z-test: Z = (x̅-μ)/(s/√n) T-test: T = (x̅-μ)/(s/√n) Decision:
Reject H₀ if p-value < α OR |test stat| > critical value
Common Distributions — Summary
Distribution Mean & Variance Use When
Bernoulli(p) Mean=p, Var=p(1-p) Single binary trial
Binomial(n,p) Mean=np, Var=np(1-p) n independent binary trials
Poisson(λ) Mean=λ, Var=λ Events in fixed time/space
Geometric(p) Mean=(1-p)/p, Var=(1-p)/p² Trials until first success
Normal(μ,σ²) Mean=μ, Var=σ² Bell curve, symmetric
Uniform(a,b) Mean=(a+b)/2, Var=(b-a)²/12 Equal probability in range
Exponential(λ) Mean=1/λ, Var=1/λ² Time between events
t(df) Mean=0, heavier tails Small sample inference
Chi-Square(df) Mean=df, Var=2df Categorical tests, variance
Statistics Golden Rules for Data Science
• 1. Always VISUALIZE your data before running any statistical tests.
• 2. Check your DATA TYPE first — it determines which methods are valid.
• 3. Correlation does NOT imply causation. Ever.
• 4. Always report effect size alongside p-values — statistical significance ≠ practical significance.
• 5. Report confidence intervals, not just point estimates.
• 6. Check assumptions before applying tests (normality, independence, homogeneity of variance).
• 7. More data is (almost) always better — larger samples reduce uncertainty.
• 8. Use the MEDIAN for skewed data and the MEAN for symmetric data.
• 9. A p-value > 0.05 does not prove H₀ is true — it simply means insufficient evidence.
• 10. Beware of multiple comparisons — correct using Bonferroni or FDR methods.