Concepts of Hypothesis Testing

Fei Ye

January 2024

1. Learning Goals


2. The Basic Idea of Hypothesis Testing


3. Two Hypotheses


4. Example: Identify Null and Alternative Hypotheses

  1. Test a statement that the population mean is 1.
  2. Test a statement that the population mean is more than 3.
  3. Test a statement that the population mean is no more than 3.

Solution: Keep in mind that the null hypothesis should always contain the equal sign. The alternative hypothesis is contrary to the null hypothesis.

  1. We may set the null hypothesis as \(H_0\): \(μ = 1\). Depending on the given information, otherwise, we may set the alternative hypothesis as \(H_a\): \(μ\ne 1\).
  2. We may set the null hypothesis as \(H_0\): \(μ = 3\) and the alternative hypothesis as \(H_a\): \(μ>3\).
  3. We may set the null hypothesis as \(H_0\): \(μ \le 3\) and the alternative hypothesis as \(H_a\): \(μ>3\).

5. The Logic of Hypothesis Testing

The logic of hypothesis testing and two types of error can be summarized in the following table.

\(H_0\) is true \(H_0\) is false
Reject \(H_0\) Type I Error Correct decision
Fail to Reject \(H_0\) Correct decision Type II Error

The interpretation of hypothesis testing is summarized in the following table.

If the claim to be tested is in \(H_0\) If the claim to be tested is in \(H_a\)
Reject \(H_0\) There is enough evidence to reject the claim There is enough evidence to support the claim
Fail to Reject \(H_0\) There is not enough evidence to reject the claim There is not enough evidence to support the claim

6. Type of Errors in Hypothesis Testing

Type 1 and Type 2 Errors

Source: An illustration of errors. See also the interactive demonstration of errors and the power.


7. Type of Tests


8. Observed Significance


9. Example: Make a Decision Using the \(P\)-value

Consider the following testing hypotheses

\(H_{0}: p=0.50\) vs. \(H_{a}: p\ne 0.50, n=360, \hat{p}=0.56\).

Find the \(P\)-value for the test and make a decision at the 5% level of significance.

Solution: Because \(H_a\) is \(p\ne p_0\) and \(\hat{p}=0.56>p_0\), the \(P\)-value is the double of the right tail area, that is, the \(P\)-value equals \(2P(\hat{p}>0.56)\).

We first find the standard error of the null distribution: $$\text{SE}=\sqrt{p_0(1-p_0)/n}=\sqrt{0.5\cdot0.5/360}=0.03.$$

The \(P\)-value is approximately 0.0455 which can be calculated by the Excel function 2*(1-NORM.DIST(0.56,0.5,0.03,TRUE).

Since the \(P\)-value is smaller than \(\alpha\), we reject the null hypothesis \(H_0\).


Practice: Conceptual Understanding

Decide whether the following statements are true or false. Explain your reasoning.

More conceptual questions on hypothesis testing


Practice: Determine the Type of Test


Practice: Find the \(P\)-value

Suppose we’re conducting a hypothesis testing for a population mean. Find the \(P\)-value for each of the following testing scenario with the given sample size \(n\) and the test statistics \(t\).


Practice: Make a Decision


Practice: Interpret a Decision


Lab Instructions in Excel


10. Normal Distribution for Hypothesis Testing


11. \(t\)-Distribution for Hypothesis Testing

Suppose a Student’s \(t\)-distribution has the degree of freedom \(\text{df}=n-1\).


Lab Practice: Testing Mean with \(\sigma\)

Suppose the population standard deviation is \(\sigma=4.3\). At the significance level \(\alpha=0.02\), construct the a standardized rejection region for the following test for the population mean

Test \(H_0: \mu=21.6\) vs. \(H_a: \mu<21.6\).

Make a decision if a random sample has the size \(n=70\) and mean \(\bar{x}=20.5\).