The UNIVARIATE Procedure

Example 4.13 Performing a Sign Test Using Paired Data

This example demonstrates a sign test for paired data, which is a specific application of the tests for location discussed in Example 4.12.

The instructor from Example 4.4 is now interested in performing a sign test for the pairs of test scores in his college course. The following statements request basic statistical measures and tests for location:

title 'Test Scores for a College Course';
ods select BasicMeasures TestsForLocation;
proc univariate data=Score;
   var ScoreChange;
run;

The ODS SELECT statement restricts the output to the "BasicMeasures" and "TestsForLocation" tables; see the section ODS Table Names. The instructor is not willing to assume that the ScoreChange variable is normal or even symmetric, so he decides to examine the sign test. The large p-value (0.7744) of the sign test provides insufficient evidence of a difference in test score medians.

Output 4.13.1: Sign Test for ScoreChange

Test Scores for a College Course

The UNIVARIATE Procedure
Variable: ScoreChange (Change in Test Scores)

Basic Statistical Measures
LocationVariability
Mean-3.08333Std Deviation13.33797
Median-3.00000Variance177.90152
Mode-5.00000Range51.00000
  Interquartile Range10.50000

Note: The mode displayed is the smallest of 2 modes with a count of 2.


Tests for Location: Mu0=0
TestStatisticp Value
Student's tt-0.80079Pr > |t|0.4402
SignM-1Pr >= |M|0.7744
Signed RankS-8.5Pr >= |S|0.5278


A sample program for this example, uniex03.sas, is available in the SAS Sample Library for Base SAS software.

Last updated: April 16, 2025