Re: Binomial distribution question



On 27 Jan 2006 19:46:24 -0800, carlos.james.r@xxxxxxxxx wrote:
> First, thank you for your help.

> AHH! That makes sense! I see where I was getting confused by. I just
> plug the answer into mathematica and got 8% as an answer. If you want I
> can still go through each term separately, but I am not sure how to
> make mathematica print out each term of the sum so I will isntead
> justselect a few key ones, found below.

> 32!/((32 - 27)! 27! )* (.927)^27* (1 - .927)^(32 - 27)=0.0539231

> 32!/((32 - 5)! 5! )* (.073)^5 * (1 - .073)^(32 - 5)=0.0539231

> 32!/((32 - 26)! 26! )* (.927)^26* (1 - .927)^(32 - 26)=0.0191087

> 32!/((32 - 6)! 6! )* (.073)^6 * (1 - .073)^(32 - 6)=0.0191087

> 32!/((32 - 0)! 0! )* (.927)^0* (1 - .927)^(32 -
> 0)=4.229913865563006`*^-37

> 32!/((32 - 32)! 32! )* (.073)^32 * (1 - .073)^(32 -
> 32)=4.229913865563006`*^-37

Does this help?

In[1]:= bintab[n_,p_]:=Table[Binomial[n,k] p^k (1-p)^(n-k),{k,0,n}]

In[2]:= bintab[32,.927]

-37 -34 -32 -30
Out[2]= {4.22991 10 , 1.71885 10 , 3.38319 10 , 4.29619 10 ,

-28 -26 -24 -23
> 3.95529 10 , 2.8127 10 , 1.60729 10 , 7.58098 10 ,

-21 -19 -18 -17
> 3.00838 10 , 1.01873 10 , 2.97538 10 , 7.55665 10 ,

-15 -14 -13 -12
> 1.67928 10 , 3.28071 10 , 5.65393 10 , 8.61565 10 ,

-10 -9 -8 -7 -6
> 1.16245 10 , 1.38932 10 , 1.4702 10 , 1.37565 10 , 1.13548 10 ,

-6
> 8.23945 10 , 0.0000523148, 0.000288838, 0.00137544, 0.00558919,

> 0.0191087, 0.0539231, 0.122277, 0.214172, 0.271969, 0.222815, 0.0884202}

In[3]:= %-Reverse[bintab[32,.073]]

-51 -48 -46 -44
Out[3]= {-7.6842 10 , -3.18594 10 , -6.07594 10 , -7.49695 10 ,

-42 -40 -38 -36
> -6.72623 10 , -4.41958 10 , -2.40609 10 , -1.10496 10 ,

-35 -33 -32 -31
> -4.21297 10 , -1.33611 10 , -3.77482 10 , -8.75143 10 ,

-29 -28 -27 -26
> -1.87354 10 , -3.66031 10 , -6.05845 10 , -8.40105 10 ,

-24 -23 -22 -21
> -1.05983 10 , -1.24077 10 , -1.25731 10 , -1.03232 10 ,

-21 -20 -19 -18
> -8.04681 10 , -5.0822 10 , -2.91379 10 , -1.51788 10 ,

-18 -17 -17 -16
> -6.07153 10 , -2.42861 10 , -6.59195 10 , -1.59595 10 ,

-16 -16 -16 -16
> -2.77556 10 , -3.60822 10 , -3.33067 10 , -1.11022 10 , 0.}

In[4]:= bintab[32,927/1000]-Reverse[bintab[32,73/1000]]

Out[4]= {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}


Out[3] suffers from roundoff error, but Out[4] is exact.


--
Dave Seaman
U.S. Court of Appeals to review three issues
concerning case of Mumia Abu-Jamal.
<http://www.mumia2000.org/>
.



Relevant Pages

  • Re: Binomial distribution question
    ... AHH! ... plug the answer into mathematica and got 8% as an answer. ... Prev by Date: ...
    (sci.math)
  • Re: why invent another CAS
    ... Richard J. Fateman, A Review of Mathematica, Computer Science Divesion, University of California, Gerkely, CA 94720, USA, 1990, http://www.cs.berkeley.edu/~fateman/papers/mma.review.pdf ... This review is dated 1991 ?, which is in computer software years is like 5,000 years ago. ... the review concentrated on design decisions (especially ... So my review of Mathematica is still relevant. ...
    (sci.math.symbolic)
  • Re: why invent another CAS
    ... > Richard J. Fateman, A Review of Mathematica, Computer Science ... > Divesion, University of California, Gerkely, CA 94720, USA, 1990, ... This review is dated 1991 ?, which is in computer software years is ...
    (sci.math.symbolic)
  • Re: why invent another CAS
    ... >>> Divesion, University of California, Gerkely, CA 94720, USA, 1990, ... >> review would still be useful to that extent, but it would be much more ... >> Mathematica and the many changes that occurred in Mathematica since 14 ...
    (sci.math.symbolic)
  • Re: why invent another CAS
    ... Nasser Abbasi wrote: ... Richard J. Fateman, A Review of Mathematica, Computer Science Divesion, University of California, Gerkely, CA 94720, USA, 1990, http://www.cs.berkeley.edu/~fateman/papers/mma.review.pdf ... This review is dated 1991 ?, which is in computer software years is like 5,000 years ago. ... Although I can understand that the basic concepts of Mathematica, and its core design most likely has not changed since 1991, and so this review would still be useful to that extent, but it would be much more interesting if this review, or any other, could review the current Mathematica and the many changes that occurred in Mathematica since 14 years ago. ...
    (sci.math.symbolic)