--- title: "Program Printout: Probability" type: "article" slug: "program-printout-probability" url: "http://localhost/article/program-printout-probability/" markdown_url: "http://localhost/article/program-printout-probability.md" published_at: "2020-10-27T17:09:13+00:00" modified_at: "2025-09-23T19:25:26+00:00" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "Poisson's formula is a method of calculating the possibilities of recurrence of an event, based on a number of occurrences in the past. For this listing, the time should be adjusted so that the number of occurrences is in the range 3 to 12. The range could be extended upwards if required, but 2 has…" category: - name: "Timex Sinclair User" slug: "timex-sinclair-user" taxonomy: "category" url: "http://localhost/category/periodicals/timex-sinclair-user/" post_tag: - name: "1983" slug: "year-1983" taxonomy: "post_tag" url: "http://localhost/tag/year-1983/" - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "TS 1000" slug: "ts1000" taxonomy: "post_tag" url: "http://localhost/tag/ts1000/" - name: "Type-in program" slug: "type-in-program" taxonomy: "post_tag" url: "http://localhost/tag/type-in-program/" model: - name: "Timex/Sinclair 1000" slug: "ts-1000" taxonomy: "model" url: "http://localhost/model/ts-1000/" publication: "Timex Sinclair User" publication_r: id: 10278 title: "Timex Sinclair User" type: "periodical" url: "http://localhost/periodical/timex-sinclair-user/" volume: "1" issue: "1" issues_articles: - id: 26866 title: "Timex Sinclair User n1" type: "issue" url: "http://localhost/issue/timex-sinclair-user-n1/" pages: "35" pubdate: "June 1983" download: "http://localhost/wp-content/uploads/2023/04/Probability.p.zip" archive_link: false volumeissue: "v1n1" article_media: - id: 60606 title: "Probability" type: "computer_media" url: "http://localhost/computer_media/probability/" --- # Program Printout: Probability Poisson’s formula is a method of calculating the possibilities of recurrence of an event, based on a number of occurrences in the past. For this listing, the time should be adjusted so that the number of occurrences is in the range 3 to 12. The range could be extended upwards if required, but 2 has been omitted as it would mean an unreliably small sample. The formula here is applied with a correction factor but that will not distort the results, since the same percentage is applied to all answers, thus keeping them in the same proportion. ## Source Code: Probability ``` 9 CLEAR 10 PRINT " LONG TERM PROBABILITY STUDY" 11 LET S=0 12 LET T=0 13 LET U=0 14 LET V=0 15 LET W=0 16 LET X=0 17 LET Y=0 18 LET Z=0 20 LET AA=0 22 LET BB=0 25 PRINT 30 PRINT "INPUT THE MAXIMUM OCCURRENCES IN ANY ONE UNIT OF TIME " 31 PRINT 32 PRINT " RANGE ALLOWED 3 TO 12" 40 INPUT A 45 CLS 50 PRINT "INPUT TOTAL OCCURENCES" 60 INPUT B 70 PRINT 80 PRINT "INPUT TOTAL TIME" 90 INPUT C 95 CLS 100 LET D=B/C 110 LET E=(1+(1/B))**B 120 LET F=1/(E**D) 130 LET P=F 140 LET Q=D*F 150 LET R=D**2/2*F 160 IF A>=3 THEN LET S=D**3/6*F 170 IF A>=4 THEN LET T=D**4/24*F 180 IF A>=5 THEN LET U=D**5/120*F 190 IF A>=6 THEN LET V=D**6/720*F 200 IF A>=7 THEN LET W=D**7/5040*F 210 IF A>=8 THEN LET X=D**8/40320*F 220 IF A>=9 THEN LET Y=D**9/362880*F 230 IF A>=10 THEN LET Z=D**10/3628800*F 233 IF A>=11 THEN LET AA=D**11/39916800*F 237 IF A=12 THEN LET BB=D**12/479001600*F 240 PRINT "PROBABILITY OF","PERCENT" 250 PRINT 252 REM CORRECTION FACTOR 255 LET N=P+Q+R+S+T+U+V+W+X+Y+Z+AA+BB 260 LET PP=(INT (P*10000/N+0.5))/100 270 LET QQ=(INT (Q*10000/N+0.5))/100 280 LET RR=(INT (R*10000/N+0.5))/100 290 LET SS=(INT (S*10000/N+0.5))/100 300 LET TT=(INT (T*10000/N+0.5))/100 310 LET UU=(INT (U*10000/N+0.5))/100 320 LET VV=(INT (V*10000/N+0.5))/100 330 LET WW=(INT (W*10000/N+0.5))/100 340 LET XX=(INT (X*10000/N+0.5))/100 350 LET YY=(INT (Y*10000/N+0.5))/100 360 LET ZZ=(INT (Z*10000/N+0.5))/100 363 LET AAA=(INT (AA*10000/N+0.5))/100 366 LET BBB=(INT (BB*10000/N+0.5))/100 370 LET A$="0 OCCURRENCES" 380 LET B$="1 """ 390 LET C$="2 """ 400 LET D$="3 """ 410 LET E$="4 """ 420 LET F$="5 """ 430 LET G$="6 """ 440 LET H$="7 """ 450 LET I$="8 """ 451 LET J$="9 """ 452 LET K$="10 """ 455 LET L$="11 """ 457 LET M$="12 """ 570 PRINT A$,PP,B$,QQ,C$,RR,D$,SS,E$,TT,F$,UU,G$,VV,H$,WW,I$,XX,J$,YY,K$,ZZ,L$,AAA,M$,BBB,,,,PP+QQ+RR+SS+TT+UU+VV+WW+XX+YY+ZZ+AAA+BBB ```