Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8308: Poisson Quantile function returns wrong results in certain cases
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-03-20 18:47:09
#8308: Poisson Quantile function returns wrong results in certain cases
-----------------------------------+----------------------------------------
Reporter: Caleb.Welton@⦠| Owner: johnmaddock
Type: Bugs | Status: new
Milestone: To Be Determined | Component: math
Version: Boost 1.52.0 | Severity: Problem
Resolution: | Keywords:
-----------------------------------+----------------------------------------
Comment (by johnmaddock):
I'll look into the edge cases (0 and 1) shortly - the differences in the
other values you see are intended behaviour, given:
{{{
poisson pd(constants::pi<double>());
}}}
then the default behaviour of:
{{{
quantile(pd, 0.05)
}}}
is to return the largest integer i such that {{{cdf(pd, i) <= 0.05}}},
which really is the value 0, not 1 as the other programs suggest.
Whether that is actually the correct thing to do depends upon the actual
test you are conducting (I assume R and Mathlab calculate the quantile as
a real-value and then round to the nearest int). You can configure
Boost.Math to do whatever you want here, see:
http://www.boost.org/doc/libs/1_53_0/libs/math/doc/sf_and_dist/html/math_toolkit/policy/pol_tutorial/understand_dis_quant.html
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8308#comment:1> 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:12 UTC