title: Python - calculating trendlines with errors
body: <p>So I've got some data stored as two lists, and plotted them using</p>
  
  <pre><code>plot(datasetx, datasety)
  </code></pre>
  
  <p>Then I set a trendline</p>
  
  <pre><code>trend = polyfit(datasetx, datasety)
  trendx = []
  trendy = []
  
  for a in range(datasetx[0], (datasetx[-1]+1)):
      trendx.append(a)
      trendy.append(trend[0]*a**2 + trend[1]*a + trend[2])
  
  plot(trendx, trendy)
  </code></pre>
  
  <p>But I have a third list of data, which is the error in the original datasety. I'm fine with plotting the errorbars, but what I don't know is using this, how to find the error in the coefficients of the polynomial trendline.</p>
  
  <p>So say my trendline came out to be 5x^2 + 3x + 4 = y, there needs to be some sort of error on the 5, 3 and 4 values.</p>
  
  <p>Is there a tool using NumPy that will calculate this for me?</p>