Boost C++ Libraries: Ticket #10480: Wrong CDF values, quantile in non_central_t_distribution https://svn.boost.org/trac10/ticket/10480 <p> I currently try to use boost::math::non_central_t but apparently immediately ran into an error. </p> <p> For the case with two degrees of freedom df=2 and delta &gt; 0 the cdf and quantile values are wrong and not even consistent, i.e. for a = cdf(nct,x) it does not hold that x == quantile(nct,a). </p> <p> A specific example is: non_central_t_distributon&lt;&gt; ndist(2.0,4.0); </p> <p> quantile(ndist,0.5) here gives 3.9310 but the true value is approx. 4.753 </p> <p> cdf(ndist,3.931) yields 0.8992 but should (to be consistent) give 0.5. With the correct quantile of 4.743 the result is also wrong (0.924). </p> <p> Similar errors are found for other values of delta as long as df = 2. The results for a few other df's that I tested were correct. </p> <p> The true values were determines with Mathematica 9 and another numeric library. </p> <p> The compiler is gcc 4.8.3 under MINGW64 (Window 7). </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10480 Trac 1.4.3 John Maddock Tue, 09 Sep 2014 17:29:01 GMT <link>https://svn.boost.org/trac10/ticket/10480#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10480#comment:1</guid> <description> <p> Confirmed: the issue is specific to df = 2, there's some special cases added to the incomplete beta which return incorrect derivatives in this case.... I'm testing a fix now. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Fri, 12 Sep 2014 15:31:25 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/10480#comment:2 https://svn.boost.org/trac10/ticket/10480#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Fixed in <a class="ext-link" href="https://github.com/boostorg/math/commit/d1d6d5b063f23c100a4d6499660a0a4bd2e648ca"><span class="icon">​</span>https://github.com/boostorg/math/commit/d1d6d5b063f23c100a4d6499660a0a4bd2e648ca</a> </p> Ticket