Start with the recap, study the fully worked examples, then use the practice problems to
check your understanding of Hypothesis Testing.
This page combines explanation, solved examples, and follow-up practice so you can move
from recognition to confident problem-solving in Statistics.
Concept Recap
Hypothesis testing is a formal statistical procedure for using sample data to decide between two competing claims about a population parameter. You state a null hypothesis (no effect) and an alternative hypothesis, collect data, compute a test statistic, and determine whether the evidence is strong enough to reject the null.
Hypothesis testing is like a courtroom trial for data. You start by assuming innocence (null hypothesis: nothing special is happening). Then you look at the evidence (data). If the evidence is strong enough to be very unlikely under the assumption of innocence, you reject it and conclude something real is happening.
Read the first worked example with the solution open so the structure is clear.
Try the practice problems before revealing each solution.
Use the related concepts and background knowledge badges if you feel stuck.
What to Focus On
Core idea:Hypothesis Testing uses a sample result and a variation model to make a careful population statement.
Common stuck point:Students often know a procedure related to hypothesis testing but skip the recognition step: Am I using sample-to-sample variation to make a population claim with uncertainty stated clearly? That leads to a calculation or graph that looks reasonable but answers a different question.
Sense of Study hint:Ask: Am I using sample-to-sample variation to make a population claim with uncertainty stated clearly?
Worked Examples
Example 1
medium
A sample of n=36 has mean xˉ=52 and known σ=6. Test H0:μ=50 vs. Ha:μ=50. Compute the z-test statistic.
Answer
z=2
First step
1
Standard error: σ/n=6/36=1.
See the full worked solution + why-it-works coaching
Setup·Key insight·Why it works·Common pitfall·Connection
Power of a test equals 1−β. If β=0.20, what is the power?
Example 3
hard
A factory's mean weight is supposed to be μ0=100 g. A sample of n=25 has xˉ=98 and s=5. Compute the t-statistic for H0:μ=100.
Example 4
hard
An 80% confidence interval for μ is (48.5,51.5). Does a two-sided test of H0:μ=50 at α=0.20 reject?
Example 5
medium
A coin is flipped 100 times and lands heads 60 times. Test H0:p=0.5 vs. Ha:p=0.5. Compute z.
Example 6
challenge
Two researchers test the same hypothesis at α=0.05. The chance both make a Type I error (when H0 is true and tests are independent) is approximately what?
Example 7
medium
A coin is flipped 100 times and lands heads 60. Use H0:p=0.5 vs Ha:p=0.5 and SE =0.5⋅0.5/100=0.05. Compute z.
Example 8
medium
A sample has xˉ=52, s=8, n=64. Test H0:μ=50 vs Ha:μ=50. Compute t.
Example 9
medium
We test H0:p=0.3 vs Ha:p>0.3 with p^=0.35, n=100, SE under H0=0.3⋅0.7/100≈0.0458. Compute z.
Example 10
hard
Two independent samples have xˉ1=20,s1=4,n1=50 and xˉ2=18,s2=5,n2=50. Test H0:μ1=μ2 vs Ha:μ1=μ2. Compute t using SE=s12/n1+s22/n2.
Example 11
hard
A paired-sample test of n=25 differences has dˉ=3, sd=10. Test H0:μd=0. Compute t.
Example 12
challenge
Test H0:p=0.5 vs Ha:p>0.5. Out of n=400, 220 successes. Compute z using SE under H0.
Example 13
hard
A company claims its light bulbs last an average of 1000 hours. A sample of 50 bulbs has xˉ=985 hours with σ=40. Set up the null and alternative hypotheses for a two-tailed test.
Example 14
hard
Continuing the light bulb example (H0:μ=1000, n=50, xˉ=985, σ=40), calculate the test statistic.
Practice Problems
Try these problems on your own first, then open the solution to compare your method.
Example 1
easy
In hypothesis testing, what does the null hypothesis H0 typically state?
Example 2
easy
What is the alternative hypothesis Ha?
Example 3
easy
In a hypothesis test, which hypothesis do we assume true while computing evidence?
Example 4
easy
What do we do when the evidence against H0 is strong enough?
Example 5
easy
True or false: failing to reject H0 proves the null is true.
Example 6
easy
A test statistic measures how far the sample result is from H0 in units of what?
Example 7
easy
Fill in: hypothesis testing decides between two competing claims about a population ____.
Example 8
easy
Order the steps: (a) compute test statistic, (b) state hypotheses, (c) decide. What is the correct sequence?
Example 9
medium
A sample mean is 105, the null claims μ0=100, and SE =2.5. Compute the test statistic z.
Example 10
medium
State H0 and Ha for testing whether a coin is biased toward heads (p = probability of heads).
Example 11
medium
A test gives z=2 for a two-sided alternative. Roughly what is the p-value (use that beyond ∣z∣=2 is about 5%)?
Example 12
medium
A two-sided test gives z=2 (p ≈0.05). At α=0.05, what is the decision?
Example 13
medium
A new drug shows a tiny, clinically meaningless improvement, but the test rejects H0 with n=100,000. What does this illustrate?
Example 14
medium
Why must hypotheses be stated before collecting or examining the data?
Example 15
medium
A one-sided test of Ha:μ>50 gives z=1.7. The upper-tail area beyond z=1.7 is about 0.045. At α=0.05, decide.
Example 16
medium
In the courtroom analogy, what plays the role of the null hypothesis?
Example 17
medium
A sample of n=49 gives xˉ=53, the null claims μ0=50, and σ=14. Compute the test statistic z.
Example 18
challenge
A sample of n=64 gives xˉ=52, σ=8, testing H0:μ=50 vs Ha:μ>50. Compute z and decide at α=0.05 (one-sided z∗=1.645).
Example 19
challenge
Explain the difference between a Type I and a Type II error in hypothesis testing.
Example 20
challenge
A study tests 20 independent hypotheses, each at α=0.05, with all nulls actually true. About how many false 'significant' results are expected?
Example 21
easy
A coffee company claims its bags contain 250 g. State H0 for testing whether the true mean weight differs from 250 g.
Example 22
easy
A teacher believes a new method increases mean test scores above the historical mean of 72. State Ha.
Example 23
easy
At significance level α=0.05, a p-value of 0.03 leads to what decision about H0?
Example 24
easy
At α=0.01, a p-value of 0.04 leads to what decision about H0?
Example 25
medium
For Ha:μ>50 with z=2, find the approximate p-value (use P(Z>2)≈0.0228).
Example 26
medium
For Ha:μ=50 with z=2, find the approximate two-sided p-value (use P(Z>2)≈0.0228).
Example 27
medium
A drug company tests whether its pill lowers blood pressure (Ha:μ<130). State the direction of the rejection region for a z-test.
Example 28
medium
A two-proportion z-test compares p^1=0.40 and p^2=0.50 with SE of the difference =0.05. Compute the z-statistic.
Example 29
medium
A claim says 'at least 60% approve.' A pollster wants to test against this claim. State Ha if she suspects approval is lower.
Example 30
hard
For a t-test with n=25, how many degrees of freedom does the t-distribution have?
Example 31
hard
A test has α=0.05 and observed p-value =0.051. State and justify the decision.
Example 32
hard
Doubling the sample size (other things equal) changes the standard error by what factor?
Example 33
hard
A chi-square goodness-of-fit test has 4 categories with no estimated parameters. How many degrees of freedom?
Example 34
challenge
If 20 independent tests are run at α=0.05 when all nulls are true, what is the expected number of false rejections?
Example 35
easy
True or false: if p>α, we reject H0.
Example 36
easy
Which hypothesis carries the burden of proof?
Example 37
easy
If a two-sided test gives z=−2.5, is the result statistically significant at α=0.05?
Example 38
medium
A drug trial wants to detect whether the drug raises the cure rate above 50%. Write H0 and Ha.
Example 39
medium
A test gives z=1.5 (two-sided). The two-tailed p-value is roughly 0.134. At α=0.05, what is the decision?
Example 40
medium
Which is the better description of α: (A) the probability H0 is true; (B) the probability we wrongly reject a true H0?
Example 41
medium
Which decision is consistent with a 95% CI for μ−μ0 that contains 0?
Example 42
medium
If we shrink α from 0.05 to 0.01, what happens to (i) Type I error rate, (ii) Type II error rate?
Example 43
hard
An advertiser tests 20 independent claims at α=0.05 each. If every H0 is true, about how many will be 'significant' by chance?
Example 44
hard
Why is 'fail to reject H0' weaker than 'accept H0'?
Example 45
hard
Why might a researcher use a one-sided test rather than two-sided?
Example 46
medium
True or false: a statistically significant result with p=0.04 always means the practical effect is meaningful.
Example 47
medium
A class average is claimed to be 70. We test H0:μ=70 vs Ha:μ<70. A sample gives xˉ=69 with z=−0.8. Are we 'getting evidence the average is lower'?
Example 48
hard
An experimenter runs the test, gets p=0.07, then collects more data and stops when p first drops below 0.05. Why is this wrong?
Example 49
hard
A school claims students sleep an average of 8 hours. A sample of 36 students has xˉ=7.5 with σ=1.2. State the hypotheses for a one-tailed test (testing if students sleep less) and compute the z-statistic.
Example 50
hard
In a two-tailed z-test at α=0.05, the test statistic is z=2.10. Using critical values ±1.96, should H0 be rejected?