Ticket #806 (closed enhancement: fixed)
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
Note: See
TracTickets for help on using
tickets.
