This is a beta course, so its structure, chapters, and examples may continue to change.
Comprehensive Exercises on Hypothesis Testing
Exercises
Exercise 1
Briefly describe the general steps of hypothesis testing.
hypothesis testinggeneral stepsnull and alternative hypotheses
Approach:
List the five basic steps of hypothesis testing.
Steps:
State the hypotheses: determine the null hypothesis H0 and the alternative hypothesis H1
Choose the statistic: select an appropriate test statistic
Determine the rejection region: determine the rejection region from the significance level
Compute the sample value: substitute the sample data into the test statistic
Draw a conclusion: make a decision based on the value of the test statistic
Answer: state the hypotheses → choose the statistic → determine the rejection region → compute the sample value → draw a conclusion
Exercise 2
Let X∼N(μ,σ2) with σ known. To test H0:μ=μ0, write the test statistic.
hypothesis testingZ testmean of a normal population
Approach:
Use the test statistic of the normal distribution.
Steps:
Test statistic: Z=σ/nX−μ0
Under the condition that the null hypothesis holds, Z∼N(0,1)
Answer: Z=σ/nX−μ0
Exercise 3
Explain the meaning of the Type I error and the Type II error.
hypothesis testingtwo types of errorssignificance level
Approach:
Explain the definitions and meanings of the two types of errors.
Steps:
Type I error: the error of rejecting H0 when the null hypothesis H0 is true
Type II error: the error of accepting H0 when the null hypothesis H0 is false
Probability of a Type I error: α, that is, the significance level
Probability of a Type II error: β
Answer: a Type I error is a false rejection, and a Type II error is a false acceptance
Exercise 4
For two normal populations whose variances are unknown but equal, which test should be used to test the difference of the means?
hypothesis testingchoice of methodcomparison of the means of two populations
Approach:
Choose the appropriate test method according to the testing conditions.
Steps:
Test the difference of the means of two normal populations
The variances are unknown but equal
Use the two-sample T test
Test statistic: T=Spn11+n21(X−Y)−(μ1−μ2)
Answer: the two-sample T test
Exercise 5
Let the variances of two populations be σ12,σ22. To test H0:σ12=σ22, which test should be used?
hypothesis testingchoice of methodtest for equality of variances
Approach:
Choose the appropriate test method according to the object being tested.
Steps:
Test the ratio of the variances of two normal populations
Use the F test
Test statistic: F=S22S12∼F(n1−1,n2−1)
Answer: the F test
Exercise 6
Let the significance level be α=0.05 and the P-value be P=0.03. Should the null hypothesis be rejected or accepted?
hypothesis testingP-valuesignificance level
Approach:
Compare the P-value with the significance level.
Steps:
P=0.03<α=0.05
By the P-value method, the null hypothesis is rejected when P<α
Therefore the null hypothesis should be rejected
Answer: reject the null hypothesis
Exercise 7
Let the test statistic be Z=2.5 and the significance level be α=0.05. For a two-sided test, should the null hypothesis be rejected or accepted?
hypothesis testingrejection regiontwo-sided test
Approach:
Compare the test statistic with the critical value.
Steps:
The critical value of the two-sided test: z0.025=1.96
∣Z∣=2.5>1.96
The test statistic falls inside the rejection region
Therefore the null hypothesis should be rejected
Answer: reject the null hypothesis
Exercise 8
Let X∼N(μ,σ2) with σ unknown. To test H0:μ=μ0, write the test statistic.
hypothesis testingt testmean of a normal population
Approach:
Use the test statistic of the t distribution.
Steps:
Test statistic: T=S/nX−μ0
Under the condition that the null hypothesis holds, T∼t(n−1)
Answer: T=S/nX−μ0
Exercise 9
Let X∼N(μ,σ2) with μ unknown. To test H0:σ2=σ02, write the test statistic.
hypothesis testingchi-square testvariance of a normal population
Approach:
Use the test statistic of the chi-square distribution.
Steps:
Test statistic: χ2=σ02(n−1)S2
Under the condition that the null hypothesis holds, χ2∼χ2(n−1)
Answer: χ2=σ02(n−1)S2
Exercise 10
Let the sample mean be x=52, the population standard deviation be σ=10, and the sample size be n=25. Test H0:μ=50, H1:μ=50 at the significance level α=0.05.
hypothesis testingZ testtwo-sided test
Approach:
Use the Z test for a two-sided test.
Steps:
Test statistic: Z=10/2552−50=1
Rejection region: ∣Z∣>1.96
Decision: ∣Z∣=1<1.96, so the null hypothesis is not rejected
Conclusion: the population mean equals 50
Answer: the null hypothesis is not rejected
Exercise 11
Let the sample mean be x=120, the sample standard deviation be s=8, and the sample size be n=10. Test H0:μ≤115, H1:μ>115 at the significance level α=0.05.
hypothesis testingt testone-sided test
Approach:
Use the T test for a right one-sided test.
Steps:
Test statistic: T=8/10120−115=1.98
Rejection region: T>t0.05(9)=1.833
Decision: T=1.98>1.833, so reject the null hypothesis
Conclusion: the population mean is greater than 115
Answer: reject the null hypothesis
Exercise 12
Let X∼N(μ1,σ12), Y∼N(μ2,σ22) with σ12,σ22 known. To test H0:μ1=μ2, write the test statistic.
hypothesis testingZ testmean of a normal population
Approach:
Use the test statistic of the normal distribution.
Steps:
Test statistic: Z=n1σ12+n2σ22(X−Y)−(μ1−μ2)
Under the condition that the null hypothesis holds, Z∼N(0,1)
Answer: Z=n1σ12+n2σ22(X−Y)−(μ1−μ2)
Exercise 13
Let X∼N(μ1,σ2), Y∼N(μ2,σ2) with σ2 unknown but equal. To test H0:μ1=μ2, write the test statistic.
hypothesis testingt testmean of a normal population
Approach:
Use the test statistic of the t distribution.
Steps:
Test statistic: T=Spn11+n21(X−Y)−(μ1−μ2)
Under the condition that the null hypothesis holds, T∼t(n1+n2−2)
where Sp2=n1+n2−2(n1−1)S12+(n2−1)S22
Answer: T=Spn11+n21(X−Y)−(μ1−μ2)
Exercise 14
Let X∼N(μ1,σ12), Y∼N(μ2,σ22) with μ1,μ2 unknown. To test H0:σ12=σ22, write the test statistic.
hypothesis testingF testtest for equality of variances
Approach:
Use the test statistic of the F distribution.
Steps:
Test statistic: F=S22S12
Under the condition that the null hypothesis holds, F∼F(n1−1,n2−1)
Answer: F=S22S12
Exercise 15
Let the sample mean be x=52, the sample standard deviation be s=8, and the sample size be n=16. Test H0:μ=50, H1:μ=50 at the significance level α=0.05.
hypothesis testingt testtwo-sided test
Approach:
Use the T test for a two-sided test.
Steps:
Test statistic: T=8/1652−50=1
Rejection region: ∣T∣>t0.025(15)=2.131
Decision: ∣T∣=1<2.131, so the null hypothesis is not rejected