Back
I am looking for a function that takes as input two lists and returns the Pearson correlation, and the significance of the correlation.
You can use numpy's corrcoef to calculate the Pearson correlation.
import numpy numpy.corrcoef(list1, list2)[0, 1]
import numpy
numpy.corrcoef(list1, list2)[0, 1]
31k questions
32.8k answers
501 comments
693 users