|
From: | Shai Ayal |
Subject: | Re: computing binomial distribution tails |
Date: | Sun, 03 Jul 2005 14:18:23 +0300 |
User-agent: | Mozilla Thunderbird 1.0 (X11/20041206) |
Johan Kullstam wrote:
Right -- but this requires some kind of special casing for p small. if p < tol, retval = m*p else retval = 1-binomial_pdf(0,m,p) endif
Well, that's numerics for you -- whenever you come close to the accuracy limit, you must do something smart, and this will almost always prove to be a special case.
However you can take comfort in that the special case is almost always very simple, as in your example above :)
Shai ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------
[Prev in Thread] | Current Thread | [Next in Thread] |