commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <p...@steitz.com>
Subject Re: [MATH] Strange issue with FDistribution
Date Thu, 25 Sep 2008 01:37:59 GMT
This looks like a bug.  At least it is a documentation bug.  Can you pls 
open a JIRA ticket so we do not lose track of it.  Follow the 
instructions here
http://commons.apache.org/math/issue-tracking.html
Thanks for reporting this.

Phil


Jörg Henning wrote:
> Hello,
>         
> I'm relatively new to this kind of stuff, so pardon me, if I get some
> things wrong.
>         
> We are using the FDistributionImpl from the commons.math project to do
> some statistical calculations, namely receiving the upper and lower
> boundaries of a confidence interval. Everything is working fine and the
> results are matching our reference calculations.
>
> However, the FDistribution behaves strange if a
> denominatorDegreeOfFreedom of 2 is used, with an alpha-value of 0.95.
> This results in an IllegalArgumentsException, stating:
>         
> Invalid endpoint parameters:  lowerBound=0.0 initial=Infinity
> upperBound=1.7976931348623157E308
>         
> coming from
> org.apache.commons.math.analysis.UnivariateRealSolverUtils.bracket
>         
> The problem is the 'initial' parameter to that function, wich is
> POSITIVE_INFINITY and therefore not within the boundaries. I already
> pinned down the problem to the FDistributions getInitialDomain()-method,
> wich goes like:
>
>         return getDenominatorDegreesOfFreedom() /
>                     (getDenominatorDegreesOfFreedom() - 2.0);
>         
> Obviously, in case of denominatorDegreesOfFreedom == 2, this must lead
> to a division-by-zero, resulting in POSTIVE_INFINITY. The result of this
> operation is then directly passed into the
> UnivariateRealSolverUtils.bracket() - method as second argument.
>         
>         
> Can someone explain what this behaviour is about? Why should a
> degreeOfFreedom of 2 not be allowed? Shouldn't this fact be mentioned in
> the API-documentation? Is there a possible workaround?
>         
> Thanks in advance, 
>         
>         
> joerx
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message