SDE & MLE Prep

Statistics: Hypothesis Tests, p-values & Confidence Intervals

Q: What does a p-value mean? How do you test whether a change helped?

  • Null hypothesis H₀ (no effect) vs alternative. The p-value is the probability of seeing data at least this extreme if H₀ were true — not the probability that H₀ is true, and not the size of the effect.
  • Reject H₀ when p < α (often 0.05). Type I error (false positive) rate = α; Type II error (false negative) rate = β; power = 1 − β (typically 0.8).
  • Central limit theorem: means of many independent samples are approximately normal with standard error σ/√n — why z/t-tests work on averages even when the data isn't normal.
  • 95% confidence interval for a mean: x̄ ± 1.96·σ/√n. Interpretation: the procedure captures the true mean 95% of the time.
  • Tests: z/t-test for means (Welch's t-test for unequal variances), two-proportion z-test for conversion rates, χ² for categorical counts, Mann–Whitney for skewed data, bootstrap when no formula fits (resample with replacement, take percentiles).
  • Multiple comparisons: testing 20 metrics at α = 0.05 expects one false positive → Bonferroni (α/m) or Benjamini–Hochberg (controls the false discovery rate).
  • Statistical vs practical significance: with huge samples, tiny useless effects become "significant" — report effect sizes and intervals.