[Scipy-tickets] [SciPy] #1388: scipy.stats.linregress is producing negative p-values

SciPy Trac scipy-tickets@scipy....
Wed Feb 16 18:19:07 CST 2011

#1388: scipy.stats.linregress is producing negative p-values
 Reporter:  mataap  |       Owner:  somebody
     Type:  defect  |      Status:  new     
 Priority:  normal  |   Milestone:  0.10.0  
Component:  Other   |     Version:  0.8.0   
 Keywords:          |  

 Shouldn't the p-values, being probabilities, be non-negative?   However I
 am getting negative p-values for some data sets.

 I observed this in scipy v 0.7.1, so I upgraded to 0.10.0 hoping that the
 problem would not be in a later version, however, 0.10.0 is still
 generating negative p-values.

 I notice the negative p-values are associated with negative trend

 I have attached a python script with a data set in it that illustrates the
 problem.  Out of 36 data sets I ran, 3 came back with negative p-values.

 I am happy to help fix the problem, if it is a problem.  If linregress is
 designed to return negative p-values as a signal that a trend is negative,
 then that should be documented in the manual.

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

More information about the Scipy-tickets mailing list