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:

  1. State the hypotheses: determine the null hypothesis H0H_0 and the alternative hypothesis H1H_1
  2. Choose the statistic: select an appropriate test statistic
  3. Determine the rejection region: determine the rejection region from the significance level
  4. Compute the sample value: substitute the sample data into the test statistic
  5. 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)X \sim N(\mu, \sigma^2) with σ\sigma known. To test H0:μ=μ0H_0: \mu=\mu_0, write the test statistic.

hypothesis testingZ testmean of a normal population

Approach: Use the test statistic of the normal distribution.

Steps:

  1. Test statistic: Z=X‾−μ0σ/nZ = \frac{\overline{X} - \mu_0}{\sigma/\sqrt{n}}
  2. Under the condition that the null hypothesis holds, Z∼N(0,1)Z \sim N(0,1)

Answer: Z=X‾−μ0σ/nZ = \frac{\overline{X} - \mu_0}{\sigma/\sqrt{n}}

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:

  1. Type I error: the error of rejecting H0H_0 when the null hypothesis H0H_0 is true
  2. Type II error: the error of accepting H0H_0 when the null hypothesis H0H_0 is false
  3. Probability of a Type I error: α\alpha, that is, the significance level
  4. Probability of a Type II error: β\beta

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:

  1. Test the difference of the means of two normal populations
  2. The variances are unknown but equal
  3. Use the two-sample T test
  4. Test statistic: T=(X‾−Y‾)−(μ1−μ2)Sp1n1+1n2T = \frac{(\overline{X} - \overline{Y}) - (\mu_1 - \mu_2)}{S_p\sqrt{\frac{1}{n_1} + \frac{1}{n_2}}}

Answer: the two-sample T test

Exercise 5

Let the variances of two populations be σ12,σ22\sigma_1^2, \sigma_2^2. To test H0:σ12=σ22H_0: \sigma_1^2=\sigma_2^2, 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:

  1. Test the ratio of the variances of two normal populations
  2. Use the F test
  3. Test statistic: F=S12S22∼F(n1−1,n2−1)F = \frac{S_1^2}{S_2^2} \sim F(n_1-1, n_2-1)

Answer: the F test

Exercise 6

Let the significance level be α=0.05\alpha = 0.05 and the P-value be P=0.03P = 0.03. Should the null hypothesis be rejected or accepted?

hypothesis testingP-valuesignificance level

Approach: Compare the P-value with the significance level.

Steps:

  1. P=0.03<α=0.05P = 0.03 < \alpha = 0.05
  2. By the P-value method, the null hypothesis is rejected when P<αP < \alpha
  3. Therefore the null hypothesis should be rejected

Answer: reject the null hypothesis

Exercise 7

Let the test statistic be Z=2.5Z = 2.5 and the significance level be α=0.05\alpha = 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:

  1. The critical value of the two-sided test: z0.025=1.96z_{0.025} = 1.96
  2. ∣Z∣=2.5>1.96|Z| = 2.5 > 1.96
  3. The test statistic falls inside the rejection region
  4. Therefore the null hypothesis should be rejected

Answer: reject the null hypothesis

Exercise 8

Let X∼N(μ,σ2)X \sim N(\mu, \sigma^2) with σ\sigma unknown. To test H0:μ=μ0H_0: \mu=\mu_0, write the test statistic.

hypothesis testingt testmean of a normal population

Approach: Use the test statistic of the t distribution.

Steps:

  1. Test statistic: T=X‾−μ0S/nT = \frac{\overline{X} - \mu_0}{S/\sqrt{n}}
  2. Under the condition that the null hypothesis holds, T∼t(n−1)T \sim t(n-1)

Answer: T=X‾−μ0S/nT = \frac{\overline{X} - \mu_0}{S/\sqrt{n}}

Exercise 9

Let X∼N(μ,σ2)X \sim N(\mu, \sigma^2) with μ\mu unknown. To test H0:σ2=σ02H_0: \sigma^2=\sigma_0^2, write the test statistic.

hypothesis testingchi-square testvariance of a normal population

Approach: Use the test statistic of the chi-square distribution.

Steps:

  1. Test statistic: χ2=(n−1)S2σ02\chi^2 = \frac{(n-1)S^2}{\sigma_0^2}
  2. Under the condition that the null hypothesis holds, χ2∼χ2(n−1)\chi^2 \sim \chi^2(n-1)

Answer: χ2=(n−1)S2σ02\chi^2 = \frac{(n-1)S^2}{\sigma_0^2}

Exercise 10

Let the sample mean be x‾=52\overline{x} = 52, the population standard deviation be σ=10\sigma = 10, and the sample size be n=25n = 25. Test H0:μ=50H_0: \mu = 50, H1:μ≠50H_1: \mu \neq 50 at the significance level α=0.05\alpha = 0.05.

hypothesis testingZ testtwo-sided test

Approach: Use the Z test for a two-sided test.

Steps:

  1. Test statistic: Z=52−5010/25=1Z = \frac{52 - 50}{10/\sqrt{25}} = 1
  2. Rejection region: ∣Z∣>1.96|Z| > 1.96
  3. Decision: ∣Z∣=1<1.96|Z| = 1 < 1.96, so the null hypothesis is not rejected
  4. Conclusion: the population mean equals 50

Answer: the null hypothesis is not rejected

Exercise 11

Let the sample mean be x‾=120\overline{x} = 120, the sample standard deviation be s=8s = 8, and the sample size be n=10n = 10. Test H0:μ≤115H_0: \mu \leq 115, H1:μ>115H_1: \mu > 115 at the significance level α=0.05\alpha = 0.05.

hypothesis testingt testone-sided test

Approach: Use the T test for a right one-sided test.

Steps:

  1. Test statistic: T=120−1158/10=1.98T = \frac{120 - 115}{8/\sqrt{10}} = 1.98
  2. Rejection region: T>t0.05(9)=1.833T > t_{0.05}(9) = 1.833
  3. Decision: T=1.98>1.833T = 1.98 > 1.833, so reject the null hypothesis
  4. Conclusion: the population mean is greater than 115

Answer: reject the null hypothesis

Exercise 12

Let X∼N(μ1,σ12)X \sim N(\mu_1, \sigma_1^2), Y∼N(μ2,σ22)Y \sim N(\mu_2, \sigma_2^2) with σ12,σ22\sigma_1^2, \sigma_2^2 known. To test H0:μ1=μ2H_0: \mu_1 = \mu_2, write the test statistic.

hypothesis testingZ testmean of a normal population

Approach: Use the test statistic of the normal distribution.

Steps:

  1. Test statistic: Z=(X‾−Y‾)−(μ1−μ2)σ12n1+σ22n2Z = \frac{(\overline{X} - \overline{Y}) - (\mu_1 - \mu_2)}{\sqrt{\frac{\sigma_1^2}{n_1} + \frac{\sigma_2^2}{n_2}}}
  2. Under the condition that the null hypothesis holds, Z∼N(0,1)Z \sim N(0,1)

Answer: Z=(X‾−Y‾)−(μ1−μ2)σ12n1+σ22n2Z = \frac{(\overline{X} - \overline{Y}) - (\mu_1 - \mu_2)}{\sqrt{\frac{\sigma_1^2}{n_1} + \frac{\sigma_2^2}{n_2}}}

Exercise 13

Let X∼N(μ1,σ2)X \sim N(\mu_1, \sigma^2), Y∼N(μ2,σ2)Y \sim N(\mu_2, \sigma^2) with σ2\sigma^2 unknown but equal. To test H0:μ1=μ2H_0: \mu_1 = \mu_2, write the test statistic.

hypothesis testingt testmean of a normal population

Approach: Use the test statistic of the t distribution.

Steps:

  1. Test statistic: T=(X‾−Y‾)−(μ1−μ2)Sp1n1+1n2T = \frac{(\overline{X} - \overline{Y}) - (\mu_1 - \mu_2)}{S_p\sqrt{\frac{1}{n_1} + \frac{1}{n_2}}}
  2. Under the condition that the null hypothesis holds, T∼t(n1+n2−2)T \sim t(n_1 + n_2 - 2)
  3. where Sp2=(n1−1)S12+(n2−1)S22n1+n2−2S_p^2 = \frac{(n_1-1)S_1^2 + (n_2-1)S_2^2}{n_1 + n_2 - 2}

Answer: T=(X‾−Y‾)−(μ1−μ2)Sp1n1+1n2T = \frac{(\overline{X} - \overline{Y}) - (\mu_1 - \mu_2)}{S_p\sqrt{\frac{1}{n_1} + \frac{1}{n_2}}}

Exercise 14

Let X∼N(μ1,σ12)X \sim N(\mu_1, \sigma_1^2), Y∼N(μ2,σ22)Y \sim N(\mu_2, \sigma_2^2) with μ1,μ2\mu_1, \mu_2 unknown. To test H0:σ12=σ22H_0: \sigma_1^2 = \sigma_2^2, write the test statistic.

hypothesis testingF testtest for equality of variances

Approach: Use the test statistic of the F distribution.

Steps:

  1. Test statistic: F=S12S22F = \frac{S_1^2}{S_2^2}
  2. Under the condition that the null hypothesis holds, F∼F(n1−1,n2−1)F \sim F(n_1-1, n_2-1)

Answer: F=S12S22F = \frac{S_1^2}{S_2^2}

Exercise 15

Let the sample mean be x‾=52\overline{x} = 52, the sample standard deviation be s=8s = 8, and the sample size be n=16n = 16. Test H0:μ=50H_0: \mu = 50, H1:μ≠50H_1: \mu \neq 50 at the significance level α=0.05\alpha = 0.05.

hypothesis testingt testtwo-sided test

Approach: Use the T test for a two-sided test.

Steps:

  1. Test statistic: T=52−508/16=1T = \frac{52 - 50}{8/\sqrt{16}} = 1
  2. Rejection region: ∣T∣>t0.025(15)=2.131|T| > t_{0.025}(15) = 2.131
  3. Decision: ∣T∣=1<2.131|T| = 1 < 2.131, so the null hypothesis is not rejected
  4. Conclusion: the population mean equals 50

Answer: the null hypothesis is not rejected

Found an issue with this content?

Tell us what could be improved.