Re: Binomial distribution question
- From: Dave Seaman <dseaman@xxxxxxxxxxxx>
- Date: Sat, 28 Jan 2006 16:21:57 +0000 (UTC)
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/>
.
- References:
- Binomial distribution question
- From: carlos . james . r
- Re: Binomial distribution question
- From: Randy Poe
- Re: Binomial distribution question
- From: carlos . james . r
- Binomial distribution question
- Prev by Date: Re: Help: How to combine all 4's into least 6's- Is there a way to calculate what the minimum of 6's will be?
- Next by Date: Re: Saying you're reasonable
- Previous by thread: Re: Binomial distribution question
- Next by thread: Solving
- Index(es):
Relevant Pages
|