advertisement

Week 4 Lecture: Paired-Sample Hypothesis Tests (Chapter 9) The two-sample procedures described last week only apply when the two samples are independent. However, you may want to perform a hypothesis tests to data that are related. Some examples of related (non-independent) data include: “before and after”, “observed vs. predicted”, “right vs. left”, identical twins, etc. Pairing is a good idea when you expect greater variation between the pairs when compared to variation within a pair. Testing Mean Difference In a similar fashion to the two-tailed hypotheses from last week, we can define a mean population difference, µd, as µ1 – µ2, a test the null hypothesis: Ho: µ d = 0 Ha: µ d ≠ 0 The test statistic for Ho is a t-statistic: t= d , sd where d = mean difference and s d = standard error of the mean difference. Thus, the paired- sample t-test is essentially a one-sample t-test. Note, however, that each observation in one sample must be correlated to one and only one observation in the second sample. The pairedsample t-test does not have the normality and homogeneity of variances assumptions as with the two-sample t-test, but it does assume that the differences are normally distributed. 1 Example: We want to compare ground versus air-based temperature sensors to determine the earth’s temperature, which is important for agricultural modeling, etc. Ground-based sensors are expensive, and air-based (from satellites or air-planes) of infrared wavelengths may be biased. We collected temperature data from ground and air-based sensors at ten locations, and we want to test if they are different. We will test the following hypothesis: Ho: µ d = 0 Ha: µ d ≠ 0 α = 0.05 d= Location Ground (oC) Air (oC) Difference (di) 1 46.9 47.3 -0.4 2 45.4 48.1 -2.7 3 36.3 37.9 -1.6 4 31.0 32.7 -1.7 5 24.7 26.2 -1.5 6 22.3 23.3 -1.0 7 49.8 50.2 -0.4 8 40.5 42.6 -2.1 9 37.7 39.4 -1.7 10 35.5 37.9 -2.4 − 15.5 = −1.55 oC 10 sd = sd n = 0.7706 10 = 0.24 oC 2 t-statistic: t = d − 1.55 = = −6.458 sd 0.24 Critical Value: t α (2 ),ν = n −1 = t 0.05(2 ),9 = 2.262 Decision Rule: If t ≥ 2.262 , then reject Ho; otherwise, do not reject Ho. Conclusion: Since − 6.458 > 2.262 (P < 0.001), reject Ho and conclude that the mean difference between ground and air-based sensors at these ten locations is significantly different. We can also test one-tailed hypotheses for the mean difference in a manner analogous to that of the two-sample t-test (see Zar p. 181) for an example. Confidence Intervals for the Population Mean Difference Just as we calculated confidence intervals in preceding chapters, we can also obtain confidence intervals for the mean population difference: d ± t α (2 ),ν s d . Example: Continuing with our earlier example of temperature sensors, we can obtain a 95% confidence interval for the population mean difference: − 1.55 ± (2.262)(0.24 ) ⇒ −1.55 ± 0.54 o C We can also determine power of the test and necessary sample size for a specified level of precision as we did for a one-sample t-test (chapter 7). Simply substitute d for X , and s d2 for s2. 3 Wilcoxon Paired-Sample Test This is the non-parametric analog of the paired t-test, also known as the “Wilcoxon PairedSample Test.” It is used for paired-sample testing with ordinal data. The procedure for this test is: 1. Compute di for each pair 2. Rank d i ’s – the absolute values of the differences (assign tied ranks as before) 3. Calculate the sum of the ranks for: a) positive differences, and b) negative differences 4. Apply appropriate decision rule (critical values from Table B.12): • When Ho: Population 1 = Population 2 and Ha: Population 1 ≠ Population 2, and if T+ or T− ≤ Tα (2 ),n , then reject Ho • When Ho: Population 1 ≤ Population 2 and Ha: Population 1 > Population 2, and if T− ≤ Tα (1),n , then reject Ho. • When Ho: Population 1 ≥ Population 2 and Ha: Population 1 < Population 2, and if T+ ≤ Tα (1),n , then reject Ho. 4 • Example: Let’s redo our previous example using the non-parametric test: Ho: Ground − based sensors = Air − based sensors Ha: Ground − based sensors ≠ Air − based sensors α = 0.05 Location Ground (oC) Air (oC) Difference (di) Rank of d i Signed Rank of d i 1 46.9 47.3 -0.4 1.5 -1.5 2 45.4 48.1 -2.7 10 -10 3 36.3 37.9 -1.6 5 -5 4 31.0 32.7 -1.7 6.5 -6.5 5 24.7 26.2 -1.5 4 -4 6 22.3 23.3 -1.0 3 -3 7 49.8 50.2 -0.4 1.5 -1.5 8 40.5 42.6 -2.1 8 -8 9 37.7 39.4 -1.7 6.5 -6.5 10 35.5 37.9 -2.4 9 -9 Sum of Ranks: ∑T + =0 ∑T − = 55 . Decision Rule: If T+ or T− ≤ T0.05(2 ),10 = 8 , then reject Ho; otherwise, do not reject Ho. Conclusion: Since T+ = 0 < 8 (P < 0.005), reject Ho and conclude that the mean difference between ground and air-based sensors at these five locations is significantly different. 5