MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: BinomialDistribution

  • To: mathgroup at smc.vnet.net
  • Subject: [mg65224] Re: BinomialDistribution
  • From: bghiggins at ucdavis.edu
  • Date: Sun, 19 Mar 2006 03:19:02 -0500 (EST)
  • References: <dvgsqb$9tf$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Joshua,

The integration is being killed by round-off error.

Let us examine the distribution function


PDF[BinomialDistribution[101,u],26]

942094086221309585483304*(1 - u)^75*u^26

There are some pretty big numbers here.

So use exact arithmetic when evaluating the limits of integration by
writing

Integrate[PDF[BinomialDistribution[101, u], 26], {u, 0, 29/100}] // N

0.00731803

Which as you suspoected should be positive

Cheers,

Brian

Solomon, Joshua wrote:
> This makes me feel foolish.
> In[1]:=Needs["Statistics`DiscreteDistributions`"]
> In[2]:=Plot[PDF[BinomialDistribution[101,u],26],{u,0,0.5},PlotRange->All]
>
> This gives me a nice, bell-shaped curve, with a minimum of about 0 and a
> maximum of about .09. Let's integrate it from 0 to .29.
>
> In[3]:=Integrate[PDF[BinomialDistribution[101,u],26],{u,0,.29}]
> Out[3]=-0.612253
> 
> How can this be negative?


  • Prev by Date: Re: BinomialDistribution
  • Next by Date: Re: BinomialDistribution
  • Previous by thread: Re: BinomialDistribution
  • Next by thread: Re: BinomialDistribution