Statistics · Statistics · Quick reference
Statistics1 · 2 · COLLEGE
Data, displays, center & spread, normal curve, probability, distributions, CLT, intervals, tests, power, regression, z and t tables.
1Data & Samplingwho you ask decides what you can say
- Population
- every individual you want to describe
- Sample
- the part you actually measure
- Parameter
- a number about the population: μ, σ, p
- Statistic
- a number from the sample: x̄, s, p̂
- Variable
- a trait recorded for each individual
P goes with P, S goes with S
Parameter ↔ Population (Greek μ, σ); Statistic ↔ Sample (x̄, s).
| Type | Kind | Example |
|---|---|---|
| Categorical | nominal | eye color |
| ordinal | shirt size | |
| Quantitative | discrete (counts) | siblings |
| continuous | height |
| Level | Adds | Example |
|---|---|---|
| Nominal | labels | jersey color |
| Ordinal | order | finishing place |
| Interval | equal gaps, no true 0 | °F, year |
| Ratio | true zero; ratios work | weight, time |
NOIR
French for black: Nominal, Ordinal, Interval, Ratio, each adding one power.
| Method | How (school of 1,200) |
|---|---|
| SRS | every set of 60 names equally likely |
| Stratified | random 15 from each grade |
| Cluster | 2 random homerooms, everyone in them |
| Systematic | random start, then every 20th name |
| Convenience ✗ | whoever is in the cafeteria |
| Voluntary ✗ | whoever answers a web poll |
Strata: some from all · Clusters: all from some
Stratified: some from every group. Cluster: all of some groups.
Sources of bias
- Undercoverage: some can never be chosen
- Nonresponse: chosen people do not answer
- Response bias: wording steers answers
- A bigger biased sample is still biased.
Observational study vs experiment
Observational: watch only → association. Experiment: assign treatments → cause and effect. A confounding variable tied to both x and y blurs their link; random assignment spreads it out.
Principles of experimental design
- Control: a control or placebo group
- Randomize: chance assigns treatments
- Replicate: enough subjects per group
- Block similar subjects; double-blind when possible
Design it Worked
2Displaying Datagraph first, then compute
| Data | Use |
|---|---|
| Categorical | bar chart (gaps), pie chart |
| Quantitative | dot, stem, histogram, box |
| Two categorical | two-way table |
| Two quantitative | scatterplot (§11) |
The tail tells the skew
Skew is named for the long tail, not the peak, and the mean is pulled toward the tail.
SOCS
Describe a distribution by Shape, Outliers, Center and Spread, in context.
Frequency language
- relative frequency = countn: class 20–25 has 6/15 = 40%
- cumulative: count at or below a value
3Center & Spreadwhere the data sit and how far they wander
| Measure | Rule | Puzzle times |
|---|---|---|
| Mean x̄ | Σxn | 33415 ≈ 22.27 |
| Median | middle value (n odd) or mean of the middle two | 8th value = 22 |
| Mode | most frequent | 22 |
| Range | max − min | 41 − 12 = 29 |
| IQR | Q3 − Q1 | 25 − 18 = 7 |
| SD s | see formula | ≈ 6.93 |
Sample standard deviation
Population: σ = √(Σ(x − μ)²N). Variance = SD².
s = √(Σ(x − x̄)²n − 1)
Mean from a frequency table Worked
SD by hand: 2, 4, 4, 5, 10 Worked
Divide by n − 1 for a sample
x̄ used up one degree of freedom. Whole population known? Divide by N.
Quartiles & five-number summary
- Q1, Q3 = medians of the lower and upper halves (median left out when n is odd)
- Puzzle times: 12, 18, 22, 25, 41
- p-th percentile: p% of values at or below it
1.5 × IQR outlier rule Worked
Resistant or not?
- Resistant: median, IQR. Not: mean, SD, range.
- Drop the 41: mean 22.27 → 20.93; median 22 → 21.5
- Skewed → median & IQR; symmetric → mean & SD
Median stands firm, mean gets pulled
An extreme value drags the mean; the median barely moves.
Shifting and scaling data
- Add c to every value: center + c, spread unchanged.
- Multiply by k: center × k, spread × |k|.
- EX°C to °F (× 1.8, + 32): mean 20 °C → 68 °F; SD 5 °C → 9 °F
Weighted mean Worked
4z-Scores & the Normal Curvebell-shaped, symmetric, set by μ and σ
z-score
x = μ + zσ. Sample: z = x − x̄s.
z = x − μσ
z counts σ-steps from home
z = 2: two SDs above the mean. Unitless, so z compares apples to oranges.
Compare with z Worked
Empirical rule (68-95-99.7)
- EXapples μ = 150 g, σ = 20 g: 95% weigh 110–190 g; 2.5% weigh more than 190 g.
Normal calculations (apples) Worked
Reading Φ(z) (area to the left)
- right of z: 1 − Φ(z) · between: Φ(b) − Φ(a)
- Φ(−z) = 1 − Φ(z); table in §12
Chebyshev's rule (any shape)
At least 1 − 1k² of values lie within k SDs. k = 2: at least 75%; k = 3: at least 88.9%.
Normal approximation to the binomial
If np ≥ 10 and n(1 − p) ≥ 10, use μ = np, σ = √(np(1 − p)).
5Probability & Counting0 = impossible · 1 = certain
- Sample space
- all possible outcomes
- Event
- a set of outcomes
- P(A)
- favorabletotal when outcomes are equally likely
- Complement
- Aᶜ: A does not happen
| Rule | Formula |
|---|---|
| Complement | P(Aᶜ) = 1 − P(A) |
| Addition | P(A or B) = P(A) + P(B) − P(A and B) |
| Disjoint | P(A and B) = 0 (dependent) |
| Multiplication | P(A and B) = P(A) · P(B | A) |
| Independent | P(B | A) = P(B) |
| Conditional | P(B | A) = P(A and B)P(A) |
OR adds, AND multiplies
Or: add, minus the overlap. And: multiply (use P(B | A) if dependent).
At least one Worked
| Fiction | Nonfiction | Total | |
|---|---|---|---|
| Adult | 70 | 50 | 120 |
| Teen | 60 | 20 | 80 |
| Total | 130 | 70 | 200 |
Conditional from the table Worked
Counting
- Multiply choices: 3 shirts × 4 pants = 12 outfits; 4-digit PIN: 10⁴ = 10,000
- n! = n(n − 1)⋯1; 0! = 1; 5! = 120
- Permutations (order matters): ₙPᵣ = n!(n − r)!; 1st–2nd–3rd among 8 runners: ₈P₃ = 336
- Combinations (order ignored): ₙCᵣ = n!r!(n − r)!; 3-person committee from 8: ₈C₃ = 56
Permutation = Position · Combination = Committee
Swapping two picks makes a new result (gold vs silver)? Permutation. Not (a committee)? Combination.
Bayes' rule from the tree Worked
Wanted path over all paths
P(A | D) = the A-then-D path ÷ every path ending in D.
6Discrete Random Variablesa number decided by chance
| x (prize $) | 0 | 2 | 5 |
|---|---|---|---|
| P(x) | 0.5 | 0.3 | 0.2 |
Mean & SD of X Worked
Combining random variables
- E(X ± Y) = E(X) ± E(Y); E(a + bX) = a + bμ
- independent: Var(X ± Y) = Var(X) + Var(Y)
- SD(a + bX) = |b|σ
Variances always add
Independent X, Y: Var(X − Y) = Var X + Var Y. Add variances, never SDs.
BINS
Binary outcomes, Independent trials, fixed Number, Same p.
Binomial
μ = np, σ = √(np(1 − p))
P(X = k) = ₙCₖ pᵏ(1 − p)ⁿ⁻ᵏ
Free throws, p = 0.7, n = 10 Worked
Geometric (trials until the first success)
P(X = k) = (1 − p)ᵏ⁻¹p; μ = 1p
EXfirst 6 on the 3rd roll: (56)²(16) = 25216 ≈ 0.116; mean wait 6 rolls
Poisson (count in a fixed interval)
P(X = k) = e−λλkk!; mean = variance = λ
EXλ = 3 online orders per hour: P(2) = e−3 · 92 ≈ 0.224; P(0) ≈ 0.0498
Continuous random variables
Probability = area under a density curve, so P(X = a) = 0.
EXuniform on 0 to 10: P(2 < X < 5) = 310 = 0.3
7Sampling Distributions & the CLTstatistics vary from sample to sample, predictably
- Sampling distribution
- the distribution of a statistic over all samples of size n
- Standard error (SE)
- the SD of a sampling distribution
- Unbiased
- the statistic is centered on the parameter
| Statistic | Center | SE | Normal when |
|---|---|---|---|
| x̄ | μ | σ√n | population normal, or n ≥ 30 (CLT) |
| p̂ | p | √(p(1 − p)/n) | np ≥ 10 and n(1 − p) ≥ 10 |
10% condition
When sampling without replacement, keep n ≤ 10% of the population so the SE formulas hold.
SD or SE?
SD describes individuals; SE describes a statistic. SE = SD/√n is always smaller.
Central Limit Theorem
For a large enough random sample (rule of thumb n ≥ 30), x̄ is approximately normal with mean μ and SE σ/√n, whatever the population shape.
Thirty makes it normal
n ≥ 30 lets the CLT take over for means; strongly skewed populations may need more.
Difference of two means
x̄₁ − x̄₂ centers on μ₁ − μ₂ with SE √(σ₁²n₁ + σ₂²n₂); independent samples.
√n lives downstairs
SE = σ/√n: 4 times the sample halves the spread. n = 25 → SE = 20/5 = 4; n = 100 → SE = 20/10 = 2.
Mean of 25 apples Worked
p̂ with p = 0.3, n = 100 Worked
Bias vs variability
- Bias: aim is off (fix the method).
- Variability: shots scatter (fix with a bigger sample).
8Confidence Intervalsestimate ± margin of error
Every interval
Margin of error ME = critical value × SE.
estimate ± (critical value)(SE)
| Parameter | Interval |
|---|---|
| μ (σ known) | x̄ ± z*σ√n |
| μ | x̄ ± t*s√n, df = n − 1 |
| p | p̂ ± z*√(p̂(1 − p̂)n) |
| μ₁ − μ₂ | (x̄₁ − x̄₂) ± t*√(s₁²n₁ + s₂²n₂) |
| p₁ − p₂ | (p̂₁ − p̂₂) ± z*√(p̂₁q̂₁n₁ + p̂₂q̂₂n₂) |
| μd (paired) | d̄ ± t*sd√n, df = n − 1 |
Sample size for a proportion Worked
t interval for a mean Worked
Interval for a proportion Worked
Two-sample t interval Worked
What 95% confidence means
If we repeated the sampling many times, about 95% of the intervals built this way would capture the true parameter. The 95% describes the method, not one interval.
More confidence, wider net; more data, tighter net
Raise the confidence level → bigger critical value → wider interval. Quadruple n → half the margin of error.
9Hypothesis Testsis the evidence strong enough to doubt H₀?
The pieces
- H₀ (null): no effect, uses =. Hₐ (alternative): <, > or ≠.
- α: significance level, often 0.05.
- p-value: chance of a result at least this extreme if H₀ is true.
- p ≤ α → reject H₀. p > α → fail to reject H₀ (never “accept”).
If p is low, the null must go
Traditional: small p = data rare if H₀ were true, so reject H₀.
Claim · Check · Compute · Conclude
Hypotheses · conditions · statistic and p-value · conclusion in context.
| Test | Statistic | df | Test | Statistic | df |
|---|---|---|---|---|---|
| 1 mean, σ known | z = x̄ − μ₀σ/√n | — | 2 proportions | z = p̂₁ − p̂₂√(p̂q̂(1/n₁ + 1/n₂)), pooled p̂ | — |
| 1 mean | t = x̄ − μ₀s/√n | n − 1 | χ² | Σ(O − E)²E | k − 1; (r − 1)(c − 1) |
| 1 proportion | z = p̂ − p₀√(p₀q₀/n) | — | ANOVA | F = MSBMSW | k − 1, N − k |
| 2 means | t = x̄₁ − x̄₂√(s₁²/n₁ + s₂²/n₂) | software* | slope | t = bSEb | n − 2 |
| paired | t = d̄sd/√n | n − 1 | * or min(n₁, n₂) − 1 (safe) |
One-sample t (bottle filler) Worked
One-proportion z (fair coin?) Worked
Paired t (after − before) Worked
χ² goodness of fit (fair die?) Worked
χ² independence (library table) Worked
χ² conditions
Counts (not percents), random sample, every expected count ≥ 5.
| Source | SS | df | MS | F |
|---|---|---|---|---|
| Between | 24 | 2 | 12 | 12 |
| Within | 6 | 6 | 1 | |
| Total | 30 | 8 |
ANOVA overview
Tests H₀: all k means are equal. Large F (between-group spread ≫ within) → small p; here p ≈ 0.008. A follow-up (e.g., Tukey) finds which means differ.
Two-sample t (tomatoes) Worked
10Errors & Powerevery decision can be wrong
| Decision | H₀ true | H₀ false |
|---|---|---|
| Reject H₀ | Type I error (prob. α) | correct: power = 1 − β |
| Fail to reject | correct | Type II error (prob. β) |
The boy who cried wolf
Aesop: villagers first believe a false alarm (Type I: reject a true “no wolf”), then ignore a real wolf (Type II).
Tests and intervals agree
A two-sided test at α = 0.05 rejects H₀: μ = μ₀ exactly when μ₀ lies outside the 95% CI.
Raise power by
- a larger sample n
- a larger α (more Type I risk)
- a bigger true effect
- less variability (better measurement, blocking)
p-value traps
- p is not the chance H₀ is true.
- Significant ≠ important: huge n makes tiny effects significant.
11Correlation & Regressiontwo quantitative variables
DOFS
Describe a scatterplot by Direction, Outliers, Form (linear or curved), Strength, in context.
Correlation r
- −1 ≤ r ≤ 1; sign = direction, size = strength of a linear pattern.
- Unitless; swapping x and y keeps r.
- Not resistant: one outlier can change it a lot.
Least-squares line
b = rsysx, a = ȳ − b x̄; the line passes through (x̄, ȳ).
ŷ = a + bx
Typing practice (5 students) Worked
Residual = O − P
Observed minus Predicted. Positive: the point sits above the line.
Read the output in context
- Slope: each extra practice hour adds about 5.7 wpm to predicted speed.
- r² = 0.985: 98.5% of the variation in speed is explained by the line.
- Residual plot with no pattern → a line fits.
Regression cautions
- Correlation is not causation: a lurking variable may drive both.
- Extrapolation: x = 6 gives ŷ = 90.1 but lies past the data; do not trust it.
- Check for curved patterns and influential points.
Test for the slope
H₀: β = 0 (no linear relationship). t = bSEb, df = n − 2.
12Which Test? · z and t Tablesstart at the left, follow the question
| z | Φ(z) | z | Φ(z) | z | Φ(z) |
|---|---|---|---|---|---|
| 0.0 | 0.5000 | 1.0 | 0.8413 | 2.0 | 0.9772 |
| 0.1 | 0.5398 | 1.1 | 0.8643 | 2.1 | 0.9821 |
| 0.2 | 0.5793 | 1.2 | 0.8849 | 2.2 | 0.9861 |
| 0.3 | 0.6179 | 1.3 | 0.9032 | 2.3 | 0.9893 |
| 0.4 | 0.6554 | 1.4 | 0.9192 | 2.4 | 0.9918 |
| 0.5 | 0.6915 | 1.5 | 0.9332 | 2.5 | 0.9938 |
| 0.6 | 0.7257 | 1.6 | 0.9452 | 2.6 | 0.9953 |
| 0.7 | 0.7580 | 1.7 | 0.9554 | 2.7 | 0.9965 |
| 0.8 | 0.7881 | 1.8 | 0.9641 | 2.8 | 0.9974 |
| 0.9 | 0.8159 | 1.9 | 0.9713 | 2.9 | 0.9981 |
Conditions for every inference
- Random: a random sample or random assignment.
- Independent: n ≤ 10% of the population.
- Normal/large: n ≥ 30, or a roughly symmetric sample; np, n(1 − p) ≥ 10; expected counts ≥ 5.
| df | 90% | 95% | 98% | 99% |
|---|---|---|---|---|
| 1 | 6.314 | 12.706 | 31.821 | 63.657 |
| 2 | 2.920 | 4.303 | 6.965 | 9.925 |
| 3 | 2.353 | 3.182 | 4.541 | 5.841 |
| 4 | 2.132 | 2.776 | 3.747 | 4.604 |
| 5 | 2.015 | 2.571 | 3.365 | 4.032 |
| 6 | 1.943 | 2.447 | 3.143 | 3.707 |
| 7 | 1.895 | 2.365 | 2.998 | 3.499 |
| 8 | 1.860 | 2.306 | 2.896 | 3.355 |
| 9 | 1.833 | 2.262 | 2.821 | 3.250 |
| 10 | 1.812 | 2.228 | 2.764 | 3.169 |
| 12 | 1.782 | 2.179 | 2.681 | 3.055 |
| 15 | 1.753 | 2.131 | 2.602 | 2.947 |
| 20 | 1.725 | 2.086 | 2.528 | 2.845 |
| 30 | 1.697 | 2.042 | 2.457 | 2.750 |
| 60 | 1.671 | 2.000 | 2.390 | 2.660 |
| ∞ (z) | 1.645 | 1.960 | 2.326 | 2.576 |
Interval or test?
- “How big is it?” → confidence interval.
- “Is there an effect?” → test.
- Paired data (same subject twice) → analyze the differences.
Paired is one sample in disguise
Subtract within each pair first; then it is a one-sample t on the differences.