Skip to content

Hypothesis Testing

A one-sample z-test for a mean with known σ. Both sampling distributions (null and alternative) are exactly normal, so the rejection region, the p-value tail, and the α / β / power areas are precise, not simulated. Drag the observed result, or draw a sample and watch the reject-rate approach the power.

How to use
  1. Drag the blue marker under the curve to move the observed result and see the p-value change.
  2. Adjust the sliders for μ₀, μ₁ (true mean), σ, sample size, and α. Watch the error regions and power update live.
  3. Switch the tail between two-sided, left, and right to see how the rejection region changes.
  4. Click "Draw a sample" to simulate an experiment. The empirical reject-rate will approach the theoretical power.
  5. Toggle the layers on and off with the checkboxes to compare the p-value tail to the α region.
Hypothesis test sampling distributions