Statistics lesson 24
MTH 245 Lesson 24 Notes Paired Samples for Two Means – P-Value Method
Two random samples are dependent if the values from one population form natural pairs with values from the other population. Typically, in dependent samples, the individuals from one sample are the same individuals from the other sample, though there can be other reasons to pair values. This is common in experiments with a matched pairs design.
Consider two dependent samples (Sample 1 and Sample 2) with sample size 𝑛𝑛1 = 𝑛𝑛2 = 𝑛𝑛, which are taken from two different populations (Population 1 and Population 2). Suppose the observations in each sample are arranged in matched pairs, and at least one of the following holds:
1. Both populations are normally distributed, or 2. 𝑛𝑛 ≥ 30.
There are no special hypothesis test procedures for comparing matched- pair samples, but the results can be approximated by performing a single- sample t-test on the differences between the pairs. The null hypothesis is that the two population means are equal; it takes the form
𝐻𝐻0: 𝜇𝜇1 − 𝜇𝜇2 = 0
Depending on the context, the alternative hypothesis will be one of the following:
𝐻𝐻𝐴𝐴: 𝜇𝜇1 − 𝜇𝜇2 < 0 (Population 1 has a smaller mean) OR
𝐻𝐻𝐴𝐴: 𝜇𝜇1 − 𝜇𝜇2 > 0 (Population 1's mean is larger) OR
𝐻𝐻𝐴𝐴: 𝜇𝜇1 − 𝜇𝜇2 ≠ 0 (the two means are different)
As with all hypothesis tests, if p-value ≤ 𝛼𝛼, reject 𝐻𝐻0.
To perform this 𝑡𝑡-test by hand would require us to subtract each entry in Sample 1 from its matched value in Sample 2, then conduct the test using the procedures from Lesson 20. However, StatCrunch will do that for us automatically.
To perform the hypothesis test using StatCrunch, import the data set, then use the following procedure:
1. Import/enter the data, one sample per column. (Important: when entering data manually, be sure the values in each pair are on the same row.)
2. Click Stat T Stats Paired. Warning: do not use Stat T Stats Two Sample – it will produce incorrect results!
3. Use the pull-downs to identify the columns of Sample 1 and Sample 2. 4. Make sure the radio button is set to "Hypothesis test for 𝜇𝜇𝐷𝐷 = 𝜇𝜇1 − 𝜇𝜇2"
and the operator in 𝐻𝐻𝐴𝐴 is correct (do not change 𝐻𝐻0).
5. Click "Compute!".
Example 1: A shoe manufacturer claims that athletes can increase their vertical jump heights using the manufacturer's training shoes. The vertical jump heights of eight athletes are measured while wearing their old shoes, and then again after wearing the new shoes for eight months. The Jump Height data set shows the set of matching heights for each athlete in the study. Test the manufacturer's claim at 𝛼𝛼 = 0.05. (Assume jump heights are normally distributed.)
Define Population 1 as athletes' jump heights before wearing the new shoes and Population 2 as the jump heights after wearing them and suppose 𝜇𝜇1 and 𝜇𝜇2 are the mean jump heights for each population. If the manufacturer's claim is true, then 𝜇𝜇2 (the mean "after" measurement) will be larger than 𝜇𝜇1 (the mean "before" measurement) and the hypotheses for the test will be as follows:
𝐻𝐻0: 𝜇𝜇1 − 𝜇𝜇2 = 0 𝐻𝐻𝐴𝐴: 𝜇𝜇1 − 𝜇𝜇2 < 0 (original claim)
Since the p-value = 0.026 < 𝛼𝛼 = 0.05, we reject 𝐻𝐻0. There is sufficient evidence to support the manufacturer's claim.
Example 2: Fourteen individuals were randomly assigned a diet that included either oat bran or cornflakes. After two weeks on the initial diet, serum cholesterol levels were measured and the participants were then “crossed-over” to the alternate diet. After two-weeks on the second diet, cholesterol levels were once again recorded. The results are in the Diet Study data set. The variable CORNFLK represents cholesterol level (in mmol/L) of the participant after two weeks on the corn flake diet. The variable OATBRAN represents the participant’s cholesterol level after two weeks on the oat bran diet. Test the claim that the mean cholesterol for a subject on the oat bran diet is lower than that of a subject on the cornflake diet. Use 𝛼𝛼 = 0.05. Assume cholesterol levels are approximately normally distributed.
Define Population 1 as cholesterol levels on the cornflake diet and Population 2 as cholesterol levels on the oat bran diet. Further, suppose 𝜇𝜇1
and 𝜇𝜇2 are the mean cholesterol levels for each population. If the original claim is true, then 𝜇𝜇1 (the mean cornflake cholesterol level) will be larger than 𝜇𝜇2 (the mean oat bran level) and the hypotheses for the test will be as follows:
𝐻𝐻0: 𝜇𝜇1 − 𝜇𝜇2 = 0 𝐻𝐻𝐴𝐴: 𝜇𝜇1 − 𝜇𝜇2 > 0 (original claim)
Since the p-value = 0.003 < 𝛼𝛼 = 0.05, we reject 𝐻𝐻0. There is sufficient evidence to support the claim that the mean cholesterol for a subject on the oat bran diet is lower than that of a subject on the cornflake diet.
Note that there is no rule for determining which population is Population 1 and which is Population 2. In Example 2, we could just as easily have made Population 1 the oat bran cholesterol levels and Population 2 the cornflake levels. If we did that, though, we would have had to change HA to match the original claim that the mean oat bran cholesterol level will be larger: μ1 − μ2 < 0. As long as we make this corresponding change, the p-value will still equal 0.003 and the result of the hypothesis test will be the same.
Paired Samples for Two Means – Confidence Interval Method To construct a two-sided confidence interval estimate of the difference between the population means, use the same procedure as above with one change: set the radio button to "Confidence interval for 𝜇𝜇𝐷𝐷 = 𝜇𝜇1 − 𝜇𝜇2" and enter the appropriate confidence level. Then use the method in Lesson 21 to conduct a hypothesis test to see if the means are different.
Example 3: The Royal New Zealand Air Force decided to study the head size of recruits to determine the correct distribution of flight helmet sizes to procure. Because of the scale of the study, they wanted to use cardboard calipers to save money, but were not sure if they would be accurate enough, so they randomly selected 18 recruits and measured their heads with both cardboard calipers and with metal calipers. The Helmet Size data set contains the two measurements for each recruit in centimeters (cm). Use
the confidence interval method to test the claim that there is no difference between the mean measurements for the two methods. Use a confidence level of 1 − 𝛼𝛼 = 0.95 and assume that the caliper measurements are normally distributed.
Define Population 1 as the head sizes measured with cardboard calipers and Population 2 as the head sizes measured with metal calipers. Further, suppose 𝜇𝜇1 and 𝜇𝜇2 are the mean head sizes for each population. The hypotheses for the test are as follows:
𝐻𝐻0: 𝜇𝜇1 − 𝜇𝜇2 = 0 (original claim) 𝐻𝐻𝐴𝐴: 𝜇𝜇1 − 𝜇𝜇2 ≠ 0
StatCrunch reports a 95% confidence interval 0.5 < 𝜇𝜇1 − 𝜇𝜇2 < 2.7. Since this interval does not contain 0, we reject 𝐻𝐻0. There is insufficient evidence to reject the claim there is no difference between the mean measurements for the two methods.
Note that if you reverse the populations (i.e., Population 1 is metal), the confidence interval will be −2.7 < 𝜇𝜇1 − 𝜇𝜇2 < −0.5 This interval also does not contain 0, so the result of the test will be the same.
Example 4: The Hospital Admissions data set contains the numbers of hospital admissions resulting from motor vehicle crashes for Fridays on the 6th of a month and Fridays on the following 13th of the same month. Assume that the paired sample data is a simple random sample and that the differences have a distribution that is approximately normal. Use a 95% confidence interval to test the claim that when the 13th day of a month falls on a Friday, the numbers of hospital admissions from motor vehicle crashes are not affected.
Suppose we define Population 1 as the daily admission numbers for Friday the 6th and Population 2 as the daily admission numbers for Friday the 13th. Further, suppose 𝜇𝜇1 and 𝜇𝜇2 are the mean head sizes for each population. If the original claim is true, then there will be no significant difference between the means (that is, it doesn't make any difference what day of the week the
13th falls on). The hypotheses for the test are as follows:
𝐻𝐻0: 𝜇𝜇1 − 𝜇𝜇2 = 0 (original claim) 𝐻𝐻𝐴𝐴: 𝜇𝜇1 − 𝜇𝜇2 ≠ 0
StatCrunch reports a 95% confidence interval −13.1 < 𝜇𝜇1 − 𝜇𝜇2 < −1.3. Since this interval does not contain 0, we reject 𝐻𝐻0. There is insufficient evidence to reject the claim when the 13th day of a month falls on a Friday, the numbers of hospital admissions from motor vehicle crashes are not affected.
As seen above with the p-value method, it doesn't matter which population is Population 1 and which is Population 2. Suppose in Example 4, we defined Population 1 as the daily admission numbers for Friday the 13th and Population 2 as the daily admission numbers for Friday the 6th. For a confidence interval test, the hypotheses won't change, because we are still testing whether or not the difference between the means is 0. The confidence limits will change, however, to 1.3 < 𝜇𝜇_1 − 𝜇𝜇_2 < 13.1, but this interval still does not contain 0, so the result of the hypothesis test is the same.