title: Least square method in python?
body: <p>I have these values:</p>
  
  <pre><code>T_values = (222, 284, 308.5, 333, 358, 411, 477, 518, 880, 1080, 1259) (x values)
  </code></pre>
  
  
  
  <pre><code>C/(3Nk)_values = (0.1282, 0.2308, 0.2650, 0.3120 , 0.3547, 0.4530, 0.5556, 0.6154, 0.8932, 0.9103, 0.9316) (y values)
  </code></pre>
  
  <p>I know they follow the model: </p>
  
  <pre><code>C/(3Nk)=(h*w/(k*T))**2*(exp(h*w/(k*T)))/(exp(h*w/(k*T)-1))**2
  </code></pre>
  
  <p>I also know that <code>k=1.38*10**(-23)</code> and <code>h=6.626*10**(-34)</code>.
  I have to find the w that best describes the measurement data. I'd like to solve this using the least square method in python, however I don't really understand how this works. Can anyone help me?</p>