Trailing-Edge
-
PDP-10 Archives
-
decuslib20-04
-
decus/20-0113/cmodc.bas
There are 2 other files named cmodc.bas in the archive. Click here to see a list.
00011 C0=C0
00020 REM CMODC
00060X=C0
00063T4=C0
00065V4=C0
00070F2=C0
00075GOSUB 6060
00080 FILES RFILE1,RFILE2,RFILE3
00100RESTORE#1
00101 INPUT# 1,I1,I2,I3
00125IF I3=8 THEN 2210
00130SCRATCH#1
00131 PRINT # 1,12,I2,I3
00135RESTORE#3
00136 INPUT# 3,G,M0,M0,L1
00140V7=C0
00145V8=C0
00150L9=C0
00155REM
00165REM
00175IF G=C0 THEN 185
00180L9=1
00185V8=C0
00190PRINT L$
00195PRINT " EVALUATION OF A STUDENT'S T DISTRIBUTION"
00200PRINT
00205PRINT "THIS MODULE ALLOWS YOU TO EXAMINE THE CHARACTERISTICS OF A"
00210PRINT "STUDENT'S T DISTRIBUTION."
00215GOTO 315
00220PRINT
00225PRINT "TYPE THE NUMBER OF THE OPTION YOU WANT."
00230PRINT " 1. PERCENTILES"
00235PRINT " 2. HIGHEST DENSITY REGIONS"
00240PRINT " 3. PROBABILITY T IS LESS THAN SOME VALUE"
00245PRINT " 4. PROBABILITY T IS BETWEEN TWO VALUES"
00250PRINT " 5. PERCENTILES FOR TRUNCATED T DISTRIBUTION"
00255PRINT " 6. GRAPH OF THE DENSITY FUNCTION"
00260PRINT " 7. EXIT MODULE"
00265PRINT
00270GOSUB 9000
00275I=O1
00280IF I=7 THEN 1415
00285 GOTO 560
00290REM
00295REM V8=1 IF YOU DO NOT WANT TO CHANGE DISTRIBUTIONS
00305REM
00310IF V8=1 THEN 220
00315IF L9=C0 THEN 350
00320GOTO 220
00350PRINT
00355PRINT "INPUT THE DEGREES OF FREEDOM OF THE DISTRIBUTION.";
00360GOSUB 9000
00365G=O1
00370IF G<3 THEN 520
00375PRINT
00380PRINT "INPUT MEAN.";
00385GOSUB 9000
00390M0=O1
00395PRINT
00400PRINT "IF YOU WANT TO INPUT THE SCALE PARAMETER TYPE 1."
00405PRINT "IF YOU WANT TO INPUT THE STANDARD DEVIATION TYPE 2."
00410GOSUB 9000
00415C=O1
00420IF C=1 THEN 485
00425IF C=2 THEN 440
00430PRINT "REENTER. INPUT MUST BE 1 OR 2.";
00435GOTO 410
00440PRINT
00445PRINT "INPUT THE STANDARD DEVIATION OF THE DISTRIBUTION.";
00450GOSUB 9000
00455S1=O1
00460IF S1>0 THEN 475
00465PRINT "REENTER. STANDARD DEVIATION MUST BE POSITIVE."
00470GOTO 445
00475L1=S1 ** 2*(G-2)
00480GOTO 220
00485PRINT
00490PRINT "INPUT SCALE PARAMETER.";
00495GOSUB 9000
00500L1=O1
00505IF L1>0 THEN 220
00510PRINT "REENTER. SCALE PARAMETER MUST BE POSITIVE."
00515GOTO 490
00520PRINT "REENTER. MINIMUM DEGREES OF FREEDOM EQUALS 3."
00525GOTO 350
00560S0=SQR(L1/(G-2))
00565T4=C0
00570IF I=3 THEN 1025
00575IF I=4 THEN 1200
00580IF I=2 THEN 875
00585IF I=5 THEN 610
00590IF I=1 THEN 1725
00595IF I=6 THEN 2510
00600PRINT "REENTER. YOU DID NOT SPECIFY 0 OR ACCEPTABLE VALUE."
00605GOTO 270
00610PRINT L$
00615F2=C0
00620L2=-9.E+23
00625L3=C0
00630L5=C0
00635U3=C0
00640P=C0
00645PRINT "IF THE DISTRIBUTION IS LEFT-TRUNCATED TYPE '1', ELSE '0'.";
00650GOSUB 9000
00655IF O1=C0 THEN 765
00660L3=1
00665PRINT
00670PRINT "INPUT WHERE IT IS LEFT-TRUNCATED.";
00675GOSUB 9000
00680L2=O1
00685Y0=ABS(M0-L2)
00690X3=L2
00695GOSUB 705
00700GOTO 755
00705Y3=Y0/S0/SQR((G-2)/G)
00710J1=C0
00715J2=Y3
00720GOSUB 6000
00725P=P-.5
00730IF X3<M0 THEN 745
00735P=.5+P
00740GOTO 750
00745P=.5-P
00750RETURN
00755F2=P
00760L5=P
00765PRINT
00770PRINT "IF IT IS RIGHT-TRUNCATED TYPE '1', ELSE '0'.";
00775GOSUB 9000
00780PRINT
00785IF O1 <> 0 THEN 800
00790F2=1-P
00795GOTO 1725
00800U3=1
00805PRINT "INPUT WHERE IT IS RIGHT-TRUNCATED.";
00810GOSUB 9000
00815IF O1>L2 THEN 835
00820PRINT L$
00825PRINT "REENTER. RIGHT-TRUNCATED POINT MUST BE LARGER THAN LEFT ONE."
00830GOTO 615
00835U2=O1
00840Y0=ABS(M0-U2)
00845X3=U2
00850GOSUB 705
00855F2=P-F2
00860GOTO 1725
00865PRINT
00875PRINT L$
00880T4=1
00885PRINT " OPTION 2: HIGHEST DENSITY REGIONS"
00890PRINT
00895PRINT "TO EXIT ROUTINE TYPE '0' WHEN ASKED FOR INPUT."
00900PRINT "INPUT P% AS NUMBER FROM 5 THROUGH 99."
00901 GOSUB 905
00902 GOTO 915
00905PRINT"-----------------------------------------------------------"
00910 RETURN
00915GOSUB 1485
00920PRINT "INPUT P%";
00925GOSUB 9000
00930IF O1=C0 THEN 1585
00935J5=O1
00940J5=J5/100
00945IF J5>.99 THEN 990
00950IF J5<.05 THEN 990
00955P1=50+50*J5
00960GOTO 1920
00965J2=X3
00970J1=2*M0-X3
00975PRINT USING 980,J5*100,J1,J2
00980: ##.##% HDR = #####.## TO#####.##
00985GOTO 920
00990PRINT
00995PRINT "P% MUST BE AT LEAST 5% AND NOT GREATER THAN 99%. REENTER."
01000PRINT
01005GOTO 920
01025PRINT L$
01030PRINT " OPTION 3: PROBABILITY T IS LESS THAN SOME VALUE"
01035PRINT
01040PRINT "TO EXIT ROUTINE TYPE '7777' WHEN ASKED FOR INPUT."
01045 GOSUB 905
01050GOSUB 1485
01055PRINT "INPUT VALUE";
01060GOSUB 9000
01065IF O1=7777 THEN 1585
01070X3=O1
01075Y0=ABS(M0-X3)
01080Y3=Y0/S0/SQR((G-2)/G)
01085J1=C0
01090J2=Y3
01095GOSUB 6000
01100P=P-.5
01105IF X3<M0 THEN 1120
01110P=.5+P
01115GOTO 1125
01120P=.5-P
01125IF T4=1 THEN 1995
01130IF I3 <> 8 THEN 1140
01135RETURN
01140IF V7=1 THEN 1995
01145: PROB( T <#####.## ) =##.##
01150PRINT USING 1145,X3,P
01155: PROB( T >#####.## ) =##.##
01160PRINT USING 1155,X3,1-P
01165GOTO 1055
01200PRINT L$
01205PRINT " OPTION 4: PROBABILITY T IS BETWEEN TWO VALUES"
01210PRINT
01215PRINT "TO EXIT ROUTINE TYPE '0' WHEN ASKED FOR INPUT."
01220PRINT "----------------------------------------------------"
01225GOSUB 1485
01230PRINT "INPUT SMALLER VALUE.";
01235GOSUB 9000
01240X3=O1
01245PRINT "INPUT LARGER VALUE.";
01250GOSUB 9000
01255IF X3 <> 0 THEN 1265
01260IF O1=C0 THEN 1585
01265X4=O1
01270IF X3 >= X4 THEN 1465
01275Y0=ABS(M0-X3)
01280Y3=Y0/S0/SQR((G-2)/G)
01285B=.5*G
01290J1=C0
01295J2=Y3
01300GOSUB 6000
01305P=P-.5
01310IF X3<M0 THEN 1325
01315P3=.5+P
01320GOTO 1330
01325P3=.5-P
01330Y0=ABS(M0-X4)
01335Y3=Y0/S0/SQR((G-2)/G)
01340J1=C0
01345J2=Y3
01350GOSUB 6000
01355P4=P-.5
01360IF X4<M0 THEN 1375
01365P4=.5+P4
01370GOTO 1380
01375P4=.5-P4
01380PRINT USING 1385,X3,X4,P4-P3
01385: PROB(####.## < T <#####.##) =##.##
01390GOTO 1230
01415IF L9=C0 THEN 1460
01420PRINT "IF YOU WANT TO EVALUATE POSTERIOR ON ST. DEV. TYPE '1'."
01425PRINT "IF YOU DO NOT TYPE '0'."
01430GOSUB 9000
01435IF O1=1 THEN 1455
01440IF O1=C0 THEN 1460
01445PRINT "REENTER. INPUT MUST BE 0 OR 1."
01450GOTO 1430
01455CHAIN "CMODD"
01460CHAIN "RSTRT"
01465PRINT
01470PRINT "REENTER. SMALLER VALUE MUST BE ENTERED FIRST."
01475PRINT
01480GOTO 1230
01485REM GOSUB TO PRINT PARAMETERS OF DISTRIBUTION
01490IF F2=C0 THEN 1550
01495PRINT " TRUNCATED STUDENT'S T DISTRIBUTION"
01500 GOSUB 905
01505IF L3=C0 THEN 1520
01510 REM
01515PRINT"LEFT-TRUNCATED AT ";L2;
01520IF U3=C0 THEN 1535
01525:RIGHT-TRUNCATED AT ######.##
01530PRINT USING 1525,U2
01535PRINT
01540 GOSUB 905
01545GOTO 1560
01550PRINT " STUDENT'S T DISTRIBUTION"
01555:DEGREES OF FREEDOM =######.## MEAN =######.##
01560PRINT USING 1555,G,M0
01565:SCALE PARAMETER =######.## STANDARD DEVIATION =######.##
01570PRINT USING 1565,L1,S0
01575 GOSUB 905
01580RETURN
01585PRINT L$
01590V7=C0
01595F2=C0
01600V8=C0
01605PRINT "TYPE THE NUMBER OF THE OPTION YOU WANT."
01610PRINT " 1. FURTHER EVALUATE THIS DISTRIBUTION"
01615IF L9=C0 THEN 1630
01620PRINT " 2. EVALUATE POSTERIOR DISTRIBUTION ON ST. DEV."
01625GOTO 1635
01630PRINT " 2. EVALUATE A DIFFERENT STUDENT'S DISTRIBUTION"
01635PRINT " 3. EXIT MODULE"
01640GOSUB 9000
01645IF O1=1 THEN 1680
01650IF L9=C0 THEN 1665
01655IF O1=2 THEN 1455
01660GOTO 1670
01665IF O1=2 THEN 1685
01670IF O1 <> 3 THEN 1695
01675GOTO 1460
01680V8=1
01685PRINT L$
01690GOTO 310
01695PRINT "REENTER. INPUT MUST BE 1,2 OR 3."
01700PRINT
01705GOTO 1640
01725PRINT L$
01730IF F2=C0 THEN 1745
01735PRINT " OPTION 5: PERCENTILES OF TRUNCATED DISTRIBUTION"
01740GOTO 1750
01745PRINT " OPTION 1: PERCENTILES"
01750PRINT
01755PRINT "TO EXIT ROUTINE TYPE '0' WHEN ASKED FOR INPUT."
01760PRINT "INPUT PERCENTILE AS NUMBER FROM .5 THROUGH 99.5."
01765 GOSUB 905
01770GOSUB 1485
01775V7=1
01780PRINT "INPUT PERCENTILE";
01785GOSUB 9000
01790IF O1=C0 THEN 1585
01795IF O1<.5 THEN 1805
01800IF O1 <= 99.5 THEN 1825
01805PRINT
01810PRINT "PERCENTILES MUST BE AT LEAST .5 AND NOT MORE THAN 99.5."
01815PRINT
01820GOTO 1780
01825P1=O1
01830K0=M0
01835L0=S0
01840M0=C0
01845S0=SQR(G/(G-2))
01850IF F2 <> 0 THEN 1875
01855IF P1 <> 50 THEN 1920
01860X3=M0
01865IF F2 <> 0 THEN 1920
01870GOTO 2050
01875IF L3=C0 THEN 1890
01880E1=(L2-K0)/L0/(SQR(G-2)/SQR(G))
01885GOTO 1895
01890E1=K0-14*L0
01895IF U3=C0 THEN 1910
01900E2=(U2-K0)/L0/(SQR(G-2)/SQR(G))
01905GOTO 1970
01910E2=M0+14*L0
01915GOTO 1970
01920P2=P1/100
01925GOSUB 5000
01927P5=C0
01930IF ABS(P1/100-P)<.0001 THEN 1985
01931IF P>P1/100 THEN 1942
01935P5=1
01940E1=M0+J2*S0*SQR((G-2)/G)
01941GOTO 1945
01942E2=M0+J2*S0*SQR((G-2)/G)
01943P2=P1/100-.004
01944GOTO 1950
01945P2=P1/100+.004
01950GOSUB 5000
01955IF ABS(P1/100-P)<.0001 THEN 1985
01960IF P5=1 THEN 1965
01962E1=M0+J2*S0*SQR((G-2)/G)
01963GOTO 1970
01965E2=M0+J2*S0*SQR((G-2)/G)
01970X3=E1+.5*(E2-E1)
01975P5=.5
01980GOTO 1075
01985X3=M0+J2*S0*SQR((G-2)/G)
01990GOTO 2050
01995IF F2=C0 THEN 2015
02000IF ABS((P-L5)/F2-P1/100)<.0005 THEN 2050
02002IF E2-E1<.0001 THEN 2050
02005IF (P-L5)/F2>P1/100 THEN 2040
02010GOTO 2030
02015IF E2-E1<.0001 THEN 2050
02020IF ABS(P-P1/100)<.0001 THEN 2050
02025IF P>P1/100 THEN 2040
02030E1=X3
02035GOTO 1970
02040E2=X3
02045GOTO 1970
02050IF F2=C0 THEN 2090
02055: ###.## PERCENTILE (TRUNCATED) =#####.##
02060PRINT USING 2055,P1,K0+L0*X3*SQR((G-2)/G)
02065GOTO 2105
02070: ###.## PERCENTILE =#####.##
02075PRINT USING 2070,P1,K0+X3*L0*SQR((G-2)/G)
02080GOTO 2135
02085: ###.## PERCENTILE (UNTRUN'ED) =#####.##
02090IF T4=1 THEN 965
02095IF V4=C0 THEN 2075
02100PRINT USING 2085,P1,K0+X3*L0*SQR((G-2)/G)
02105IF V4=-77 THEN 2150
02110IF F2=C0 THEN 2135
02115V3=F2
02120F2=C0
02125V4=-77
02130GOTO 1855
02135M0=K0
02140S0=L0
02145GOTO 1780
02150F2=V3
02155V4=C0
02160L3=C0
02165U3=C0
02170GOTO 2135
02210 DIM M(9),U(9),P(3)
02211RESTORE#3
02212FORI=1TO9
02213INPUT#3,M(I)
02214NEXT I
02215FORI=1TO9
02216INPUT#3,U(I)
02217NEXT I
02218FOR I=1 TO3
02219INPUT#3,P(I)
02220 NEXT I
02224PRINT L$
02225G=P(1)
02230M0=P(2)
02235L1=P(3)
02240S0=SQR(L1/(G-2))
02245IF M(9)>M0-4*S0 THEN 2255
02250GOTO 2485
02255IF M(1)<M0+4*S0 THEN 2265
02260GOTO 2495
02265X3=M(1)
02270GOSUB 1075
02275K8=P
02280P0=P
02285K5=2
02290X3=M(9)
02295GOSUB 1075
02300K8=K8+1-P
02305U9=C0
02310P0=C0
02315U0=C0
02320PRINT "STUDENT'S T DISTRIBUTION"
02325PRINT
02330PRINT "DEGREES OF FREEDOM=";G
02335PRINT
02340PRINT "MEAN =";M0;" SCALE PARAMETER =";L1
02345PRINT
02350PRINT "THE EXPECTED UTILITY IS BEING COMPUTED."
02355FOR I7=M(1) TO M(9) STEP (M(9)-M(1))/110
02360I=I7
02365IF I=M(1) THEN 2415
02370IF I>M(K5) THEN 2475
02375X3=I
02380GOSUB 1075
02385U1=(I-M(K5-1))*((U(K5)-U(K5-1))/(M(K5)-M(K5-1)))
02390U1=U(K5-1)+U1
02395U2=(U0+U1)/2
02400U9=U9+U2*(P-P0)
02405P0=P
02410U0=U1
02415NEXT I7
02420U9=U9/(1-K8)
02425PRINT
02430:THE EXPECTED UTILITY IS ##.##.
02435PRINT USING 2430,U9
02440PRINT
02445 DIM V(1)
02448 SCRATCH #3
02449 PRINT#3,1
02450 FOR I=1 TO 9
02451 PRINT#3,M(I)
02452 NEXT I
02453 FOR I=1 TO 9
02454 PRINT#3,U(I)
02455 NEXT I
02456 FOR I=1 TO 3
02457 PRINT#3,P(I)
02458 NEXT I
02460PRINT "WHEN YOU ARE READY TO CONTINUE TYPE '1'.";
02465GOSUB 9000
02470CHAIN "CMODP"
02475K5=K5+1
02480GOTO 2375
02485U9=1
02490GOTO 2425
02495U9=C0
02500GOTO 2425
02510PRINT L$
02515PRINT "OPTION 6: GRAPH OF THE DENSITY FUNCTION OVER 99% HDR"
02520GOSUB 1485
02525J5=.99
02530PRINT "THESE ARE THE PARAMETERS OF THE DISTRIBUTION TO BE GRAPHED."
02535GOSUB 7500
02540Q=SQR((G-2)/G)*S0*J2
02545K0=M0-Q
02550K1=M0+Q
02555PRINT "WHEN YOU ARE READY FOR THE GRAPH TO BE DISPLAYED TYPE '1'";
02560GOSUB 9000
02565PRINT L$
02570GOSUB 9400
02575GOTO 1585
05000REM
05095P3=P2
05100IF P2 <= .5 THEN 5110
05105P2=1-P2
05110A1=SQR(LOG(1/P2/P2))
05115A2=2.51552+.802853*A1+.010328*A1*A1
05120A2=A2/(1+1.43279*A1+.189269*A1*A1+.001308*A1*A1*A1)
05125A2=A1-A2
05130J2=SQR(G*EXP(A2*(G-5/6)*A2/(G-2/3+.1/G)/(G-2/3+.1/G))-G)
05132GOSUB 6000
05135IF P3 <= .5 THEN 5150
05140P2=P3
05145GOTO 5155
05150J2=-J2
05152P=1-P
05155RETURN
05345G9=(1/2)*(G+1)
05350GOSUB 5850
05355D2=G0
05360G9=(1/2)*G
05365GOSUB 5850
05370D2=D2-G0
05375D2=D2+.5*G*LOG(L1)
05380D2=D2-.5*(G+1)*LOG(L1+(J2-M0)*(J2-M0))
05385RETURN
05850 REM
05860G5=G9
05863IF G9 <= 1.E+30 THEN 5872
05866G0=1.E+38
05869RETURN
05872IF G9>1.E-09 THEN 5881
05875G0=C0
05878RETURN
05881IF G9<1.E+10 THEN 5890
05884G0=G9*(LOG(G9)-1)
05887RETURN
05890G6=1
05893IF 18<G5 THEN 5905
05896G6=G6*G5
05899G5=G5+1
05902GOTO 5893
05905R8=1/G5**2
05908G0=(G5-.5)*LOG(G5)-G5+.918939-LOG(G6)
05911C1=8.33333E-02
05914C2=2.77778E-03
05917C3=7.93651E-04
05920C4=5.95238E-04
05923G0=G0+1/G5*(C1-(R8*(C2+(R8*(C3-(R8*(C4)))))))
05926RETURN
06000REM
06008P=C0
06009IF J2<.0001 THEN 6056
06010IF G<6 THEN 6015
06011IF J2<6 THEN 6016
06012P=1
06014GOTO 6058
06015IF J2>12 THEN 6012
06016 DIM W(16),O(16)
06018Y3=J2
06020IF G<10 THEN 6026
06021Y3=(G-2/3+.1/G)*SQR(ABS(LOG(1+J2*J2/G))/(G-5/6))
06022GOSUB 8000
06024GOTO 6058
06025REM PEIZER PRATT APPROXIMATION
06026IF G=1 THEN 6098
06028J1=C0
06030N=G
06032P=C0
06034GOSUB 6084
06036D0=(J2-J1)*.5
06038D1=(J1+J2)*.5
06040FOR I1=1 TO 16
06042D9=D0*O(I1)+D1
06044IF D9=C0 THEN 6050
06046IF D9=1 THEN 6050
06048P=P+W(I1)*(EXP(-(N+1)/2*LOG(1+D9*D9/N)))
06050NEXT I1
06052P=P*F0
06054P=P*D0
06056P=P+.5
06058RETURN
06060FOR I1=1 TO 16
06062READ W(I1),O(I1)
06064NEXT I1
06066DATA 2.71525E-02,-.989401
06068DATA 6.22535E-02,-.944575,9.51585E-02,-.865631
06070DATA .124629,-.755404,.149596,-.617876
06072DATA .169156,-.458017,.182603,-.281604,.189451,-9.50125E-02
06074DATA .189451,9.50125E-02,.182603,.281604,.169156,.458017
06076DATA .149596,.617876,.124629,.755404
06078DATA 9.51585E-02,.865631,6.22535E-02,.944575,2.71525E-02
06080DATA .989401
06082RETURN
06084G9=(N+1)/2
06086GOSUB 5850
06088F0=G0
06090G9=N/2
06092GOSUB 5850
06094F0=EXP(F0-G0)/SQR(3.14159*N)
06096RETURN
06098REM FOLLOWING FOR NU=1
06100P=.5+1/3.14159*ATN(Y3)
06102RETURN
06104REM END OF STUDENT'S T CDF ROUTINE
06106REM*************************************************************
07500REM ************************************************************
07501REM STUDENT'S T DISTRIBUTION HIGHEST DENSITY REGIONS
07502REM INPUTS G J5
07503REM J2
07504REM
07505Z8=.5
07506N=G
07507X9=1
07508J1=C0
07509J2=X9
07510GOSUB 6000
07511P=2*P-1
07512Z9=P
07513IF P>J5 THEN 7517
07514X9=X9+2
07515Z8=Z9
07516GOTO 7508
07517X0=X9-2
07518X2=X9
07519X9=X0+(J5-Z8)*(X2-X0)/(Z9-Z8)
07520J1=C0
07521J2=X9
07522GOSUB 6000
07523P=2*P-1
07524IF ABS(X2-X9)<.0001 THEN 7541
07525IF P<J5 THEN 7538
07526X2=X9
07527Z9=P
07528X9=(J5-Z8)/(Z9-Z8)
07530IF X9<.85 THEN 7533
07531X9=X0+.85*(X2-X0)
07532GOTO 7520
07533IF X9>.15 THEN 7536
07534X9=X0+.15*(X2-X0)
07535GOTO 7520
07536X9=X0+X9*(X2-X0)
07537GOTO 7520
07538X0=X9
07539Z8=P
07540GOTO 7528
07541J2=X9
07542RETURN
08000REM
08005Y4=ABS(Y3)
08010X1=X
08015X=Y3
08020T=1/(1+.231642*Y4)
08021IF X*X/2<80 THEN 8025
08022D=C0
08023GOTO 8030
08025D=.398942*EXP(-X*X/2)
08030C1=1.33027
08035C2=1.82126
08040C3=1.78148
08045C4=.356564
08050C5=.319382
08055P=1-D*T*((((C1*T-C2)*T+C3)*T-C4)*T+C5)
08060IF X >= 0 THEN 8070
08065P=1-P
08070X=X1
08075RETURN
09000REM
09005INPUT O1
09015IF O1=-9999 THEN 9025
09020RETURN
09025CHAIN "RSTRT"
09400 REM
09412 T$=">>>>>>>>>1>>>>>>>>>2>>>>>>>>>3>>>>>>>>>4>>>>>>>>>5>>>>>>"
09414 S$="\\\\\\\\\I\\\\\\\\\I\\\\\\\\\I\\\\\\\\\I\\\\\\\\\I"
09416 U$="/////////I/////////I/////////I/////////I/////////I"
09420REM
09423: DF=######.## MEAN=########.## ST.DEV=#######.##
09426GOTO 9520
09450 :#####.## I'LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLCONTINUE=1
09458IF ABS(J2)>9999 THEN 9560
09460IF J2>M0+.4*K2 THEN 9472
09461IF J2<M0-.4*K2 THEN 9466
09462 PRINT USING 9466,J2,MID$(T$,1,K7-(1)+1)
09464GOTO 9474
09466:#####.## I'LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
09468 PRINT USING 9466,J2,MID$(S$,1,K7-(1)+1)
09470GOTO 9474
09472 PRINT USING 9466,J2,MID$(U$,1,K7-(1)+1)
09474RETURN
09520K2=(K1-K0)/19
09522J2=M0
09523PRINT USING 9423,G,M0,S0
09524GOSUB 5345
09526D6=D2
09528IF K1-K2-K0<.01 THEN 9582
09530FOR J2=K0 TO K1-.9*K2 STEP K2
09532GOSUB 5345
09533K7=EXP(D2-D6+LOG(50))
09534 IF K7>=1 THEN 9536
09535 K7=1
09536GOSUB 9458
09538NEXT J2
09540J2=K1
09542GOSUB 5345
09543K7=EXP(D2-D6+LOG(50))
09544 IF K7>=1 THEN 9547
09545 K7=1
09547IF ABS(J2)>9999.99 THEN 9575
09548 PRINT USING 9450,K1,MID$(U$,1,K7-(1)+1)
09555GOSUB 9000
09556RETURN
09560IF J2>M0+.4*K2 THEN 9572
09561IF J2<M0-.4*K2 THEN 9566
09562 PRINT USING 9566,J2,MID$(T$,1,K7-(1)+1)
09564RETURN
09566:##.##++++ I'LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
09568 PRINT USING 9566,J2,MID$(S$,1,K7-(1)+1)
09570RETURN
09572 PRINT USING 9566,J2,MID$(U$,1,K7-(1)+1)
09574RETURN
09575 PRINT USING 9580,K1,MID$(U$,1,K7-(1)+1)
09577GOTO 9555
09580 :##.##^^^^ I'LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLCONTINUE=1
09582PRINT"COULD NOT CALCULATE HDR. TYPE '1' TO CONTINUE."
09587GOTO 9555
09999 END