Author: Anders C. Madsen (andersm@post3.tele.dk), Oct. 1996 Consider this material public domain. Comments, suggestions etc. welcome. Tested on TI80, should run on any TI8X This program takes the value of n (sample) and p (probability) from the variables N and (guessed it, didn't you?) P and stores the result in L1 to L5. The lists contain the following data: L1: n L2: P(X<=x) L3: P(X=x) L4: P(X>=x) L5: n PROGRAM:BINOM CLRLIST L1,L2,L3,L4,L5,L6 Sets up the STAT N+1->B B->DIM L1 B->DIM L2 B->DIM L3 B->DIM L4 0->B FOR(X,0,N,1) Loop n times X->L1(X+1) Stores n in L1 and L5 X->L5(X+1) (N nCr X)*(P^X)*((1-P)^(N-X))->L3(X+1) Calculates P(X=x) and stores it in L3 SUM L3->L2(X+1) Sum L3 (P(X<=x) in L2 1-L2(X+1)->L4(X+1) 1-L2 (P(X>=x) in L4 END 1->L4(1) Just to make it absolutely right... :-) STOP