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)