Hypothesis Testing Examples in Math

Worked examples of Hypothesis Testing to try before you open each solution, then practice problems with answers.

Worked Examples

Example 1

medium
A school claims its students average 75 on standardized tests. A sample of n=36 gives xˉ=78 with σ=12. Test H0:μ=75 vs Ha:μ>75 at α=0.05.
Show solution

Answer

z=1.5, p=0.067>0.05. Fail to reject H0. Evidence is inconclusive.

First step

1.
Calculate test statistic: z=xˉ−μ0σ/n=78−7512/36=32=1.5

See the full worked solution + why-it-works coaching

SetupKey insightWhy it worksCommon pitfallConnection

Free: full solutions on 3 topics a day. No card.

Every topic, every day: the Family plan

Example 2

hard
A medication is claimed to reduce blood pressure by 10 mmHg on average. A clinical trial with n=49 patients shows xˉ=8.2 mmHg reduction, s=7 mmHg. Test H0:μ=10 vs Ha:μ≠10 at α=0.05.

Example 3

medium
A factory claims defect rate 5%. From n=400, p^=0.08. Test H0:p=0.05 vs Ha:p>0.05 at α=0.05.

Practice Problems

Try each one, then open the solution to compare your method.

Example 1

easy
State null and alternative hypotheses for each scenario: (a) testing if a coin is fair, (b) testing if a new drug reduces fever faster than the standard drug.

Example 2

hard
A teacher claims students average 80 points. A skeptic samples n=25 students: xˉ=76, s=10. Using z=xˉ−μ0s/n, test H0:μ=80 vs Ha:μ<80 at α=0.01.

Example 3

easy
In a hypothesis test, what is the null hypothesis H0 usually a statement of?

Example 4

easy
A test gives p=0.02 with α=0.05. Do you reject or fail to reject H0?

Example 5

easy
A test gives p=0.08 with α=0.05. State the conclusion.

Example 6

easy
True or false: failing to reject H0 proves H0 is true.

Example 7

easy
When must the significance level α be chosen?

Example 8

easy
A claim is 'the mean equals 100.' Write the null hypothesis symbolically.

Example 9

easy
A researcher wants to show the mean is greater than 50. What is the alternative hypothesis Ha?

Example 10

easy
Does a statistically significant result automatically mean the effect is large and important?

Example 11

medium
A test of H0:μ=100 vs Ha:μ≠100 has xˉ=104, σ=10, n=25. Compute the z test statistic.

Example 12

medium
A two-sided test has test statistic z=2. Using P(Z>2)≈0.0228, find the p-value.

Example 13

medium
With test statistic z=2, two-sided p-value 0.0456, and α=0.05, state the conclusion.

Example 14

medium
A one-sided test Ha:μ>50 has xˉ=53, σ=12, n=36. Find z.

Example 15

medium
For a right-tailed test, z=1.5 and P(Z>1.5)≈0.0668. With α=0.05, conclude.

Example 16

medium
A test rejects H0 at α=0.05 but a 95% CI for μ is (48,52) and H0:μ=50. Is this consistent?

Example 17

medium
A test of H0:μ=200 vs Ha:μ≠200 has xˉ=195, σ=20, n=16. Find z.

Example 18

challenge
Explain why we say 'fail to reject H0' rather than 'accept H0', using the courtroom analogy.

Example 19

challenge
With n very large, a trivial effect (mean differs from 100 by 0.1) becomes statistically significant. Explain the mechanism and the lesson.

Example 20

challenge
A researcher runs 20 independent tests at α=0.05 on data where every H0 is true. What is the expected number of false rejections, and what is this problem called?

Example 21

medium
A two-sided z-test has z=−1.8. Using P(Z<−1.8)≈0.0359, find the p-value and conclude at α=0.05.

Example 22

medium
A test of H0:μ=25 vs Ha:μ>25 has xˉ=28, σ=6, n=9. Find z.

Example 23

easy
A test has p=0.03 and α=0.05. State the decision and what it means.

Example 24

easy
State the null and alternative hypotheses for testing if a coin's heads probability differs from 0.5.

Example 25

easy
A z-test gives test statistic z=0.5 and P(Z>0.5)≈0.3085. Find the two-sided p-value.

Example 26

easy
For H0:μ=50 vs Ha:μ<50 with z=−2.5 and P(Z<−2.5)≈0.0062, state the conclusion at α=0.01.

Example 27

medium
For H0:μ=100 vs Ha:μ≠100 with xˉ=106, σ=10, n=25, compute the z statistic.

Example 28

medium
Continuing: with z=3 in a two-sided test, P(Z>3)≈0.00135. Find the p-value.

Example 29

medium
For H0:p=0.5 vs Ha:p>0.5, p^=0.60, n=100, compute the z statistic.

Example 30

medium
With z=2 in a right-tailed proportion test and P(Z>2)≈0.0228, conclude at α=0.05.

Example 31

medium
Compute the z statistic for H0:μ=70, xˉ=67, σ=8, n=64.

Example 32

medium
With z=−3 in a two-sided test, P(Z<−3)≈0.00135. Find p-value and conclude at α=0.01.

Example 33

medium
State which error type is committed: a court convicts an innocent defendant.

Example 34

medium
State which error type is committed: a court fails to convict a guilty defendant.

Example 35

medium
A two-sided test produces p=0.04. What is the smallest significance level at which we reject H0?

Example 36

medium
Match: α=0.05. The 95% confidence interval for μ is (48,52) and we test H0:μ=50. Decision?

Example 37

hard
A researcher runs 50 independent hypothesis tests at α=0.05 under all true nulls. What is the expected number of false rejections and the probability of at least one?

Example 38

hard
With n=100, xˉ=102, σ=10, test H0:μ=100 vs Ha:μ≠100. Compute z and the p-value (use P(Z>2)≈0.0228).

Example 39

hard
Why does increasing n (with fixed σ and effect size) tend to make any nonzero deviation statistically significant?

Example 40

hard
For H0:μ=0 vs Ha:μ>0, σ=2, the rejection region is xˉ>1.0. With true μ=1.5 and n=16, find the power.

Example 41

hard
Explain why p-hacking inflates the Type I error rate.

Example 42

challenge
For a one-sided test Ha:μ>μ0 with σ known, derive the sample size n needed to achieve power 1−β at significance α for a specified effect δ=μ1−μ0.

Example 43

challenge
Using the Bonferroni correction for m independent tests, what individual α should each test use to maintain family-wise error rate ≤0.05 with m=10?

What to focus on

Core idea: Hypothesis testing checks whether sample data is surprising enough to reject a default claim about a population.

Common stuck point: The procedure for hypothesis testing is the easy part; the trap is treating 'fail to reject H0' as 'prove H0 true'. Asking "Am I deciding whether sample data is surprising enough to reject a specific stated claim about a population?" first is what keeps a correct-looking calculation from being attached to the wrong concept.

Ask yourself: Am I deciding whether sample data is surprising enough to reject a specific stated claim about a population?

Concept recap

A systematic method to decide whether sample data provides enough evidence to reject a claim (null hypothesis) about a population parameter.

A hypothesis test works like a smoke detector. It assumes "no fire" until the smoke is too thick to blame on toast. The threshold is fixed before anything burns: a more sensitive setting (larger α) means more false alarms over toast, a less sensitive one means it may sleep through a real fire.

Read the full lesson on Hypothesis Testing

Background knowledge

These ideas may be useful before you work through the harder examples.

sampling distributionnormal distributionprobability