5 ONERRORGOTO1000
10 MODE8:DIM:ERASEa,a$:DIMa(5),a$(1):a$(1)="Input":a$(0)="Delete":c$=CHR$(5)
20 CLS:PRINT"Statistics [x]";TAB(0);">In,Del,Clear,List,T-score,P ?";
30 a=ASC(INPUT$(1)):IFa>96 THENa=a-32
40 ONa-66 GOTO300,100,,,,,100,,,500,,,,800,,,,400
50 GOTO30
100 CLS:PRINTa$(SGN(a-68));" data (x)";TAB(21);"[EXE]:menu";:z=SGN(a-69)
110 LOCATE0,1:PRINTc$;"x?";
120 LOCATE2,1:INPUT@12;z$:LOCATE0,0:IFz$="" THEN20 ELSEx=VALF(z$)
150 r=sa+z:s=sb+x*z:u=sd+x*x*z
160 sa=r:sb=s:sd=u:GOTO110
200 c=6
210 sg=sb/sa
220 sm=sd-sg*sb:IFsm<0 THENsm=0
250 si=SQR(sm/sa)
260 sk=SQR(sm/(sa-1))
280 RETURN
300 PRINTc$;"clear data (Y/N) ?";
310 a$=INPUT$(1,@):IFa$<>"Y" ANDa$<>"y" THEN20
320 sa=0:sb=0:sd=0:GOTO20
400 GOSUB200:IFc<6 ORsi=0 THEN20
430 LOCATE0,1:PRINTc$;"x?";:INPUT@10;z$:LOCATE0,0:IFz$="" THEN20 ELSEs=VALF(z$)
440 LOCATE12,1:PRINT":T=";ROUND((s-sg)/si*10+50,-2);:z$=INPUT$(1,@):GOTO430
500 CLS:GOSUB200:GOSUB580:i=1:GOSUB600:i=2
510 GOSUB600
520 z=ASC(INPUT$(1,@)):IFz=28 ORz=29 THEN20
530 IFz<>13 ANDz<>30 ANDz<>31 THEN520
540 IF(z=30 ANDi=1) OR(z=31 ANDi=c) THEN520
550 IFz=30 THENi=i-2
560 i=i+1:IFi=<c THEN510 ELSE20
580 DEFCHR$(254)="0808003E00"
590 a(0)=sa:a(1)=sb:a(2)=sd:a(3)=sg:a(4)=si:a(5)=sk:RETURN
600 RESTORE(600+i*10):READa$,b$:PRINTTAB(0);a$;TAB(7);":";b$;TAB(13);"=";a(i-1);:RETURN
610 DATACNT,n
620 DATASUMX,∑x
630 DATASUMX2,∑x²
640 DATAMEANX,∑x/n
650 DATASDXN,x𝜎n
660 DATASDX,x𝜎n➂
800 LOCATE0,1:PRINTc$;".....";:GOSUB200:GOSUB590:RESTORE 610
810 FORi=1 TOc:READa$,b$:LPRINTa$;TAB(10);"=";a(i-1):NEXT:GOTO20
1000 IFERR=1 THENCLS:ONERRORGOTO0
1010 IFERL=120 THENRESUME120
1030 IFERL=430 THENRESUME430
1050 IFERL=210 THENc=3:RESUME280
1060 IFERL=260 THENc=5:RESUME280
1080 IFERL=150 THENLOCATE0,1:PRINTc$;"data over";:z$=INPUT$(1,@):RESUME20
1090 LOCATE0,1:PRINTc$;"not found";:a$=INPUT$(1,@):RESUME20