Hypothesis Testing: The p-value
Problem
A coin is flipped 100 times and lands heads 60 times. Is it fair? Compute the p-value and show the rejection region.
Explanation
What is hypothesis testing?
Hypothesis testing asks: "Is the observed result significantly different from what we'd expect by chance?" We set up a null hypothesis (the default assumption), compute how unlikely our data would be under that assumption, and decide whether to reject it.
Step-by-step: Is this coin fair?
Step 1 — State the hypotheses.
: (the coin is fair — null hypothesis).
: (the coin is biased — alternative hypothesis).
Step 2 — Collect data. 100 flips, 60 heads. .
Step 3 — Compute the test statistic. Under , has mean and standard error :
Step 4 — Find the p-value. This is the probability of observing a test statistic as extreme as under (two-tailed):
Step 5 — Compare to significance level .
Decision: Reject . There is statistically significant evidence that the coin is biased.
What the p-value means
The p-value is the probability of seeing results at least as extreme as ours, assuming the null hypothesis is true. A small p-value () means the data is unlikely under — evidence against it.
- p-value < 0.05: "statistically significant" (reject )
- p-value ≥ 0.05: "not significant" (fail to reject — this does NOT prove is true)
Try it in the visualization
Adjust the number of flips and heads. The normal curve shows the test statistic, rejection region (red shading), and p-value. When p < α, the decision flips to "reject."
Interactive Visualization
Parameters
Got your own math or physics problem?
Turn any problem into an interactive visualization like this one — powered by AI, generated in seconds. Free to try, no credit card required.