Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9834: Negative Binomial Distribution: degenerate cases
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-04-07 03:24:49
#9834: Negative Binomial Distribution: degenerate cases
--------------------------------------+-------------------------
Reporter: HS <tan@â¦> | Owner: johnmaddock
Type: Feature Requests | Status: closed
Milestone: To Be Determined | Component: math
Version: Boost Development Trunk | Severity: Problem
Resolution: fixed | Keywords:
--------------------------------------+-------------------------
Comment (by HS <tan@â¦>):
Replying to [comment:1 johnmaddock]:
> See
https://github.com/boostorg/math/commit/0c01f682eb9c562d3cca6372c0aa8e68951decd1
>
> I haven't made the quantile for probability 1 zero in the corner case
you gave: rather it's always at infinity. I think this is more
consistent, though there are an infinite number of "correct" answers for
this case ;-)
[[br]]
Dear John,
Thank you (and your team) for the great work!
I will not quibble with you about this---it is an edge case which is
generally not very interesting in the applied world. However, as a
teacher (was) of probability classes, the inverse CDF (or quantile) at p
of a distribution F, to us, is the infimum of all x such that F(x) >= p;
in this degenerate case of a discrete distribution, this is 0. And one
will also find this is so on R too:
{{{
> qnbinom(1,3,1,lower.tail=FALSE)
[1] 0
> qnbinom(1,3,1,lower.tail=TRUE)
[1] 0
> qnbinom(0,3,1,lower.tail=FALSE)
[1] 0
> qnbinom(0,3,1,lower.tail=TRUE)
[1] 0
}}}
Mathmatica 9, on the other hand, says the following:
{{{
In[1]:= Quantile[NegativeBinomialDistribution[3,1],0]
Out[1]= 0
In[2]:= Quantile[NegativeBinomialDistribution[3,1],1]
Out[2]= Infinity
}}}
But it is very easy for anyone to work around the decision here if he or
she disagrees with it. :)
With best regards,[[br]]
HS
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/9834#comment:2> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:15 UTC