Last active
May 30, 2018 05:25
-
-
Save shandou/84909e8093c461112e75b4c72de10d23 to your computer and use it in GitHub Desktop.
hypothesis test for population Pearson's r
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment