Web pdp-10.trailing-edge.com

Trailing-Edge - PDP-10 Archives - decuslib20-01 - decus/20-0020/tvalue.sta
There are 2 other files named tvalue.sta in the archive. Click here to see a list.
```100'  NAME--TVALUE
110'
120'  DESCRIPTION--COMPUTES THE TWO-TAILED PROBABILITY OF A T-VALUE.
130'
140'  SOURCE--PROGRAMMED BY VICTOR E. MCGEE, DARTMOUTH COLLEGE,
150'  HANOVER, N.H. 03755 AFTER THE FORTRAN PROGRAM GIVEN IN
160'  DONALD J. VELDMAN'S BOOK "FORTRAN PROGRAMMING FOR THE
170'  BEHAVIORAL SCIENCES" (HOLT,RINEHART AND WINSTON,1967,P.131)
180'
190'  INSTRUCTIONS-TYPE "RUN" AND FOLLOW THE DIRECTIONS.
200'
210'
220'  *  *  *  *  *  *   MAIN PROGRAM   *  *  *  *  *  *  *  *  *
230'
240 PRINT "ENTER THE T-VALUE AND THE D.F."
250 INPUT G1,N
260 LET M=1
270 LET G=G1*G1
280 LET P=1
290 IF G*M*N=0 THEN 520
300 IF G<1 THEN 350
310 LET A=M
320 LET B=N
330 LET F=G
340 GO TO 380
350 LET A=N
360 LET B=M
370 LET F=1/G
380 LET A1=2/(9*A)
390 LET B1=2/(9*B)
400 LET Z=ABS((1-B1)*F^(.333333)-1+A1)
410 LET Z=Z/SQR(B1*F^(.666667)+A1)
420 IF B<4 THEN 460
430 LET P=(1+Z*(.196854+Z*(.115194+Z*(.000344+Z*.019527))))^4
440 LET P=.5/P
450 GO TO 480
460 LET Z=Z*(1+.08*Z^4/B^3)
470 GO TO 430
480 IF G<1 THEN 500
490 GO TO 540
500 LET P=1-P
510 GO TO 540
520 PRINT "YOU HAVE ERRED - INPUT THE TWO VALUES AGAIN"
530 GO TO 250
540 PRINT
550 PRINT
560 PRINT"EXACT PROBABILITY OF T="G1;"(TWO-TAILED TEST) WITH"N"D.F/"
570 PRINT
580 PRINT "    IS "INT(100000*P)/100000
590 END

```