📊 Advanced Statistics
🔬

Hypothesis Testing

Test claims about population parameters using z-tests, t-tests, and chi-square tests.

Hypothesis testing provides a formal framework for making decisions from data. We set up a null hypothesis H₀ (the status quo) and an alternative hypothesis Hₐ, then use sample data to decide whether to reject H₀.

Hypothesis Testing Framework

1State H₀ and Hₐ (specify one-tailed or two-tailed).
2Choose significance level α (commonly 0.05 or 0.01).
3Compute the test statistic from sample data.
4Find the p-value (probability of observing data this extreme, assuming H₀).
5Reject H₀ if p-value < α; otherwise fail to reject H₀.
z=xˉμ0σ/n(z-test, σ known)t=xˉμ0s/n(t-test, σ unknown)z = \frac{\bar{x} - \mu_0}{\sigma/\sqrt{n}} \quad (\text{z-test, } \sigma \text{ known}) \qquad t = \frac{\bar{x} - \mu_0}{s/\sqrt{n}} \quad (\text{t-test, } \sigma \text{ unknown})

z-test

Population σ is knownUse standard normal tablen ≥ 30 (CLT applies)z = (x̄ − μ₀)/(σ/√n)

t-test

Population σ is unknown (use s)Use t-distribution with df = n−1Works for smaller n if population is normalt = (x̄ − μ₀)/(s/√n)

In practice, σ is almost always unknown, so t-tests are more common than z-tests.

⚠️

Type I error (α): rejecting H₀ when it is true — a "false positive." Type II error (β): failing to reject H₀ when Hₐ is true — a "false negative."

χ2=(OE)2E(chi-square goodness-of-fit or independence test)\chi^2 = \sum \frac{(O - E)^2}{E} \quad (\text{chi-square goodness-of-fit or independence test})
💡

Remember This!

The p-value is not the probability that H₀ is true. It is P(data this extreme | H₀ is true). A small p-value means the data would be surprising under H₀, giving evidence against it.

✏️ Try It!

If a hypothesis test yields a p-value of 0.03 and α = 0.05, what is the conclusion?

Take Quiz 📝 — 24 Questions