Hypothesis Testing — Reject Regions & p-values
Drag through two-sided and one-sided tests, watch α and the rejection region move, and see p-values take shape in real time. The anatomy of a z-test, visualized.
Hypothesis Testing
Think of testing as a trial.
You start by assuming H₀ ("the drug has no effect" = "innocent"). Then if your computed test statistic z lands in the pre-chosen rejection region, you convict — that is, reject H₀.
Two panels below: ① geometry of z and rejection regions (two-sided, right, left), and ② false alarms (α) vs. misses (β).
▶ ① Basics: z-statistic & rejection region
▶ ② Two kinds of errors: α, β, power
Testing has two kinds of mistakes.
Type I error α: rejecting H₀ when it's actually true (false alarm).
Type II error β: failing to reject H₀ when H₁ is actually true (a miss).
And 1 − β is the power.
Change effect size δ or α: the blue (H₀) and purple (H₁) curves fight it out — you can literally see the trade-off "fewer false alarms = more misses".
Tip: drag horizontally on the chart to slide the critical boundary (α).