Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. '''
  2. check your intuition: when x is evenly distributed around 0, and x^2 are totally uncorrelated
  3. '''
  4.  
  5. import pandas as pd
  6. import numpy as np
  7.  
  8. x = np.random.normal(0,1,1000)
  9. y = x**2
  10.  
  11. df = pd.DataFrame({'x':x,'y':y})
  12.  
  13. print df.corr()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement