Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Help with probability&stat problem
Replies: 47   Last Post: Jun 16, 2007 4:32 AM

 Messages: [ Previous | Next ]
 Luis A. Afonso Posts: 4,758 From: LIsbon (Portugal) Registered: 2/16/05
Binomial law DF: a simple program
Posted: Jun 12, 2007 7:04 PM

Binomial law DF: a simple program

N=110, p=0.2

________p(X<=110) = 1.0000000000
________p(X<=10) = 0.0015595228
________p(X<=22) = 0.5567271744
________p(X<=30) = 0.9752864841
________p(X<=50) = 0.9999999996
________
________Licas

REM "BINcum"
CLS
DEFDBL A-Z
PRINT " F(a) = p(X<=a) X=Bin(p, N) "
INPUT " p , N "; p, n
INPUT " a ( a<=n ) "; a
w = p / (1 - p)
DIM pp(n)
pp(0) = (1 - p) ^ n: s = pp(0)
IF a = 0 THEN GOTO 10
FOR j = 0 TO n - 1
IF j > a - 1 THEN GOTO 10
pp(j + 1) = pp(j) * (n - j) / (j + 1) * w
s = s + pp(j + 1)
NEXT j
10 LOCATE 10, 50: PRINT USING "#.########## "; s
END

Date Subject Author
6/11/07 tutorny
6/11/07 briggs@encompasserve.org
6/11/07 tutorny
6/11/07 Randy Poe
6/11/07 tutorny
6/11/07 Bruce Weaver
6/11/07 tutorny
6/11/07 Bruce Weaver
6/11/07 C6L1V@shaw.ca
6/11/07 Randy Poe
6/11/07 tutorny
6/11/07 Nick
6/11/07 Jack Tomsky
6/11/07 Luis A. Afonso
6/11/07 Jack Tomsky
6/11/07 Luis A. Afonso
6/11/07 Jack Tomsky
6/12/07 Luis A. Afonso
6/12/07 Jack Tomsky
6/12/07 Luis A. Afonso
6/12/07 Jack Tomsky
6/12/07 Luis A. Afonso
6/13/07 Jack Tomsky
6/13/07 Luis A. Afonso
6/13/07 Anon.
6/13/07 Jack Tomsky
6/13/07 Jack Tomsky
6/13/07 Luis A. Afonso
6/13/07 Jack Tomsky
6/13/07 Anon.
6/13/07 Luis A. Afonso
6/13/07 Jack Tomsky
6/13/07 Jack Tomsky
6/13/07 Anon.
6/13/07 Luis A. Afonso
6/13/07 Jack Tomsky
6/13/07 Luis A. Afonso
6/13/07 Jack Tomsky
6/14/07 Luis A. Afonso
6/14/07 Luis A. Afonso
6/14/07 Jack Tomsky
6/14/07 Luis A. Afonso
6/15/07 Luis A. Afonso
6/15/07 Jack Tomsky
6/15/07 Luis A. Afonso
6/15/07 Jack Tomsky
6/15/07 Luis A. Afonso
6/16/07 Luis A. Afonso