Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Re: BinomialDistribution

  • To: mathgroup at smc.vnet.net
  • Subject: [mg65238] Re: [mg65222] BinomialDistribution
  • From: Daniel Lichtblau <danl at wolfram.com>
  • Date: Sun, 19 Mar 2006 03:19:20 -0500 (EST)
  • References: <200603181140.GAA09803@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

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?

This is from numeric cancellation error in evaluating the antiderivative 
at the endpoints. It will behave better if you use NIntegrate, or use 
Integrate but make the bounds exact. For either of those I get (after 
numericizing the latter) around .007318.

Daniel Lichtblau
Wolfram Research


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