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 ]
 Jack Tomsky Posts: 1,835 Registered: 12/18/04
Re: Help with probability&stat problem
Posted: Jun 15, 2007 11:37 AM

> Prob. that X belongs to an interval
>
>
> A routine (BIN2) for the evaluation of the
> e probability that X~Bin (p, N) be inside [a, b] i.e.
>
> ________p ( a<=X<=b)__________b>=a
> is presented below.
> Note that if b=a then we get p(X=a). The routine
> inputs are p, N , b, a.
>
>
> 1) _______p=.7, N=7, b=7 , a=0
> _RESULT: 1.0000000000D+000
> (I think that, this time, Jack?s *sense of humour *
> shall not be triggered, surely).
>
> 2)_______p=.7, N=7, b=6, a=1
> _R: 9.1742700000D-001 (or 0.917427 evidently).
>
> ______Licas
>
>
>
> REM "BIN2"
> CLS
> DEFDBL A-Z
> PRINT " b >= a "
> PRINT " p(a<=X<=b) = F(b)-F(a-1) "
> INPUT " p , N "; p, n
> INPUT " b= "; w(1)
> INPUT " a= "; a: w(2) = a - 1
> r = p / (1 - p)
> FOR u = 1 TO 2
> ante = (1 - p) ^ n: s = ante
> FOR j = 0 TO n - 1
> IF j > w(u) - 1 THEN GOTO 10
> post = ante * (n - j) / (j + 1) * r
> s = s + post
> ante = post
> NEXT j
> 10 w(u) = s
> NEXT u
> PRINT " p(a<=X<=b) = F(b)-F(a-1) ";
> IF a = 0 THEN w(2) = 0
> PRINT USING "##.##########^^^^^"; w(1) -
> ; w(1) - w(2)
> COLOR 7
> END

So you now agree with me that the OP should use the exact binomial probability of 0.9753 rather than your approximation of 0.9786.

Jack

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