Opened 8 years ago
Closed 8 years ago
#10480 closed Bugs (fixed)
Wrong CDF values, quantile in non_central_t_distribution
Reported by: | Owned by: | John Maddock | |
---|---|---|---|
Milestone: | To Be Determined | Component: | math |
Version: | Boost 1.56.0 | Severity: | Showstopper |
Keywords: | Cc: |
Description
I currently try to use boost::math::non_central_t but apparently immediately ran into an error.
For the case with two degrees of freedom df=2 and delta > 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).
A specific example is: non_central_t_distributon<> ndist(2.0,4.0);
quantile(ndist,0.5) here gives 3.9310 but the true value is approx. 4.753
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).
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.
The true values were determines with Mathematica 9 and another numeric library.
The compiler is gcc 4.8.3 under MINGW64 (Window 7).
Change History (2)
comment:1 by , 8 years ago
comment:2 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
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.