Hypothesis tests: binomial, Poisson, t-test and chi-squared
A hypothesis test asks whether data is surprising if a claim is true. You compare a p-value or test statistic with a significance level and state the conclusion in context.
Each part of this topic has its own page with the formula, worked examples and a solver: Hypothesis test for a binomial proportion, Hypothesis test for the mean of a normal, Confidence interval for a mean (σ unknown), One-sample t statistic, Hypothesis test for correlation.
Closely related topics: Probability distributions, Averages and spread, Regression and correlation, Probability rules and trees.
What is it used for?
A hypothesis test decides whether data gives enough evidence against a claim. The chi-squared test compares observed counts with the counts expected under a model.
Testing whether a coin or a drug works as claimed.
Testing whether two categories are independent.
Checking whether data fits a distribution.
How to solve it
State H₀ and H₁ with the parameter.
Choose the significance level, usually 5%.
Find the probability of a result at least as extreme as observed (the p-value), or the test statistic.
Compare with the significance level or the critical value.
Write the conclusion in words, in context.
Worked examples
The examples marked with a button were worked out by the solver on this page. You can try each one yourself.
Example 1: hypothesis test binomial n=20 p=0.5 observed 15 one tail
Worked out by the solver on this page. Press the button to try it yourself.
Hypothesis test (binomial)Answer checked
Answer
Reject H0: there is evidence at the 5% level that p is greater than 0.5.
State the hypotheses
H0:p=0.5,H1:p>0.5
Under H₀, X follows a binomial distribution
X∼B(20,0.5)
Probability of a result at least as extreme as the one observed
P(X≥15)=0.0207
Compare with the significance level
0.02069≤0.05
Check: the two tails add to 1
0.020694733+0.97930527=1✓
Conclusion
Reject H0: there is evidence at the 5% level that p is greater than 0.5.
Example 2: hypothesis test binomial n=20 p=0.5 observed 12 one tail
Worked out by the solver on this page. Press the button to try it yourself.
Hypothesis test (binomial)Answer checked
Answer
Do not reject H0: not enough evidence at the 5% level.
State the hypotheses
H0:p=0.5,H1:p>0.5
Under H₀, X follows a binomial distribution
X∼B(20,0.5)
Probability of a result at least as extreme as the one observed
P(X≥12)=0.2517
Compare with the significance level
0.2517>0.05
Check: the two tails add to 1
0.25172234+0.74827766=1✓
Conclusion
Do not reject H0: not enough evidence at the 5% level.
Example 3: chi-squared test observed 20,30,50 expected 25,25,50
Worked out by the solver on this page. Press the button to try it yourself.
Chi-squared testAnswer checked
Answer
χ2=2,ν=2,critical value 5.991⇒do not reject H0
Hypotheses
H0:the data fit the model,H1:they do not
Test statistic χ² = Σ (O − E)² / E
25(20−25)2=1,25(30−25)2=1,50(50−50)2=0⇒χ2=2
Degrees of freedom = number of cells − 1
ν=2
Critical value at the 5% level with 2 degrees of freedom
χ22(5%)=5.991
Compare
2≤5.991
Conclusion
Do not reject H0: there is not enough evidence at the 5% level.
Check: χ² = Σ O²/E − N gives the same value
2✓
Example 4: Poisson hypothesis test mean 3 observed 7
Worked out by the solver on this page. Press the button to try it yourself.
Hypothesis test (Poisson)Answer checked
Answer
Reject H0: evidence at the 5% level that the mean rate is higher.
Hypotheses
H0:λ=3,H1:λ>3
Under H₀
X∼Po(3)
Probability of a result at least as extreme
P(X≥7)=0.03351
Compare with the significance level
0.03351≤0.05
Check: summing the tail directly gives the same probability
0.03351✓
Conclusion
Reject H0: evidence at the 5% level that the mean rate is higher.
Special cases
A few situations come up again and again. Knowing them saves time and helps you spot answers that cannot be right.
Binomial test
n = 20, p = 0.5, 15 successes: P(X ≥ 15) = 0.0207
Compare with 5%.
Chi-squared
O = 20, 30, 50; E = 25, 25, 50: 2
Σ(O − E)²/E.
Degrees of freedom
2 × 2 table: 1
(r − 1)(c − 1).
t statistic
x̄ = 52, μ₀ = 50, s = 8, n = 16: 1
(x̄ − μ₀)/(s/√n).
Word problems
State the hypotheses, find the test statistic or tail probability, compare with the significance level, and conclude in context.
Binomial test
n = 20, p = 0.5, observed 15: find P(X ≥ 15).
Add the tail21 700 ÷ 1 048 576
Check: 0.0207 < 0.05, so reject H₀ ✓0.0207
Chi-squared
Observed 20, 30, 50; expected 25, 25, 50.
Terms25/25 + 25/25 + 0
Sum2
Check: 2 on 2 degrees of freedom ✓2
Degrees of freedom Higher
2 × 2 contingency table.
(r − 1)(c − 1)1 × 1
Check: 1 ✓1
t test Higher
x̄ = 52, μ₀ = 50, s = 8, n = 16.
SE8/4 = 2
t2/2
Check: 1 on 15 degrees of freedom ✓1
Common mistakes
Concluding the null is true
H₀ proved ✗
not enough evidence against it ✓
Wording matters.
Using the wrong tail
two-tailed for a one-tailed claim ✗
follow H₁ ✓
Direction.
Forgetting expected counts ≥ 5
ignoring ✗
combine classes ✓
Validity.
Wrong degrees of freedom
n ✗
n − 1 or (r − 1)(c − 1) ✓
Count carefully.
Exam tips
State H₀ and H₁.
One- or two-tailed?
Compare with α.
Conclude in context.
Expected ≥ 5 for chi-squared.
Practice questions
Try each one on paper, then open the answer. Use the solver above to see the full working.
1. χ²: O = 18, 22; E = 20, 20 Foundation
0.4
2. χ²: O = 10, 30; E = 20, 20 Foundation
10
3. Degrees of freedom for a 3 × 4 table Foundation
6
4. t: x̄ = 105, μ₀ = 100, s = 10, n = 25 Higher
2.5
5. P(X ≥ 9) for B(10, 0.5) (4 dp) Higher
0.0107
6. Degrees of freedom for 5 categories, none estimated Higher
4
Practice generator
Unlimited fresh questions with instant marking. Choose a level, work it out on paper, then type your answer.
Solve: …
Key terms
Null hypothesis
H₀, the claim tested.
Alternative hypothesis
H₁.
Significance level
α, e.g. 5%.
p-value
Probability of a result this extreme.
Chi-squared statistic
Σ(O − E)²/E.
Degrees of freedom
Free values in the statistic.
Frequently asked questions
What is a hypothesis test?
A way to decide whether data is evidence against a claim.