6b.1 - Steps in Conducting a Hypothesis Test for \(\mu\)

Six Steps for Conducting a One-Sample Mean Hypothesis Test

Steps 1-3 Section

Let's apply the general steps for hypothesis testing to the specific case of testing a one-sample mean.

Step 1: Set up the hypotheses and check conditions.

One Mean t-test Hypotheses

Left-Tailed
\( H_0\colon \mu=\mu_0 \)
\( H_a\colon \mu<\mu_0\)
Right-Tailed
\( H_0\colon \mu=\mu_0 \)
\( H_a\colon \mu>\mu_0 \)
Two-Tailed
\( H_0: \mu=\mu_0 \)
\( H_a: \mu\ne \mu_0 \)

Conditions: The data comes from an approximately normal distribution or the sample size is at least 30.


Step 2: Decide on the significance level, \(\alpha \).
Typically, 5%. If \(\alpha\) is not specified, use 5%.

Step 3: Calculate the test statistic.

One Mean t-test: \( t^*=\dfrac{\bar{x}-\mu_0}{\frac{s}{\sqrt{n}}} \)

The first few steps (Step 1 - Step 3) are exactly the same as the rejection region or the p-value approach. The next part will discuss steps 4 - 6 for both approaches.

Rejection Region Approach

Steps 4-6 Section

Step 4: Find the appropriate critical values for the tests. Write down clearly the rejection region for the problem.
𝛼 t 𝛼
Normal curve with a left tailed test shaded.

Reject \(H_0\) if \(t^* \le t_\alpha\)

𝛼 1-𝛼 t 1-𝛼
Normal curve with a right tailed test shaded.

Reject \(H_0\) if \(t^* \ge t_{1-\alpha}\)

𝛼/2 1-𝛼 t 1-𝛼/2 𝛼/2 t 𝛼/2
Normal curve with a two-tailed test shaded

Reject \(H_0\) if \(|t^*| \ge |t_{\alpha/2}|\)


Step 5: Make a decision about the null hypothesis.
Check to see if the value of the test statistic falls in the rejection region. If it does, then reject \(H_0 \) (and conclude \(H_a \)). If it does not fall in the rejection region, do not reject \(H_0 \). 

Step 6: State an overall conclusion.

P-Value Approach

Steps 4-6 Section

Step 4: Compute the appropriate p-value based on our alternative hypothesis.
  • If \(H_a \) is right-tailed, then the p-value is the probability the sample data produces a value equal to or greater than the observed test statistic.
  • If \(H_a \) is left-tailed, then the p-value is the probability the sample data produces a value equal to or less than the observed test statistic.
  • If \(H_a \) is two-tailed, then the p-value is two times the probability the sample data produces a value equal to or greater than the absolute value of the observed test statistic.
Left-Tailed
\(P(t \le t^*)\)
Right-Tailed
\(P(t\ge t^*)\)
Two-Tailed
\(2\) x \(P(t \ge |t^*|)\)
Step 5: Make a decision about the null hypothesis.
If the p-value is less than the significance level, \(\alpha\), then reject \(H_0\) (and conclude \(H_a \)). If it is greater than the significance level, then do not reject \(H_0 \).
Step 6: State an overall conclusion.
 

Example 6-7 Length of Lumber Section

Continuing with our lumber example, the mean length of the lumber is supposed to be 8.5 feet. A builder wants to check whether the shipment of lumber she receives has a mean length different from 8.5 feet. If the builder observes that the sample mean of 61 pieces of lumber is 8.3 feet with a sample standard deviation of 1.2 feet, what will she conclude? Conduct this test at a 1% level of significance.

Conduct the test using the Rejection Region approach and the p-value approach.

Answer
Step 1: Set up the hypotheses and check conditions.

Set up the hypotheses (since the research hypothesis is to check whether the mean is different from 8.5, we set it up as a two-tailed test):

\( H_0\colon \mu=8.5 \) vs. \(H_a\colon \mu\ne 8.5 \)

Can we use the t-test? The answer is yes since the sample size of 61 is sufficiently large (greater than 30).

Step 2: Decide on the significance level, \(\alpha \).
According to the question, \(\alpha = 0.01 \).
Step 3: Calculate the test statistic.
\begin{align}  t^*&=\dfrac{\bar{x}-\mu_0}{\frac{s}{\sqrt{n}}}\\&=\dfrac{8.3-8.5}{\frac{1.2}{\sqrt{61}}}\\&=-1.3 \end{align}

Steps 4-6

Step 4: Find the appropriate critical values for the tests. Write down clearly the rejection region for the problem.
From the table and with degrees of freedom of 61-1=60, the critical value is \(t_{\alpha/2}=t_{0.005}=2.660 \). The rejection region for the two-tailed test is given by:

\( t^*\le -2.660 \) or \(t^*\ge 2.660 \)

*Recall how to use to Minitab or t-table to find the t percentiles (Lesson 5.4)
Step 5: Make a decision about the null hypothesis.
The observed t-value, or test statistic, is -1.3. Since \(t^* \) does not fall within the rejection region, we fail to reject \(H_0 \).
Step 6: State an overall conclusion.
With a test statistic of -1.3 and critical value of ± 2.660 at a 1% level of significance, we do not have enough statistical evidence to reject the null hypothesis. We conclude that there is not enough statistical evidence that indicates that the mean length of lumber differs from 8.5 feet.
Step 4: Compute the appropriate p-value based on our alternative hypothesis.
\begin{align} \text{p-value}&=2P(T>|t^*|)\\&=2P\left(T>\left|\frac{\bar{x}-\mu_0}{\frac{s}{\sqrt{n}}}\right|\right)\\&=2P\left(T>\left|\frac{8.3-8.5}{\frac{1.2}{\sqrt{61}}}\right|\right)\\&=2P(T>|-1.3|)\\&=2P(T>1.3) \end{align}.
From the t-table going across the row for 60 degrees of freedom, we do not find a value equal to 1.3. Without software to find a more exact probability, the best we can do from the t-table is find a range. We do see that the value falls between 1.296 and 1.671. These two t-values correspond to right-tail probabilities of 0.1 and 0.05, respectively. Since 1.3 is between these two t-values, then it stands to reason that the probability to the right of 1.3 would fall between 0.05 and 0.1. Therefore, the p-value would be = 2×(0.05 and 0.1) or from 0.1 to 0.2.
Step 5: Make a decision about the null hypothesis.
With this range of possible p-values exceeding our 1% level of significance for the test, we fail to reject the null hypothesis.
Step 6: State an overall conclusion.
With a test statistic of - 1.3 and p-value between 0.1 to 0.2, we fail to reject the null hypothesis at a 1% level of significance since the p-value would exceed our significance level. We conclude that there is not enough statistical evidence that indicates that the mean length of lumber differs from 8.5 feet.

Try it!

Emergency Room Wait Time Section

Waiting room

The administrator at your local hospital states that on weekends the average wait time for emergency room visits is 10 minutes. Based on discussions you have had with friends who have complained on how long they waited to be seen in the ER over a weekend, you dispute the administrator's claim. You decide to test your hypothesis. Over the course of a few weekends, you record the wait time for 40 randomly selected patients. The average wait time for these 40 patients is 11 minutes with a standard deviation of 3 minutes.

Do you have enough evidence to support your hypothesis that the average ER wait time exceeds 10 minutes? You opt to conduct the test at a 5% level of significance.

Step 1: Set up the hypotheses and check conditions.

At this point we want to check whether we can apply the central limit theorem. The sample size is greater than 30, so we should be okay.

This is a right-tailed test.

\( H_0\colon \mu=10 \) vs \(H_a\colon \mu>10 \)

Step 2: Decide on the significance level, \(\alpha \).
The problem states that \(\alpha=0.05 \).
Step 3: Calculate the test statistic.
\begin{align} t^*&=\dfrac{\bar{x}-\mu_0}{\frac{s}{\sqrt{n}}}\\&=\dfrac{11-10}{\frac{3}{\sqrt{40}}}\\&=2.11 \end{align}

Steps 4-6

Step 4: Find the appropriate critical values for the tests. Write down clearly the rejection region for the problem.
The degrees of freedom for this test are \(n-1=40-1=39 \). The alternative is right-tailed. Therefore, we want to find the value, \(t_{0.05} \), such that \(P(T\ge t_{0.05})=0.05 \).

Using the table from the text, it shows 35 and 40 degrees of freedom. We would use 35 degrees of freedom. With \(\alpha=0.05 \) , we see a value of 1.69. The critical value is 1.69 and the rejection region is any \(t^* \) such that \(t^*\ge 1.69 \) .

Note! If we used software (discussed in the next section), we will find the critical value to be 1.685.

Step 5: Make a decision about the null hypothesis.
Our test statistic, 2.11, is greater than our critical value of 1.69 and therefore is in the rejection region. We would reject the null hypothesis.
Step 6. State the conclusion in words.
There is enough evidence, at a significance level of 5%, to reject the null hypothesis and conclude that the mean waiting time is greater than 10 minutes.
Step 4: Compute the appropriate p-value based on our alternative hypothesis.
Again, using the table with 35 degrees of freedom, our test statistic is 2.11 and is between 2.030 and 2.438. This corresponds to a p-value between 0.01 and 0.025.

 

Note! If we use software, the p-value is 0.0207.


Step 5: Make a decision about the null hypothesis.
Since our p-value is between 0.01 and 0.025, we know it is less than our significance level, 5%. Therefore, we reject the null hypothesis.

Step 6: State an overall conclusion.
There is enough evidence, at a significance level of 5%, to reject the null hypothesis and conclude that the mean waiting time is greater than 10 minutes.