[Scipy-tickets] [SciPy] #869: stats.invnorm.cdf returns NaNs with low mu values
SciPy Trac
scipy-tickets@scipy....
Fri Aug 19 21:51:50 CDT 2011
#869: stats.invnorm.cdf returns NaNs with low mu values
-------------------------+--------------------------------------------------
Reporter: jpaalasm | Owner: somebody
Type: defect | Status: needs_review
Priority: normal | Milestone: 0.10.0
Component: scipy.stats | Version: devel
Keywords: |
-------------------------+--------------------------------------------------
Comment(by josefpktd):
I have no new ideas.
If we had a numerically precise norm.logcdf then this could help, if
someone finds a proof that the 0*inf term is actually zero, we could
restrict to the first term.
mu = 0.0028 seems a bit large for breaking down already, but the variance
is already pretty small 0.0028**3=2.1952e-08 and so the pdf is quite
spiky.
R library VGAM: same breakdown and nans
{{{
> pinv.gaussian(0.003, 0.0029, 1)
[1] 0.7443139
> pinv.gaussian(0.003, 0.0028, 1)
[1] NaN
}}}
Ralf: comment for docs looks good
I would add reference to this ticket as code comment. Because mu=0.0028 is
quite large and the pdf and veccdf still work, I think there is room for
improvement. If we close the tickets, then code comments would give at
least a hint that there is a problem and possible (approximate) work
arounds.
--
Ticket URL: <http://projects.scipy.org/scipy/ticket/869#comment:6>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.
More information about the Scipy-tickets
mailing list