Bernoulli Trials TI-83 Calculator Program

 

Program Listing

 

PROGRAM:BERNOULI

:Disp "TRIALS"

:Input T

:Disp "PROB"

:Input P

:ClrList L1

:For(I, 1, T)

:(rand £ P)®L1(I)

:End

:Disp "SUCCESSES"

:sum(L1)

:

 

Comments

 

T is the number of trials.  P is the probability of a success (i.e. of the outcome you're interested in).  The program returns the number of successes, and stores the results of the trials in list L1.  The program will erase any previous contents of L1.  You can have at most 999 trials (since this is the maximum capacity of the lists on a TI-83).

 

Disp and Input are in the PRGM I/O menu.

For and End are in the PRGM CTL menu.

ClrList is in the STAT EDIT menu.

rand is in the MATH PRB menu.

£ is in the TEST (2nd MATH) menu.

® is the [STO®] key.