Sitenotice: 11/29/2018: The wiki is back. It turns out, some anti-virus product on my web server had an issue with the latest version of PHP. My server techs have resolved this issue, and things should be working again. During the investigation, I did restore to a backup from September. There is a chance that any changes done since then were lost, but I do not recall any edits. --OS-9 Al

8/30/2016: Massive re-work is being done on the InfoBox Templates. Read that page to keep up with the plan for that, and adding better keyword tags (categories) to all the pages. --OS-9 Al (talk) 15:28, 31 August 2016 (CDT)

STATS

From CoCopedia - The Tandy/Radio Shack Color Computer Wiki
Jump to navigation Jump to search
100 DIM A(300)
110 I=1
120 CLS: PRINT @5,"STATISTICAL ANALYSIS"
130 PRINT @64,"ENTER NUMBER,";CHR$(13);" END BY 1E30";: INPUT A(I)
140 IF A(I)=1E+30 THEN 160
150 I=I+1: PRINT @111,"": PRINT : GOTO 130
160 IF I>3 THEN 180
170 PRINT"NUST BE 3 ENTRIES OR GREATER": FOR K=1 TO 1000: NEXT X: GOTO 110
180 CLS: PRINT"SORTING";
190 C=0
200 FOR J=1 TO I-2
210 PRINT".";
220 IF A(J+1)>=A(J) THEN 240
230 B=A(J): A(J)=A(J+1): A(J+1)=B: C=1
240 NEXT J
250 IF C=1 THEN 190
260 CLS: LP=3
270 PRINT "LIST OF ORDERED DATA"
280 PRINT " N     VALUE"
290 T=0: TS=0
300 FOR J=1 TO I=1
310 T=T+A(J): TS=TS+A(J)^2
320 PRINT J;TAB(8);A(J);
330 IF J=INT(I/2) THEN PRINT "(MEDIAN)": GOTO 350
340 PRINT
350 GOSUB 580
360 NEXT J
370 GOSUB 600
380 CLS: LP=3
390 PRIMT"FREQUENCY DISTRIBUTION"
400 PRINT " #             #TIMES"
410 C=1: LC=1: N=1
420 FOR J=1 TO I-1
430 IF A(J+1)=A(J) THEN C=C+1: GOTO 470
440 PRINT A(J),C: IF C>LC THEN LC=C: N=A(J)
450 GOSUB 580
460 C=1
470 NEXT J
480 GOSUB 600
490 CLS
500 PRINT "SUM OF ENTRIES=";T
510 PRINT "MEAN";T/(I-1)
520 PRINT "SUM OF SQUARES=";TS
530 V=(TS/(I-1))-(T/(I-1))^2
540 PRINT "VARIANCE";V
550 PRINT "STAN DEVIATION=";SQR(V)
560 GOSUB 600
510 GOTO 110
580 LP=LP+1: IF LP<>15 THEN 630
590 LP=1
600 PRINT "PRESS ANY KEY TO CONTINUE"
610 A$=INKEY$: IF AS="" THEN 610
620 CLS
630 RETURN