PAR TESTS If a WEIGHT varable s specfed, t s used to replcate a case as many tmes as ndcated by the weght value rounded to the nearest nteger. If the workspace requrements are exceeded and samplng has been selected, a random sample of cases s chosen for analyss usng the algorthm descrbed n SAMPLE. For the RUS test, f samplng s specfed, t s gnored. The tests are descrbed n Segel (956). ote: Before SPSS verson 0..3, the WEIGHT varable was used to replcate a case as many tmes as ndcated by the nteger porton of the weght value. The case then had a probablty of addtonal ncluson equal to the fractonal porton of the weght value. One-Sample Ch-Square Test Cell Specfcaton If the (lo, h) specfcaton s used, each nteger value n the lo to h range s desgnated a cell. Otherwse, each dstnct value encountered s consdered a cell. Observed Frequences O 6 If (lo, h) has been selected, every observed value s truncated to an nteger and, f t s n the lo to h range, t s ncluded n the frequency count for the correspondng cell. Otherwse, a count of the frequency of occurrence of the dstnct values s obtaned. Expected Frequences EXP 6 If none or EQUAL s specfed, 6 6 number of observatons EXP = number of cells k [n range]
PAR TESTS When the expected values E 6 are specfed ether as counts, percentages, or proportons, EXP = E k = E If there are cells wth expected values less than 5, the number of such cells and the mnmum expected value are prnted. If the number of user-suppled expected frequences s not equal to the number of cells generated, or f an expected value s less than or equal to zero, the test termnates wth an error message. Ch-Square and Its Degrees of Freedom χ = O EXP EXP = df = k k 6 The sgnfcance level s from the ch-square dstrbuton wth k degrees of freedom.
PAR TESTS 3 Kolmogorov-Smrnov One-Sample Test Calculaton of Emprcal Cumulatve Dstrbuton Functon The observatons are sorted nto ascendng order X6 to X 6. The emprcal cdf, $FX 6, s % K ' K 0 < X < X F$ X6= & X6 X < X+ 6 =, K, X X < 6 6 Estmaton of Parameters for Theoretcal Dstrbuton It s possble to test that the underlyng dstrbuton s ether unform, normal, or Posson. If the parameters are not specfed, they are estmated from the data. Unform mnmum = X 6 6 maxmum = X ormal mean X = X = 3 8 standard devaton 6 S = X X X 6 = = =
4 PAR TESTS Posson mean 6= λ X = The test s not done f, for the unform, all data are not wthn the user-specfed range or, for the Posson, the data are not non-negatve ntegers. If the varance of the normal or the mean of the Posson s zero, the test s also not done. Calculaton of Theoretcal Cumulatve Dstrbuton Functons For Unform X mn F0X 6= max mn For Posson X l e F0X 6= λ λ l! l= 0 If λ 00, 000, the normal approxmaton s used. For ormal F0X 6= F0, X X S where the algorthm for the generaton of F0, 6 Z s descrbed n Appendx.
PAR TESTS 5 Calculaton of Dfferences For the Unform and ormal, two dfferences are computed: 6 6 6 6 K D = F$ X F0 X ~ D = F$ X F0 X =,, For the Posson: D = % &K 'K 6 6 6 6 FX $ FX X > 0 =,, K,. 0 X = 0 ~ D = F$ X F X The maxmum postve, negatve, and absolute dfferences are prnted. Test Statstc and Sgnfcance The test statstc s 4 9 Z = max D, D ~ The two-taled probablty level s estmated usng the frst three terms of the Smrnov (948) formula. f 0 Z < 07., p = f 07. Z <,. 50668 9 5 p = Q+ Q + Q Z 4 9 Z where Q = e. 3370. Ths algorthm apples to SPSS 7.0 and later releases.
6 PAR TESTS 4 9 6., 4 9 f Z < 3 p = Q Q + Q Q Z where Q = e. f Z 3., p = 0. Runs Test Computaton of Cuttng Pont The cuttng pont whch s used to dchotomze the data can be specfed as a partcular number, or the value of a statstc whch s to be calculated. The possble statstcs are Mean = X = Medan = % &K 4 + 6 69 X 'K 0 + 5 6 X + X f s even f s odd where the data are sorted n ascendng order from X largest. 6, the smallest, to X 6, the Mode = most frequently occurrng value If there are multple modes, the one largest n value s selected and a warnng prnted.
PAR TESTS 7 umber of Runs For each of the data ponts, n the sequence n the fle, the dfference D = X CUTPOIT Sgnfcance Level s computed. If D 0, the dfference s consdered postve, otherwse negatve. The number of tmes the sgn changes, that s, D 0 and D + < 0, or D < 0 and D + 0, as well as the number of postve 3n p 8 and n a determned. The number of runs 6 R s the number of sgn changes plus one. 6 sgns, are The samplng dstrbuton of the number of runs 6 R s approxmately normal wth µ r nn p a = n + n p a + σ r = 3 8 nn p a nn p a na np 3np + na8 3np + na 8 The two-sded sgnfcance level s based on Z = R µ r σ r unless n < 50 ; then Z c = % &K 6 'K R µ + 05. σ f R µ 05. r r r R µ 05. σ f R µ 05. r r r 0 f R µ < 05. r
8 PAR TESTS Bnomal Test n umber of observatons n category n umber of observatons n category p m Test probablty mn n, n6 n+ n p pf m = n, p f m = n Two-taled exact probablty s m p p m p m p m 4 9 0 4 9 = If an approxmate probablty s reported, the followng algorthm s used: n + 05. p n 05. p Z = Z = p p6 p p6 PZ 6 = probablty from standard normal dstrbuton Then, 6 6 6 6 6 PX= n = PZ PZ PX n = PZ and the two-taled approxmate probablty s 6 6 PX n PX= n
PAR TESTS 9 Mcemar s Test Table Constructon The data values are searched to determne the two unque response categores. If the varables X and Y take on more than two values, or only one value, a message s prnted and the test s not done. The number of cases that have X < Y n or X > Y n are counted. 6 6 Test Statstc and Sgnfcance Level If n+ n 5, the exact probablty of r or fewer successes occurrng n n+ n trals when p = 05. and r = mn n, n6s calculated recursvely from the bnomal. r n+ n px r6=. 6 = 0 n + n 05 The two-taled probablty level s obtaned by doublng the computed value. If n+ n > 5, a χ approxmaton wth a correcton for contnuty s used. 7, n n χ c = n+ n df = Sgn Test Count of Sgns For each case, the dfference D = X Y s computed and the number of postve n p counted. Cases n whch X = Y are gnored. 3 8 and negatve n n 6 dfferences
0 PAR TESTS Test Statstc and Sgnfcance Level If np + nn 5, the exact probablty of r or fewer successes occurrng n np + nn trals, when p = 05. and r = mn 3np, nn8, s calculated recursvely from the bnomal r np + nn px r6= 05. 6 = 0 n p + n n If np + nn >5, the sgnfcance level s based on the normal approxmaton 3 8 3 8 max np, nn 05. np + nn 05. Zc = 05. np + nn A two-taled sgnfcance level s prnted. Wlcoxon Matched-Pars Sgned-Rank Test Computaton of Ranked Dfferences For each case, the dfference D = X Y s computed, as well as the absolute value of D. All nonzero absolute dfferences are then sorted nto ascendng order, and ranks are assgned. In the case of tes, the average rank s used. The sums of the ranks correspondng to postve dfferences S p 3 8 and negatve dfferences S n 6 are calculated. The average postve rank s Xp = Sp np
PAR TESTS and the average negatve rank s Xn = Sn nn where n p s the number of cases wth postve dfferences and n n the number wth negatve dfferences. Test Statstc and Sgnfcance Level The test statstc s Z = 7 3 p n8 6 mn S, S n n+ 4 6 6 l 3 4 j j9 j= nn+ n+ 4 t t 48 where n l umber of cases wth non-zero dfferences umber of tes t j umber of elements n the j-th te, j =, K, l For large sample szes the dstrbuton of Z s approxmately standard normal. A two-taled probablty level s prnted. Cochran s Q Test Computaton of Basc Statstcs For each of the cases, the k varables specfed may take on only one of two possble values. If more than two values, or only one, are encountered, a message s prnted and the test s not done. The frst value encountered s desgnated a success and for each case the number of varables that are successes are counted. The number of successes for case wll be desgnated R and the total number of successes for varable l wll be desgnated C l. Ths algorthm apples to SPSS 7.0 and later releases.
PAR TESTS Test Statstc and Level of Sgnfcance Cochran s Q s calculated as Q = 6! k k k k Cl C l l= l= k k Cl R l= = " $ # The sgnfcance level of Q s from the χ freedom. dstrbuton wth k degrees of Fredman s Two-Way Analyss of Varance by Ranks Sum of Ranks For each of the cases, the k varables are sorted and ranked, wth average rank beng assgned n the case of tes. For each of the k varables, the sum of ranks over the cases s calculated. Ths wll be denoted as C l. The average rank for each varable s Rl = Cl Test Statstc and Sgnfcance Level The test statstc s 3 χ = k kk + 67 Cl 3k + 6 l= 4 9 T k k 3 Ths algorthm apples to SPSS 7.0 and later releases.
PAR TESTS 3 where T 985, p. 65). s the same as n Kendall s coeffcent of concordance (see Lehmann, The sgnfcance level s from the χ dstrbuton wth k degrees of freedom. Kendall s Coeffcent of Concordance, k, and l are the same as n Fredman, above. Coeffcent of Concordance (W) 4 W = 6 F k 4 9 4 9 k k k k T where F = Fredman χ statstc. T = t t k 3 4 9 = l= wth t = number of varables ted at each ted rank for each case. Test Statstc and Sgnfcance Level 6 χ = k W The sgnfcance level s from the χ dstrbuton wth k degrees of freedom. 4 Ths algorthm apples to SPSS 7.0 and later releases.
4 PAR TESTS The Two-Sample Medan Test Table Constructon If the medan value s not specfed by the user, the combned data from both samples are sorted and the medan calculated. Md = % 4 9 &K 'K 6 X + X + f s even X otherwse + where X s the largest value and X the smallest. The number of cases n each of the two groups whch exceed the medan are counted. These wll be denoted as g and g, and the correspondng sample szes as n and n. Test Statstc and Sgnfcance Level If 30, the sgnfcance level s from Fsher s exact test. (See Appendx 5.) If > 30, the test statstc s 6 6 6 6 g n g g n g χ c = g+ g n+ n g g nn whch s dstrbuted as a χ wth degree of freedom. Mann-Whtney U Test Calculaton of Sums of Ranks The combned data from both groups are sorted and ranks assgned to all cases, wth average rank beng used n the case of tes. The sum of ranks for each of the
PAR TESTS 5 6 s calculated, as well as, for ted observatons, T groups S and S where t s the number of observatons ted for rank. The average rank for each group s = 3 t t, S = S n where n s the sample sze n group. Test Statstc and Sgnfcance Level The U statstc for group s 6 n n+ U = nn+ S If U > n n, the statstc used s U = nn U If n+ n 30 the exact sgnfcance level s based on an algorthm of Dneen and Blakesley (973). The test statstc corrected for tes s Z = 6 U nn 6 nn 3 T whch s dstrbuted approxmately as a standard normal. A two-taled sgnfcance level s prnted.
6 PAR TESTS Kolmogorov-Smrnov Two-Sample Test Calculaton of the Emprcal Cumulatve Dstrbuton Functons and Dfferences For each of the two groups separately the data sorted nto ascendng order, from X to X n, and the emprcal cdf for group s computed as % K ' K 0 < X < X $F X6= & j n X j X < X j+ X n X < For all of the X j values n the two groups, the dfference between the two groups s 3 8 3 8 Dj = F$ X j F$ X j where F $ X j postve, negatve, and absolute dfferences are also computed. 3 8 s the cdf for the group wth the larger sample sze. The maxmum Test Statstc and Level of Sgnfcance The test statstc (Smrnov, 948) s Z = max j Dj nn n+ n j and the sgnfcance level s calculated usng the Smrnov approxmaton descrbed n the K-S one sample test.
PAR TESTS 7 Wald-Wolfowtz Runs Test Calculaton of umber of Runs All observatons from the two samples are pooled and sorted nto ascendng order. The number of changes n the group numbers correspondng to the ordered data are counted. The number of runs (R) s the number of group changes plus one. If there are tes nvolvng observatons from the two groups, both the mnmum and maxmum number of runs possble are calculated. Sgnfcance Level If n+ n, the total sample sze, s less than or equal to 30, the one-sded sgnfcance level s exactly calculated from R n Pr R6= n + n r r= n n r when R s even. When R s odd R n n n n Pr R6= + n + n k k k k r=! n " $ # where r = k. For sample szes greater than 30, the normal approxmaton s used (see RUS test descrbed prevously).
8 PAR TESTS Moses Test of Extreme Reacton Span Computaton Observaton from both groups are jontly sorted and ranked, wth the average rank beng assgned n the case of tes. The ranks correspondng to the smallest and largest control group (frst group) members are determned, and the span s computed as SPA = Rank(Largest Control Value) Rank(Smallest Control Value) + rounded to the nearest nteger. Sgnfcance Level The exact one-taled probablty level s computed from 6 g! = 0 P SPA nc h+ g = + nc h ne + h+ ne nc + ne nc " $ # where h = 0, n c s the number of cases n the control group, and n e s the number of cases n the expermental group. The same formula s used n the next secton where h s not zero. Censorng of Range The test s repeated, droppng the h lowest and h hghest ranks from the control group. If not specfed by the user, h s taken to be the nteger part of 005. n c or, whchever s greater. If h s user specfed, the nteger value s used unless t s less than one. The sgnfcance level s determned as above.
PAR TESTS 9 K-Sample Medan Test Table Constructon If the medan value s not specfed by the user, the combned data from all groups are sorted and the medan s calculated. Md = % 4 9 &K 'K 6 X + X + f s even X f s odd + where X s the largest value and X the smallest. The number of cases n each of the groups that exceed the medan are counted and the followng table s formed. Group 3 k LE Md O O O 3... O k R GT Md O O O 3... O k R n n n 3... n k Test Statstc and Level of Sgnfcance The χ statstc for all nonempty groups s calculated as k χ = 3 O j E j8 E j j= = where Rn j Ej =.
0 PAR TESTS The sgnfcance level s from the χ dstrbuton wth k degrees of freedom, where k s the number of nonempty groups. A message s prnted f any cell has an expected value less than one, or more than 0% of the cells have expected values less than fve. Kruskal-Walls One-Way Analyss of Varance Computaton of Sums of Ranks Observatons from all k nonempty groups are jontly sorted and ranked, wth the average rank beng assgned n the case of tes. The number of ted scores n a set 3 of tes, t, s also found, and the sum of T = t t s accumulated. For each group the sum of ranks, R, as well as the number of observatons, n, s obtaned. Test Statstc and Level of Sgnfcance The test statstc unadjusted for tes s k 6 6 = H = R n 3 + + where s the total number of observatons. Adjusted for tes, the statstc s H H = m 3 T = 4 9 where m s the total number of ted sets. The sgnfcance level s based on the χ dstrbuton, wth k degrees of freedom.
PAR TESTS References Dneen, L. C., and Blakesley, B. C. 973. Algorthm AS 6: Generator for the samplng dstrbuton of the Mann-Whtney U statstc. Appled Statstcs, : 69 73. Lehmann, E. L. 985. onparametrcs: Statstcal Methods Based on Ranks. San Francsco: McGraw Hll. Segel, S. 956. onparametrc statstcs for the behavoral scences. ew York: McGraw-Hll. Smrnov,. V. 948. Table for estmatng the goodness of ft of emprcal dstrbutons. Annals of Mathematcal Statstcs, 9: 79 8.