The Math Forum



Search All of the Math Forum:

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


Math Forum » Discussions » sci.math.* » sci.stat.math

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

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Luis A. Afonso

Posts: 4,758
From: LIsbon (Portugal)
Registered: 2/16/05
Re: Help with probability&stat problem
Posted: Jun 14, 2007 1:52 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

The BASIC program I made, listing presented at this thread, provides INSTANTANEOUSLY the cumulative probability even if I enter X=110 (N=110, p=0.2). I wonder why to prefer the extremely slow .EXEL?. TWENTY SECONDS when X=30? WHAT AN ETERNITY!!!
*********
IMPROOVED PROGRAM

This program (listing below) is able to evaluate the cumulative probabilities of Bin (p=0.000001, N=10^6).It spends 10 seconds (circa) to evaluate F(X=10^6) providing the value 1.0000000000D+000.

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)
ante = (1 - p) ^ n: s = ante
IF s = 0 THEN GOTO 20
IF a = 0 THEN GOTO 10
FOR j = 0 TO n - 1
IF j > a - 1 THEN GOTO 10
post = ante * (n - j) / (j + 1) * w
s = s + post
ante = post
NEXT j
10 LOCATE 10, 50
: PRINT USING "##.##########^^^^^"; s
END
20 PRINT " p(0)=0 "


Date Subject Author
6/11/07
Read Help with probability&stat problem
tutorny
6/11/07
Read Re: Help with probability&stat problem
briggs@encompasserve.org
6/11/07
Read Re: Help with probability&stat problem
tutorny
6/11/07
Read Re: Help with probability&stat problem
Randy Poe
6/11/07
Read Re: Help with probability&stat problem
tutorny
6/11/07
Read Re: Help with probability&stat problem
Bruce Weaver
6/11/07
Read Re: Help with probability&stat problem
tutorny
6/11/07
Read Re: Help with probability&stat problem
Bruce Weaver
6/11/07
Read Re: Help with probability&stat problem
C6L1V@shaw.ca
6/11/07
Read Re: Help with probability&stat problem
Randy Poe
6/11/07
Read Re: Help with probability&stat problem
tutorny
6/11/07
Read Re: Help with probability&stat problem
Nick
6/11/07
Read Re: Help with probability&stat problem
Jack Tomsky
6/11/07
Read Re: Help with probability&stat problem
Luis A. Afonso
6/11/07
Read Re: Help with probability&stat problem
Jack Tomsky
6/11/07
Read Re: Help with probability&stat problem
Luis A. Afonso
6/11/07
Read Re: Help with probability&stat problem
Jack Tomsky
6/12/07
Read Re: Help with probability&stat problem
Luis A. Afonso
6/12/07
Read Re: Help with probability&stat problem
Jack Tomsky
6/12/07
Read Re: Help with probability&stat problem
Luis A. Afonso
6/12/07
Read Re: Help with probability&stat problem
Jack Tomsky
6/12/07
Read Binomial law DF: a simple program
Luis A. Afonso
6/13/07
Read Re: Binomial law DF: a simple program
Jack Tomsky
6/13/07
Read Re: Help with probability&stat problem
Luis A. Afonso
6/13/07
Read Re: Help with probability&stat problem
Anon.
6/13/07
Read Re: Help with probability&stat problem
Jack Tomsky
6/13/07
Read Re: Help with probability&stat problem
Jack Tomsky
6/13/07
Read Re: Help with probability&stat problem
Luis A. Afonso
6/13/07
Read Re: Help with probability&stat problem
Jack Tomsky
6/13/07
Read Re: Help with probability&stat problem
Anon.
6/13/07
Read Re: Help with probability&stat problem
Luis A. Afonso
6/13/07
Read Re: Help with probability&stat problem
Jack Tomsky
6/13/07
Read Re: Help with probability&stat problem
Jack Tomsky
6/13/07
Read Re: Help with probability&stat problem
Anon.
6/13/07
Read FALSIFICATION
Luis A. Afonso
6/13/07
Read Re: FALSIFICATION
Jack Tomsky
6/13/07
Read Re: Help with probability&stat problem
Luis A. Afonso
6/13/07
Read Re: Help with probability&stat problem
Jack Tomsky
6/14/07
Read Re: Help with probability&stat problem
Luis A. Afonso
6/14/07
Read Re: Help with probability&stat problem
Luis A. Afonso
6/14/07
Read Re: Help with probability&stat problem
Jack Tomsky
6/14/07
Read Re: Help with probability&stat problem
Luis A. Afonso
6/15/07
Read Re: Help with probability&stat problem
Luis A. Afonso
6/15/07
Read Re: Help with probability&stat problem
Jack Tomsky
6/15/07
Read Re: Help with probability&stat problem
Luis A. Afonso
6/15/07
Read Re: Help with probability&stat problem
Jack Tomsky
6/15/07
Read Re: Help with probability&stat problem
Luis A. Afonso
6/16/07
Read Re: Help with probability&stat problem
Luis A. Afonso

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2017. All Rights Reserved.