Hypothesis Testing Guide

Steps in Hypothesis Testing

1. State H₀ (null hypothesis) and H₁ (alternative hypothesis). 2. Choose significance level α (typically 5%). 3. Calculate test statistic: z = (x̄ − μ₀) / (σ/√n). 4. Find critical value from z-table (or t-table for t-test). 5. Decision rule: reject H₀ if |z| > z_critical (two-tailed) or z > z_critical (one-tailed upper). Or equivalently: reject H₀ if p-value < α. Example: H₀: μ = 50. H₁: μ > 50. x̄ = 52.3, σ = 8, n = 36. z = (52.3-50)/(8/6) = 2.3/1.333 = 1.725. One-tailed at α=0.05: critical z =

Type I and Type II Errors

Type I error (α): rejecting H₀ when it is actually true. The significance level α is the probability of a Type I error. Choosing α = 0.05: 5% chance of incorrectly rejecting a true null hypothesis. Type II error (β): failing to reject H₀ when it is actually false. Power of test = 1 − β = probability of correctly rejecting a false H₀. There is a trade-off: reducing α (stricter) increases the chance of a Type II error. Context matters: medical testing (diagnosing a disease): Type II error (missing

p-value Interpretation

The p-value is the probability of observing a test statistic as extreme as or more extreme than the one calculated, assuming H₀ is true. p-value < α: reject H₀ — statistically significant result. p-value > α: fail to reject H₀ — insufficient evidence. Common misinterpretation: the p-value is NOT the probability that H₀ is true. It is NOT the probability of getting this result by chance. It IS the probability of getting this extreme a result if H₀ were true. A p-value of 0.03 means: if H₀ were tr

z-test vs t-test

Use z-test when: population standard deviation σ is known. Sample size is large (n > 30, approximately). Use t-test when: population σ is unknown and estimated from sample. Sample is small (n < 30). The t-distribution has heavier tails than the normal — it is more conservative (harder to reject H₀), reflecting the additional uncertainty from estimating σ. For large n, t approaches z — the test choice matters mainly for small samples. Degrees of freedom for t-test: df = n − 1. The critical t-valu

Hypothesis Test Calculator (z-test & t-test)

Results update automatically as you type

Enter values above to calculate