10 PRINT "POISSON DISTRIBUTION"
20 PRINT
30 PRINT "(TO END PROGRAM ENTER 0)"
40 PRINT "CALCULATED FREQUENCY";
50 INPUT L
59 REM - END PROGRAM?
60 IF L=0 THEN 180
70 PRINT "TEST FREQUENCY";
80 INPUT X
89 REM - COMPUTE FACTORIAL
90 A=1
100 FOR I=1 TO X
110 A=A*I
120 NEXT I
129 REM - COMPUTE PROBABILITY
130 A=LOG(A)
140 A=EXP(-L+X*LOG(L)-A)
150 PRINT "PROBABILITY OF";X;"OCCURRENCES =";A
160 PRINT
169 REM - RESTART PROGRAM
170 GOTO 40
180 END
