Chapter Contents Previous Next
 The TTEST Procedure

## Example 67.3: Paired Comparisons

When it is not feasible to assume that two groups of data are independent, and a natural pairing of the data exists, it is advantageous to use an analysis that takes the correlation into account. Utilizing this correlation results in higher power to detect existing differences between the means. The differences between paired observations are assumed to be normally distributed. Some examples of this natural pairing are

• pre- and post-test scores for a student receiving tutoring
• fuel efficiency readings of two fuel types observed on the same automobile
• sunburn scores for two sunblock lotions, one applied to the individual's right arm, one to the left arm
• political attitude scores of husbands and wives

In this example, taken from SUGI Supplemental Library User's Guide, Version 5 Edition, a stimulus is being examined to determine its effect on systolic blood pressure. Twelve men participate in the study. Their systolic blood pressure is measured both before and after the stimulus is applied. The following statements input the data:

```   title 'Paired Comparison';
data pressure;
input SBPbefore SBPafter @@;
datalines;
120 128   124 131   130 131   118 127
140 132   128 125   140 141   135 137
126 118   130 132   126 129   127 135
;
run;
```

The variables SBPbefore and SBPafter denote the systolic blood pressure before and after the stimulus, respectively.

The statements to perform the test follow.

```   proc ttest;
paired SBPbefore*SBPafter;
run;
```

The PAIRED statement is used to test whether the mean change in systolic blood pressure is significantly different from zero. The output is displayed in Output 67.3.1.

Output 67.3.1: TTEST Results

 Paired Comparison

 The TTEST Procedure

 Statistics Difference N Lower CLMean Mean Upper CLMean Lower CLStd Dev Std Dev Upper CLStd Dev Std Err Minimum Maximum SBPbefore - SBPafter 12 -5.536 -1.833 1.8698 4.1288 5.8284 9.8958 1.6825 -9 8

 T-Tests Difference DF t Value Pr > |t| SBPbefore - SBPafter 11 -1.09 0.2992

The variables SBPbefore and SBPafter are the paired variables with a sample size of 12. The summary statistics of the difference are displayed (mean, standard deviation, and standard error) along with their confidence limits. The minimum and maximum differences are also displayed. The t test is not significant (t=-1.09, p=0.2992), indicating that the stimuli did not significantly affect systolic blood pressure.

Note that this test of hypothesis assumes that the differences are normally distributed. This assumption can be investigated using PROC UNIVARIATE with the NORMAL option. If the assumption is not satisfied, PROC NPAR1WAY should be used.

 Chapter Contents Previous Next Top