[A, SfS] Chapter 6: Hypothesis Testing: 6.2: Test for Population Mean
Hypothesis Test for a Population Mean
Hypothesis Test for a Population Mean
In this section, we will look at how to test whether the mean of a quantitative variable measured on a population differs from some benchmark value.
Suppose we have a continuous variable whose mean value when measured on a specified population is denoted .
Research Question and Hypotheses
The research question of a hypothesis test for a population mean is whether or not differs from some benchmark value .
Depending on the direction of the test, a hypothesis test for a population mean has one of the following pairs of hypotheses:
Two-tailed | Left-tailed | Right-tailed |
|
|
|
Test Statistic and Null Distribution
Suppose a random sample of size is selected from the population and is measured on the sample, from which we obtain the sample mean and the sample standard deviation .
As with confidence intervals, there are several conditions that guide the procedure we follow:
1) The distribution of on the population is a normal distribution;
2) We know the value of the variance of on the population;
3) The sample size is large.
Test statistic | Null distribution | Use when |
|
||
|
||
|
Calculating the P-value
The calculation of the P-value of a hypothesis test for a population mean depends on which form of is being considered, and which test statistic is being used. We present in the below tables the P-value calculation, including the commands.
Test statistic: ; Computed value based on sample data: .
![]() |
![]() |
![]() |
Test statistic: ; Computed value based on sample data: with sample size .
![]() |
![]() |
![]() |
If the P-value is larger than the significance level , then the evidence against is not convincing. Otherwise, we would reject and conclude that there is sufficient evidence to support .
Note that in , or compute the absolute value of the test statistic. You don’t need to use the command in practice, as long as you enter the absolute value of or yourself.
Suppose it is hypothesized that the mean pregnancy length for expectant mothers in a certain region is less than days. Thus, we have the following hypotheses:
Assume pregnancy lengths for expectant mothers in the region are normally distributed, and set .
From a random sample of expectant mothers from the region, the sample mean pregnancy length is and the sample variance is .
The test statistic is:
The sample size is small, so the corresponding P-value is found using the distribution:
using the command:
pt(-2.443, 24, low = TRUE)
Since this P-value is less than , we conclude in favor of , i.e., that the mean pregnancy length for expectant mothers in that region is less than days.
If instead, we had expectant mothers in the sample, then whether or not pregnancy lengths are normally-distributed in the region, we can use the normal distribution to compute the P-value, on the basis of the Central Limit Theorem.
Suppose the sample mean and sample variance are the same as above.
Then in this case:
and the approximate P-value is:
using the command:
pnorm(-3.455, 0, 1, low = TRUE)
Since the P-value is less than , we conclude in favor of , i.e., that the mean pregnancy length for expectant mothers in that region is less than days.
Or visit omptest.org if jou are taking an OMPT exam.