I'm using df['col1'].cov(df['col2'])
to calculate the covariance between two columns in dataframe df
. How can I get smth like p-value for this covariance value? Maybe there is smth similar to stats.pearsonr
, which produces correlation coefficient and p-value?
Asked
Active
Viewed 259 times
0
-
Related (not dup): [pandas columns correlation with statistical significance](https://stackoverflow.com/questions/25571882/pandas-columns-correlation-with-statistical-significance) – jpp Aug 28 '18 at 16:49
-
2@jpp Not a duplicate at all. Scipy.stats has a function to calculate the p-value for correlation (mentioned in the answer), but it does not have a similar function for covariance. In fact [even R does not seem to have such function](https://stats.stackexchange.com/questions/48366/standard-errors-for-covariance-estimate-in-r). – DYZ Aug 28 '18 at 16:51