[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #43721] binocdf - cumulative distribution func
From: |
Falk Tannhäuser |
Subject: |
[Octave-bug-tracker] [bug #43721] binocdf - cumulative distribution functions lack "upper" argument |
Date: |
Tue, 02 Dec 2014 15:53:58 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0 |
Follow-up Comment #6, bug #43721 (project octave):
Hello,
Well, for x >= n, binocdf(x, n, p) is exactly 1 and hence binocdf(x, n, p,
"upper") is exactly 0. For x < n but x being "close" to n, binocdf(x, n, p)
tends to be close to 1, especially if p is close to 0.
Conversely, for x < 0 we have exactly binocdf(x, n, p) == 0 and binocdf(x, n,
p, "upper") == 1. For x >= 0 but close to 0 and p close to 1, binocdf(x, n, p)
is close to 0 and binocdf(x, n, p, "upper") is close to 1 (possibly equal to 1
within machine precision).
I think it is best to always use betainc(p, x + 1, n - x) for the "upper" case
and betainc(1 - p, n - x, x + 1) otherwise.
The user should call binocdf(x, n, p) if he is interested in the probability
of a binomially distributed random variable being <= x and binocdf(x, n, p,
"upper") for the probability of it being > x.
Falk
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?43721>
_______________________________________________
Nachricht gesendet von/durch Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #43721] binocdf - cumulative distribution functions lack "upper" argument,
Falk Tannhäuser <=