Skip to content

Instantly share code, notes, and snippets.

View AzadehFeizpour's full-sized avatar

Azadeh Feizpour AzadehFeizpour

  • Tali Health Pty Ltd
  • Australia
View GitHub Profile
@AzadehFeizpour
AzadehFeizpour / pearsonr_ci.py
Created August 13, 2019 05:52 — forked from zhiyzuo/pearsonr_ci.py
calculate Pearson correlation along with the confidence interval using scipy and numpy
import numpy as np
from scipy import stats
def pearsonr_ci(x,y,alpha=0.05):
''' calculate Pearson correlation along with the confidence interval using scipy and numpy
Parameters
----------
x, y : iterable object such as a list or np.array
Input for correlation calculation