[Scipy-tickets] [SciPy] #758: stats.rdist strange behavior

SciPy scipy-tickets@scipy....
Sun Nov 16 15:27:18 CST 2008


#758: stats.rdist strange behavior
-------------------------+--------------------------------------------------
 Reporter:  travis       |        Owner:  somebody
     Type:  defect       |       Status:  new     
 Priority:  normal       |    Milestone:  0.7.0   
Component:  scipy.stats  |      Version:  devel   
 Severity:  normal       |   Resolution:          
 Keywords:               |  
-------------------------+--------------------------------------------------
Comment (by josefpktd):

 fixed by temporarily by removing _cdf method and using generic methods
 based on
 definition in _pdf, i.e. use numerical integration instead of
 special.hyp2f1.

 ['rdist', (541.0,)] passes all my basic tests, (added to the distribution
 tests)

 examples:
 {{{
 python25 -c "import scipy.stats; print
 scipy.stats.rdist(541,0,1).cdf(0.72)"
 1.0

 python25 -c "import scipy.stats; print
 scipy.stats.rdist(100,0,1).cdf(0.72)"
 1.0

 python25 -c "import scipy.stats; print
 scipy.stats.rdist(541,0,1).ppf(0.72)"
 0.0250659567022

 python25 -c "import scipy.stats; print
 scipy.stats.rdist(541,0,1).ppf(0.999)"
 0.132335829319

 python25 -c "import scipy.stats; print
 scipy.stats.rdist(541,0,1).ppf(0.99999)"
 0.181913894017

 python25 -c "import scipy.stats; print
 scipy.stats.rdist(541,0,1).cdf(0.181913894017)"
 0.99999

 python25 -c "import scipy.stats; print
 scipy.stats.rdist(541,0,1).ppf(0.5)"
 1e-014

 python25 -c "import scipy.stats; print
 scipy.stats.rdist(541,0,1).cdf(0.75)"
 1.0

 python25 -c "import scipy.stats; print
 scipy.stats.rdist(541,0,1).cdf(0.999)"
 1.0

 python25 -c "import scipy.stats; print scipy.stats.rdist(541,0,1).ppf(1)"
 1.0

 python25 -c "import scipy.stats; print
 scipy.stats.rdist(541,0,1).ppf(1-1e-8)"
 0.237915798562

 }}}

 I think ticket can be closed, since the rdist distribution works, or it
 can be left open as a reminder for the work-around used because of problem
 with special.hyp2f1

 Josef

-- 
Ticket URL: <http://scipy.org/scipy/scipy/ticket/758#comment:2>
SciPy <http://www.scipy.org/>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list