10 PRINT "MEAN, VARIANCE,  ";
20 PRINT "STANDARD DEVIATION"
30 PRINT
40 PRINT "METHOD (0=POPULATION,  1=SAMPLE);
41 INPUT S
50 PRINT "DATA (0=GROUPED, 1=UNGROUPED);
60 INPUT K
70 PRINT "NUMBER OF OBSERVATIONS";
80 INPUT N
90 R=0
100 M=0
110 P=0
120 IF K=1 THEN 230
130 FOR I=1 TO N
140 PRINT "ITEM, FREQUENCY ";I;
150 INPUT A,B
160 R=R+B*A
170 P=P+B
180 M=M+B*A^2
190 NEXT I
200 R=R/P
210 V=(M-P*R^2)/(P-S)
220 GOTO 310
230 FOR I=1 TO N
240 PRINT  "ITEM ";I;
250 INPUT D
260 P=P+D
270 M=M+D^2
280 NEXT I
290 R=P/N
300 V=(M-N*R^2)/(N-S)
310 PRINT
320 PRINT  "MEAN","VARIANCE"
330 PRINT R,V
340 PRINT
350 PRINT  "STANDARD DEVIATION"
360 PRINT SQR(V)
370 PRINT
380 PRINT "MORE DATA? (1=YES,  0=NO)";
390 INPUT S
400 IF S=1 THEN 30