I am running scipy.stats.pearsonr
on my data, and I get
(0.9672434106763087, 0.0) # (r, p)
It is reasonable that the r-value is high and the p-value is very low.
However, the true p-value is obviously not exactly 0, so I would like to know what p=0.0
means. Is it p<1e-10
, p<1e-100
, or what is the limit?
As pointed out by @MB-F in the comments it is calculated analytically.
In the code for the version 0.19.1, you could isolate that part of the code and plot the p-value in terms of
r
The current stable version 1.9.3 uses a different formula
But yield the same results.
You can see that if you have 1000 points and your correlation, the
p
value will be less than the minimum floating value.The beta distribution
Scipy provides a collection of probability distributions, among them, the beta distribution.
The line
could be replaced by
There you can get much more information about it.