new_contents: # Reference https://glowingpython.blogspot.ca/2012/03/linear-regression-with-numpy.html
  from numpy import arange,array,ones,linalg
  from pylab import plot,show
  
  xi = arange(0,9)
  A = array([ xi, ones(9)])
  # linearly generated sequence
  y = [19, 20, 20.5, 21.5, 22, 23, 23, 25.5, 24]
  w = linalg.lstsq(A.T,y)[0] # obtaining the parameters
  
  # plotting the line
  line = w[0]*xi+w[1] # regression line
  plot(xi,line,'r-',xi,y,'o')
  show()
  
  
  from numpy import arange,array,ones#,random,linalg
  from pylab import plot,show
  from scipy import stats
  
  xi = arange(0,9)
  A = array([ xi, ones(9)])
  # linearly generated sequence
  y = [19, 20, 20.5, 21.5, 22, 23, 23, 25.5, 24]
  
  slope, intercept, r_value, p_value, std_err = stats.linregress(xi,y)
  
  print 'r value', r_value
  print  'p_value', p_value
  print 'standard deviation', std_err
  
  line = slope*xi+intercept
  plot(xi,line,'r-',xi,y,'o')
  show()
  
subject: Create Linear Regression File