Last active
May 30, 2018 06:23
-
-
Save shandou/037b06955d84830d36f01eb908c5413f to your computer and use it in GitHub Desktop.
pearson_r_CI2
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 numpy as np | |
r = - 0.654 # Pearson's r from sampled data | |
z_prime = 0.5 * np.log((1 + r) / (1 - r)) | |
n = 34 # Sample size | |
se = 1 / np.sqrt(n - 3) # Sample standard error | |
CI_lower = z_prime - z_critical * se | |
CI_upper = z_prime + z_critical * se |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment