       Possible bug in InverseGammaRegularized?

• To: mathgroup at smc.vnet.net
• Subject: [mg129924] Possible bug in InverseGammaRegularized?
• From: psycho_dad <s.nesseris at gmail.com>
• Date: Tue, 26 Feb 2013 01:10:53 -0500 (EST)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• Delivered-to: l-mathgroup@wolfram.com
• Delivered-to: mathgroup-newout@smc.vnet.net
• Delivered-to: mathgroup-newsend@smc.vnet.net

Hi,
The following code gives the \delta \chi^2 for the confidence intervals as a function of the number of parameters n and desired number of sigmas m:
\delta \chi^2=2 InverseGammaRegularized[n/2, 1 - Erf[m/Sqrt]]

The RHS can also be written as 2InverseGammaRegularized[n/2,0, Erf[m/Sqrt]]
(notice the 0 in the arguments)

For example, for 5 params, 1 sigma and 5 digit precision:
In:= n = 5; m = 1;
In:=
N[2 InverseGammaRegularized[n/2, 1 - Erf[m/Sqrt]], 5]
N[2 InverseGammaRegularized[n/2, 0, Erf[m/Sqrt]], 5]

Out= 5.8876
Out= 5.8876

but when I ask for only 3 digit precision, Mathematica 9 gives the following torrent of errors in the second case:

In:=
N[2 InverseGammaRegularized[n/2, 1 - Erf[m/Sqrt]], 3]
N[2 InverseGammaRegularized[n/2, 0, Erf[m/Sqrt]], 3]

Out= 5.8876
During evaluation of In:= $RecursionLimit::reclim: Recursion depth of 1024 exceeded. >> ... (more errors) During evaluation of In:= General::stop: Further output of$RecursionLimit::reclim will be suppressed during this calculation. >>

Is this a bug or am I missing something?

Cheers



• Prev by Date: remove the decimal dot from ticks?
• Next by Date: Re: i^2=1
• Previous by thread: remove the decimal dot from ticks?
• Next by thread: Re: Possible bug in InverseGammaRegularized?