MediaWiki:Sitenotice:
2024-03-02: The wiki ran out of disk space, so things were not working. This has been resolved by adding another 5GB of quota ;-) Thanks to Tim Lindner for reporting the issues. 2020-05-17: If a page gives you an error about some revision not being found, just EDIT the page and the old page should appear in the editor. If it does, just SAVE that and the page should be restored. OS-9 Al (talk) 12:22, 17 May 2020 (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