
SQUARED RANKSName:
The assumptions for using this test are
More formally,
<SUBSET/EXCEPT/FOR qualification> where <LOWER TAILED/UPPER TAILED> is an optional keyword for the two sample case; <y> is the response (= dependent) variable; <x> is the factor (= independent) variable; and where the <SUBSET/EXCEPT/FOR qualification> is optional. The LOWER TAILED and UPPER TAILED options are only available for the two sample case. Only one can be specified and if neither is entered a twotailed test will be performed.
<SUBSET/EXCEPT/FOR qualification> where <LOWER TAILED/UPPER TAILED> is an optional keyword for the two sample case; <y1> ... <yk> is a list of 1 to 30 response variables; and where the <SUBSET/EXCEPT/FOR qualification> is optional. This syntax is used for the case when the data for each group is stored in a separate variable. This syntax accepts matrix arguments. The LOWER TAILED and UPPER TAILED options are only available for the two sample case. Only one can be specified and if neither is entered a twotailed test will be performed.
SQUARED RANKS TEST Y X SUBSET X = 1 TO 4 MULTIPLE SQUARED RANKS TEST Y1 Y2 Y3 Y4 MULTIPLE SQUARED RANKS TEST Y1 TO Y4 LOWER TAILED SQUARED RANKS TEST Y1 Y2 UPPER TAILED SQUARED RANKS TEST Y1 Y2
The populations i and j seem to have different variances if the following inequality is satisfied:
with TPPF and T denoting the t percent point function with N  k degrees of freedom and the squared ranks test statistic, respectively.
LET A = SQUARED RANKS TEST CDF Y LET A = SQUARED RANKS TEST PVALUE Y LET A = SQUARED RANKS TEST LOWER TAILED PVALUE Y LET A = SQUARED RANKS TEST UPPER TAILED PVALUE Y In addition to the above LET command, builtin statistics are supported for about 20+ different commands (enter HELP STATISTICS for details).
. Step 1: Read Data (example 1 from pp. 304305 of Conover) . let y1 = data 10.8 11.1 10.4 10.1 11.3 let y2 = data 10.8 10.5 11.0 10.9 10.8 10.7 10.8 . . Step 2: Data with more than 2 groups . let z1 = data 0.7 1 2 1.4 0.5 0.8 1 1.1 1.9 1.2 1.5 let z2 = data 1.7 2.1 0.4 0 1 1.1 0.9 2.3 1.3 0.4 0.5 let z3 = data 0.9 0.9 1 0 0.1 0.6 2.2 0.3 0.6 2.4 2.5 . . Step 3: Convert to form needed for "statistic" command . let y x = stacked y1 y2 let zy zx = stacked z1 z2 z3 set write decimals 4 . . Step 2: Check the statistic . . stat = 5.192, pvalue = 0.0754 . let stat = squared rank test zy zx let pval = squared rank test pvalue zy zx let cdf = squared rank test cdf zy zx print stat cdf pvalThe following output is generated: PARAMETERS AND CONSTANTS STAT  5.1925 CDF  0.9254 PVAL  0.0746 . let stat2 = squared rank test y x let cdf2 = squared rank test cdf y x let pval2 = squared rank test pvalue y x let pvallt = squared rank test lower tailed pvalue y x let pvalut = squared rank test upper tailed pvalue y x print stat2 cdf2 pval2 pvallt pvalutThe following output is generated: PARAMETERS AND CONSTANTS STAT2  2.3273 CDF2  0.9900 PVAL2  0.0199 PVALLT  0.9900 PVALUT  0.0100 . squared rank test y1 y2The following output is generated: Squared Ranks Test H0: Samples Have Equal Variability Ha: Samples Do Not Have Equal Variability Summary Statistics: Total Number of Observations: 12 Number of Groups: 2 Squared Ranks Test Statistic Value: 2.3273 CDF of Test Statistic: 0.9900 TwoTailed PValue: 0.0199 Lower Tailed PValue: 0.9900 Upper Tailed PValue: 0.0099 TwoTailed Test: Normal Approximation H0: Var(Y1) = Var(Y2); Ha: Var(Y1) <> Var(Y2)  Null Significance Test Critical Hypothesis Level Statistic Value (+/) Conclusion  80.0% 2.3273 1.2815 REJECT 90.0% 2.3273 1.6448 REJECT 95.0% 2.3273 1.9599 REJECT 99.0% 2.3273 2.5758 ACCEPT  
Date created: 07/05/2011 Last updated: 12/11/2023 Please email comments on this WWW page to alan.heckert@nist.gov. 