Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (47.6k points)

I am looking for a function that takes as input two lists and returns the Pearson correlation, and the significance of the correlation.

1 Answer

0 votes
by (106k points)

You can use numpy's corrcoef to calculate the Pearson correlation.

import numpy 

numpy.corrcoef(list1, list2)[0, 1]

Browse Categories

...