MathGroup Archive 2006

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

Search the Archive

Re: BinomialDistribution

  • To: mathgroup at smc.vnet.net
  • Subject: [mg65229] Re: [mg65222] BinomialDistribution
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Sun, 19 Mar 2006 03:19:06 -0500 (EST)
  • Reply-to: hanlonr at cox.net
  • Sender: owner-wri-mathgroup at wolfram.com

It is a precision problem

Needs["Statistics`DiscreteDistributions`"];

PDF[BinomialDistribution[101,u],26]

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

Use exact numbers

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

933048986157861216695450243176853643798144899623811456319450
199150880460283695\
574163450094078155722758786878856490276554642606783152589583
543443098302366302\
35282827272057121761207307079176349327104941667/\
127500000000000000000000000000000000000000000000000000000000
000000000000000000\
000000000000000000000000000000000000000000000000000000000000
000000000000000000\
00000000000000000000000000000000000000000000000000

%//N

0.007318031263983225

or use NIntegrate

NIntegrate[PDF[BinomialDistribution[101,u],26],{u,0,0.29}]

0.007318031263983235


Bob Hanlon

> 
> From: "Solomon, Joshua" <J.A.Solomon at city.ac.uk>
To: mathgroup at smc.vnet.net
> Subject: [mg65229] [mg65222] BinomialDistribution
> 
> 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: A Reap Sow question
  • Next by Date: Re: Combined Graphics3D with Separate PlotRange?
  • Previous by thread: Re: BinomialDistribution
  • Next by thread: Re: BinomialDistribution