Trailing-Edge
-
PDP-10 Archives
-
decuslib10-01
-
43,50110/stat09.sta
There are 2 other files named stat09.sta in the archive. Click here to see a list.
100' NAME--STAT09
110'
120' DESCRIPTION--COMPARES TWO GROUPS OF DATA BY MEANS OF THE
130' MANN-WHITNEY TWO SAMPLE RANK TEST.
140'
150' SOURCE--UNKNOWN
160'
170' INSTRUCTIONS--ENTER DATA IN LINE 900 AND FOLLOWING.
180' FIRST DATA ARE M,N, AND C. M AND N ARE THE TWO SAMPLE SIZES AND
190' C IS THE CRITICAL VALUE FOR THE MANN-WHITNEY TEST
200' WITH FRACTIONAL COUNTS. IF M OR N IS GREATER THAN 30, THE
210' DIM STATEMENTS IN LINE 290 SHOULD BE CHANGED.
220' AFTER M,N, AND C ARE PUT IN , THE NEXT DATA SHOULD BE THE
230' FIRST SERIES OF TEST DATA, FOLLOWED BY THE SECOND SERIES.
240' SAMPLE DATA IS IN LINE 900.
250'
260'
270' * * * * * * * MAIN PROGRAM * * * * * * * * * *
280'
290 DIM A(30), B(30), D(900)
300 READ M, N, C
310 MAT READ A(M)
320 MAT READ B(N)
330 FOR I = 1 TO M
340 LET Q = (I - 1) * N
350 LET X = A(I)
360 FOR J = 1 TO N
370 LET D(Q + J) = X - B(J)
380 NEXT J
390 NEXT I
400 LET P = M * N
410 LET I = 1
420 IF D(I) <= D(I+1) THEN 490
430 LET T = D(I)
440 LET D(I) = D(I+1)
450 LET D(I+1) = T
460 IF I = 1 THEN 490
470 LET I = I - 1
480 GO TO 420
490 LET I = I + 1
500 IF I < P THEN 420
510 LET C = C + 1
520 LET X = INT(C)
530 LET R = C - X
540 LET L = D(X) * (1 - R) + D(X+1) * R
550 LET X = P - X
560 LET U = D(X+1) * (1 - R) + D(X) * R
570 PRINT "CONFIDENCE INTERVAL BY RANK SUM TEST."
580 PRINT "LOWER LIMIT = ";L, "UPPER LIMIT = ";U
590 STOP
900 DATA 4, 6, 2.5, 190, 160, 160, 140, 117, 120, 120, 145, 147, 150
910 END