|
SIGN TESTName:
To form the sign test, compute di = Xi - Yi where X and Y are the two samples. Count the number of times di is positive, R+, and the number of times it is negative, R-. If the samples have equal medians and the populations are symmetric, then R+ and R- should be similar. If there are too many positives (R+) or negatives (R-), then we reject the hypothesis of equality. Ties are excluded from the analysis. Since there are only two choices (+ or -) for di the test statistic for the sign test follows a binomial distribution with p=0.5. Note that the binonial distribution is discrete, so the significance level will typically not be exact. More formally, the hypothesis test is defined as follows.
Although the above discussion was in terms of a paired two sample test, it can easily be adapted to the following additional cases:
where <y1> is a response variable; <mu> is a number or parameter that is the hypothesized mean value; and where the <SUBSET/EXCEPT/FOR qualification> is optional. This syntax implements the one sample sign test.
where <y1> is the first response variable; <y2> is the second response variable; and where the <SUBSET/EXCEPT/FOR qualification> is optional. This syntax implements the two sample paired sign test where the hypothesized difference between the population means for the two samples is zero.
where <y1> is the first response variable; <y2> is the second response variable; <mu> is a number or parameter that is the hypothesized difference between the means of the two samples; and where the <SUBSET/EXCEPT/FOR qualification> is optional.
SIGN TEST Y1 Y2 SIGN TEST Y1 Y2 MU SIGN TEST Y1 Y2 SUBSET TAG > 2 This syntax implements the two sample paired sign test where the hypothesized difference between the population means for the two samples is not equal to zero.
STATVALM = R-, i.e., the number of minus signs STATVALP = S+, i.e., BINCDF(R+,0.5,N) STATVALM = S-, i.e., BINCDF(R-,0.5,N) CUTLOW90 = BINPPF(0.05,0.5,N) CUTUPP90 = BINPPF(0.95,0.5,N) CUTLOW95 = BINPPF(0.025,0.5,N) CUTUPP95 = BINPPF(0.975,0.5,N) CUTLOW99 = BINPPF(0.005,0.5,N) CUTUPP99 = BINPPF(0.995,0.5,N)
LET A = ONE SAMPLE SIGN TEST CDF Y LET A = ONE SAMPLE SIGN TEST PVALUE Y LET A = ONE SAMPLE SIGN TEST LOWER TAIL PVALUE Y LET A = ONE SAMPLE SIGN TEST UPPER TAIL PVALUE Y
LET A = TWO SAMPLE SIGN TEST Y1 Y2 In addition to the above LET command, built-in statistics are supported for about 20+ different commands (enter HELP STATISTICS for details).
2000/8: bug fix for 2-sided interval. Was actually calculating a 90% interval rather than a 95% interval. SKIP 25 READ NATR332.DAT Y1 Y2 SET WRITE DECIMALS 4 SIGN TEST Y1 Y2The following output was generated. Two Sample Sign Test (+ => Y1(i) > Y2(i), - => Y1(i) < Y2(i)) First Response Variable: Y1 Second Response Variable: Y2 H0: P(+) = P(-) Ha: P(+) <> P(-) Summary Statistics for Sample One: Number of Observations: 10 Sample Mean: 140.0000 Sample Median: 140.5000 Sample Standard Deviation: 3.4641 Sample Median Absolute Deviation 2.5000 Summary Statistics for Sample Two: Number of Observations: 10 Sample Mean: 140.1000 Sample Median: 140.0000 Sample Standard Deviation: 1.6633 Sample Median Absolute Deviation 1.0000 Test: Hypothesized Difference: 0.0000 Number of Positive Differences: 3 Number of Negative Differences: 4 Number of Ties: 3 CDF Value for Positive Values: 0.5000 CDF Value for Negative Values: 0.7734 P-Value (2-tailed test): 1.0000 P-Value (lower-tailed test): 0.5000 P-Value (upper-tailed test): 0.7734 Two-Tailed Test H0: P(+) = P(-); Ha: P(+) <> P(-) --------------------------------------------------------------------------- Lower Upper Null Significance Test Critical Critical Hypothesis Level Statistic Value (<) Value (>) Conclusion --------------------------------------------------------------------------- 50.0% 3 3 4 ACCEPT 80.0% 3 2 5 ACCEPT 90.0% 3 1 6 ACCEPT 95.0% 3 1 6 ACCEPT 99.0% 3 0 7 ACCEPT 99.9% 3 0 7 ACCEPT Lower One-Tailed Test H0: P(+) = P(-); Ha: P(+) < P(-) ------------------------------------------------------------ Lower Null Significance Test Critical Hypothesis Level Statistic Value (<) Conclusion ------------------------------------------------------------ 50.0% 3 3 REJECT 80.0% 3 2 REJECT 90.0% 3 2 REJECT 95.0% 3 1 REJECT 99.0% 3 1 REJECT 99.9% 3 0 ACCEPT Upper One-Tailed Test H0: P(+) = P(-); Ha: P(+) > P(-) ------------------------------------------------------------ Upper Null Significance Test Critical Hypothesis Level Statistic Value (>) Conclusion ------------------------------------------------------------ 50.0% 3 3 ACCEPT 80.0% 3 5 ACCEPT 90.0% 3 5 ACCEPT 95.0% 3 6 ACCEPT 99.0% 3 6 ACCEPT 99.9% 3 7 ACCEPT
Date created: 06/05/2001 |
Last updated: 12/11/2023 Please email comments on this WWW page to alan.heckert@nist.gov. |