[A, SfS] Chapter 6: Hypothesis Testing: 6.3: Test for Population Mean Difference
Hypothesis Test for a Population Mean Difference
Hypothesis Test for a Population Mean Difference
In this section, we will look at how to test whether the mean difference in paired measurements of a continuous variable differs from some specific benchmark.
Once again, we consider paired data, i.e., paired measurements of a single continuous variable #X# on a random sample of size #n# from a population.
Research Question and Hypotheses
The research question of a hypothesis test for a population mean difference is whether or not the population mean difference #\mu_D# between paired measurements is different from some benchmark value #\mu_0#. Usually #\mu_0 = 0# in this setting, so we will often use #0# as the benchmark value in this course.
Depending on the direction of the test, a hypothesis test for a population mean difference has one of the following pairs of hypotheses:
Twotailed  Lefttailed  Righttailed 



Conversion of Paired MeasurementsAs when we worked with confidence intervals, we convert the paired measurements #(X_{1_1},X_{1_2}),...,(X_{n_1},X_{n_2})# into single measurements of the differences: for #i = 1,...,n#.
Let #D_i = X_{i_2}  X_{i_1}#. Then #\bar{D}# is the sample mean difference of the differences and#s_D# is the sample standard deviation of the differences.
The setting has thus been converted into the previous setting where we had single measurements of a continuous variable on a random sample from a single population, so we use the same method, depending on the validity of the normality assumption for the differences, and the sample size.
It is very unlikely that the population variance #\sigma_D^2# of the differences is known, so #s_D^2# is usually used to estimate it.
For example, suppose #n=20# subjects have their stress levels measured before and after participating in a relaxation therapy. We want to investigate whether the relaxation therapy leads to reduced stress levels, with a probability of Type I error of #0.01#.
That is, we test #H_0: \mu_D \geq 0# against #H_1 : \mu_D < 0# at significance level #\alpha = 0.01#.
Suppose the average difference in their stress levels is #\bar{D} = 35.29#, with #s_D = 50.78#.
Assume that the differences have a normal distribution on the population, and compute \[t = \cfrac{35.29  0}{50.78/\sqrt{20}} \approx 3.108\] with #20  1 = 19# degrees of freedom.
Using the #\mathrm{R}# command
pt(3.108,19)
the corresponding Pvalue is computed to be #P(T \leq 3.108) \approx 0.0029 < 0.01 = \alpha#, which gives strong support to #H_1#.
We conclude that the relaxation therapy leads to reduced stress levels.
Or visit omptest.org if jou are taking an OMPT exam.