Ticket #806 (closed enhancement: fixed)

Opened 21 months ago

Last modified 18 months ago

More accurate upper tail quantiles for small survival probabilities of the normal distribution

Reported by: pbrod Owned by: somebody
Priority: normal Milestone: 0.8.0
Component: scipy.stats Version: devel
Keywords: Cc:

Description

For small lower tail probabilities the ppf function of the normal distribution gives

In [83]: import scipy.stats.distributions as dst
In [84]: dst.norm.ppf(1e-40)
Out[84]: -13.31092137142517

But for small upper tail probabilites the isf function gives infinite quantile:

In [85]: dst.norm.isf(1e-40)
Out[85]: 1.#INF

where the true value is 13.31092137142517. A solution that fix this so that small upper tail probabilities have the same accuracy for the quantile as the lower tail probabilites, is to add the following _isf method to norm_gen class:

    def _isf(self,q):
        return -_norm_ppf(q)

Change History

Changed 19 months ago by josefpktd

  • component changed from Other to scipy.stats

Changed 18 months ago by josefpktd

  • status changed from new to closed
  • resolution set to fixed

changed in r5602, together with kstwobign

new results:

stats.norm.isf(1e-40)

13.31092137142517

stats.kstwobign.sf(10)

2.7677930534734751e-087

Note: See TracTickets for help on using tickets.