shandou
5/30/2018 - 5:23 AM

hypothesis test for population Pearson's r

hypothesis test for population Pearson's r

import scipy.stats

n = 25 # Number of samples n
df = n - 2 # Degrees of freedom
alpha = 0.05 # Significant level

# Non-direction tests for computing t-critical value
t_critical = scipy.stats.t.ppf(1 - alpha / 2, df)