code: def llinregress(x,y):
      
      TINY = 1.0e-20
      if len(x) != len(y):
          raise ValueError('Input values not paired in linregress.  Aborting.')
      n = len(x)
      x = [float(_) for _ in x]
      y = [float(_) for _ in y]
      xmean = mean(x)
      ymean = mean(y)
      r_num = float(n*(summult(x,y)) - sum(x)*sum(y))
      r_den = math.sqrt((n*ss(x) - square_of_sums(x))*(n*ss(y)-square_of_sums(y)))
      r = r_num / r_den
      z = 0.5*math.log((1.0+r+TINY)/(1.0-r+TINY))
      df = n-2
      t = r*math.sqrt(df/((1.0-r+TINY)*(1.0+r+TINY)))
      prob = betai(0.5*df,0.5,df/(df+t*t))
      slope = r_num / float(n*ss(x) - square_of_sums(x))
      intercept = ymean - slope*xmean
      sterrest = math.sqrt(1-r*r)*samplestdev(y)
      return slope, intercept, r, prob, sterrest
docs: Calculates a regression line on x,y pairs.  
  
  Usage:   llinregress(x,y)      x,y are equal-length lists of x-y coordinates
  Returns: slope, intercept, r, two-tailed prob, sterr-of-estimate