Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-01 - decus/20-0020/stat07.sta
There are 2 other files named stat07.sta in the archive. Click here to see a list.
100'  NAME--STAT07
110'
120'  DESCRIPTION--CALCULATES THE CONFIDENCE LIMITS FOR A 
130'  SET OF DATA USING THE WILCOXON SIGNED RANK SUM PROCEDURE
140'  WITH FRACTIONAL COUNTS.
150'
160'  SOURCE--UNKNOWN
170'
180'  INSTRUCTIONS--PUT DATA IN LINE 900 AND FOLLOWING.
190'  BE SURE DATA LINE NUMBERS DO NOT EXCEED 919.
200'  THE FIRST DATUM IS N, THE NUMBER OF DATA IN THE SET.
210'  SECOND, PUT IN THE CRITICAL VALUE C,(FROM A TABLE OF CRITICAL
220'  VALUES, SEE KURTZ,"BASIC STATISTICS") AND THEN ENTER THE DATA
230'  ITSELF. SAMPLE DATA ARE IN LINES 900 AND 910.
240'
250'
260'  *  *  *  *  *  *  *   MAIN PROGRAM   *  *  *  *  *  *  *  *  *  *
270'
280  DIM D(50),A(1275)
290 READ N, C
300 FOR I = 1 TO N
310 READ D(I)
320 NEXT I
330 LET K = 0
340 FOR I = 1 TO N
350 FOR J = I TO N
360 LET K = K + 1
370 LET A(K) = ( D(I) + D(J) ) / 2
380 NEXT J
390 NEXT I
400 LET B = N*(N + 1)/2
410 LET I = 1
420 IF A(I) <= A(I+1) THEN 490
430 LET K = A(I)
440 LET A(I) = A(I+1)
450 LET A(I+1) = K
460 IF I = 1 THEN 490
470 LET I = I - 1
480 GO TO 420
490 LET I = I + 1
500 IF I < B THEN 420
510 LET C = C + 1
520 LET X = INT(C)
530 LET R = C - X
540 LET L = A(X) *( 1 - R) + A(X+1) * R
550 LET X = B - X
560 LET U = A(X+1) * (1 - R) + A(X) * R
570 PRINT "CONFIDENCE INTERVAL BY SIGNED RANK SUM, FRACTIONAL COUNT."
580 PRINT "LOWER LIMIT IS"L;"   UPPER LIMIT IS"U
590 STOP
900 DATA 12,13.8,20.1,21.0,20.4,18.1,19.0,17.8
910 DATA         20.3,19.2,21.5,19.7,20.0,18.2
920 END