Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-01 - 43,50110/stat06.sta
There are 2 other files named stat06.sta in the archive. Click here to see a list.
100'  NAME--STAT06
110'
120'  DESCRIPTION--CALCULATES THE SIGN TEST CONFIDENCE INTERVAL
130'  USING FRACTIONAL COUNTS.
140'
150'  SOURCE--UNKNOWN
160'
170'  INSTRUCTIONS--PUT DATA IN LINE 900 AND FOLLOWING.
180'  MAKE SURE DATA LINE NUMBERS DO NOT EXCEED 919. FIRST
190'  DATA PUT IN IS N, THE NUMBER OF THE DATA, THEN C, THE CRITICAL
200'  VALUE  (FROM A TABLE OF CRITICAL VALUES FOR THE SIGN 
210'  TEST, SEE KURTZ, "BASIC STATISTICS"). THEN ENTER THE DATA
220'  ITSELF. BE SURE THERE ARE NO MORE THAN 1000 NUMBERS.
230'  SAMPLE DATA ARE IN LINES 900 AND 910.
240'
250'
260'  *  *  *  *  *  *  *  MAIN PROGRAM   *  *  *  *  *  *  *  *  *  *  *
270'
280  DIM D(1000)
290 READ N, C
300 FOR I = 1 TO N
310 READ D(I)
320 NEXT I
330 LET I = 1
340 IF D(I) <= D(I+1) THEN 410
350 LET T = D(I)
360 LET D(I) = D(I+1)
370 LET D(I+1) = T
380 IF I = 1 THEN 410
390 LET I = I - 1
400 GO TO 340
410 LET I = I + 1
420 IF I < N THEN 340
430 LET X = INT(C) + 1
440 LET R = C + 1 - X
450 LET L = D(X) * ( 1 - R ) + D(X+1) * R
460 LET X = N - X
470 LET U = D(X+1) * ( 1 - R ) + D(X) * R
480 PRINT "CONFIDENCE INTERVAL BY SIGN TEST, FRACTIONAL COUNT."
490 PRINT "LOWER LIMIT IS "L; "UPPER LIMIT IS "U
500 STOP
900  DATA  12, 2.2, 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