You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sébastien Brisard (JIRA)" <ji...@apache.org> on 2012/06/01 07:52:23 UTC
[jira] [Commented] (MATH-738) Incomplete beta function I(x, a, b)
is inaccurate for large values of a and/or b
[ https://issues.apache.org/jira/browse/MATH-738?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13287199#comment-13287199 ]
Sébastien Brisard commented on MATH-738:
----------------------------------------
Here are the results of some error tests I've carried out, based on reference values computed with Maxima and 64 decimal digits. The statistics correspond to errors in ulps.
{noformat}
***** a = 1.0, b = 1.0 *****
SummaryStatistics:
n: 129
min: 0.0
max: 9.0
mean: 3.9534883720930214
geometric mean: 0.0
variance: 5.700944767441859
sum of squares: 2746.0
standard deviation: 2.38766512883232
sum of logs: -Infinity
***** a = 1.0, b = 10.0 *****
SummaryStatistics:
n: 129
min: 0.0
max: 55.0
mean: 7.08527131782946
geometric mean: 0.0
variance: 217.3911094961241
sum of squares: 34302.0
standard deviation: 14.744189007745529
sum of logs: -Infinity
***** a = 1.0, b = 100.0 *****
SummaryStatistics:
n: 129
min: 0.0
max: 134.0
mean: 2.139534883720932
geometric mean: 0.0
variance: 203.46475290697674
sum of squares: 26634.0
standard deviation: 14.264107154216724
sum of logs: -Infinity
***** a = 10.0, b = 1.0 *****
SummaryStatistics:
n: 129
min: 0.0
max: 233.0
mean: 40.00000000000001
geometric mean: 0.0
variance: 923.1249999999999
sum of squares: 324560.0
standard deviation: 30.38297220483868
sum of logs: -Infinity
***** a = 10.0, b = 10.0 *****
SummaryStatistics:
n: 129
min: 0.0
max: 116.0
mean: 29.131782945736425
geometric mean: 0.0
variance: 729.1465600775194
sum of squares: 202808.0
standard deviation: 27.00271393911211
sum of logs: -Infinity
***** a = 10.0, b = 100.0 *****
SummaryStatistics:
n: 129
min: 0.0
max: 105.0
mean: 7.891472868217045
geometric mean: 0.0
variance: 495.05062984496084
sum of squares: 71400.0
standard deviation: 22.24973325334398
sum of logs: -Infinity
***** a = 100.0, b = 1.0 *****
SummaryStatistics:
n: 129
min: 0.0
max: 474.0
mean: 162.31007751937983
geometric mean: 0.0
variance: 8511.274194525193
sum of squares: 4487891.5
standard deviation: 92.25656721624317
sum of logs: -Infinity
***** a = 100.0, b = 10.0 *****
SummaryStatistics:
n: 129
min: 0.0
max: 364.0
mean: 113.30232558139537
geometric mean: 0.0
variance: 6252.290697674416
sum of squares: 2456320.0
standard deviation: 79.0714278211442
sum of logs: -Infinity
***** a = 100.0, b = 100.0 *****
SummaryStatistics:
n: 129
min: 0.0
max: 1447.0
mean: 464.9999999999998
geometric mean: 0.0
variance: 221595.28124999997
sum of squares: 5.6257221E7
standard deviation: 470.7390797989901
sum of logs: -Infinity
{noformat}
The situation is not too bad, but values claimed by [BOOST|http://www.boost.org/doc/libs/1_39_0/libs/math/doc/sf_and_dist/html/math_toolkit/special/sf_beta/ibeta_function.html] are much better. So it might be worth having a look at the implementation proposed in TOMS-708.
> Incomplete beta function I(x, a, b) is inaccurate for large values of a and/or b
> --------------------------------------------------------------------------------
>
> Key: MATH-738
> URL: https://issues.apache.org/jira/browse/MATH-738
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 3.1, 4.0
> Reporter: Sébastien Brisard
> Assignee: Sébastien Brisard
> Labels: special-functions
>
> This was first reported in MATH-718. The result of the current implementation of the incomplete beta function I(x, a, b) is inaccurate when a and/or b are large-ish.
> I've skimmed through [slatec|http://www.netlib.org/slatec/fnlib/betai.f], GSL, [Boost|http://www.boost.org/doc/libs/1_38_0/libs/math/doc/sf_and_dist/html/math_toolkit/special/sf_beta/ibeta_function.html] as well as NR. At first sight, neither uses the same method to compute this function. I think [TOMS-708|http://www.netlib.org/toms/708] is probably the best option.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira