Google
 

Trailing-Edge - PDP-10 Archives - decus_20tap1_198111 - decus/20-0020/stat03.sta
There are 2 other files named stat03.sta in the archive. Click here to see a list.
100'  NAME--STAT03
110'
120'  DESCRIPTION--COMPUTES THE MEANS, VARIANCES, AND T-RATIO
130'  FOR TWO GROUPS OF UNPAIRED DATA. THIS PROGRAM ASSUMES THAT THE
140'  GROUPS MAY HAVE UNEQUAL VARIANCES
150'
160'  SOURCE--UNKNOWN
170'
180'  INSTRUCTIONS--PUT DATA IN LINE 900 AND FOLLOWING.
190'  MAKE SURE THE DATA LINE NUMBERS DO NOT EXCEED 919.
200'  END THE FIRST SERIES OF DATA WITH 999999, AND THEN
210'  TYPE IN THE SECOND SERIES,AGAIN ENDING WITH 999999.
220'  SAMPLE DATA ARE IN LINES 900 AND 910.
230'
240'
250'  *  *  *  *  *  *  *   MAIN PROGRAM  *  *  *  *  *  *  *  *  *  *  *
260'
270  LET P = 1
280  LET S = 0
290  LET S2 = 0
300  LET N = 0
310  READ X
320  IF X = 999999 THEN 370
330  LET S = S + X
340  LET S2 = S2 + X*X
350  LET N = N + 1
360  GO TO 310
370  LET S(P) = S
380  LET Z(P) = S2
390  LET N(P) = N
400  IF P = 2 THEN 430
410  LET P = 2
420  GO TO 280
430  REM  NOW WE PRINT THE ANSWERS
440  PRINT "GROUP", "NUMBER", "MEAN", "VARIANCE", "STD. DEV."
450  PRINT
460  FOR I = 1 TO 2
470  LET M(I) = S(I)/N(I)
480  LET V(I) = (N(I)*Z(I) - S(I)*S(I))/N(I)/(N(I) - 1)
490  LET D(I) = SQR(V(I))
500  PRINT I, N(I), M(I), V(I), D(I)
510  NEXT I
520  LET Q = V(1) / N(1) + V(2) / N(2)
530  LET W = SQR(Q)
540  LET R = M(1) - M(2)
550  LET K = V(1) / N(1) / Q
560  LET D = 1/( K*K/(N(1) - 1) + (1-K)*(1-K)/(N(2) - 1) )
570  PRINT
580  PRINT "MEAN DIFF.", "VAR. DIFF.", "STD. DEV. DIFF."
590  PRINT R, Q, W
600  PRINT
610  PRINT "T RATIO", R/W ,  "ON"; D;"DEGREES OF FREEDOM."
620  STOP
900  DATA  160, 160, 140, 190, 999999
910  DATA  117, 145, 147, 120, 150, 120, 999999
920  END