Created
February 23, 2017 07:06
-
-
Save peter-jung/628af02537a23fd706477d891b89c106 to your computer and use it in GitHub Desktop.
check your intuition: when x is evenly distributed around 0, and x^2 are totally uncorrelated
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
''' | |
check your intuition: when x is evenly distributed around 0, and x^2 are totally uncorrelated | |
''' | |
import pandas as pd | |
import numpy as np | |
x = np.random.normal(0,1,1000) | |
y = x**2 | |
df = pd.DataFrame({'x':x,'y':y}) | |
print df.corr() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment