title: How do scipy.stats.<distribution>.fit methods work?
body: <p>How do distribution fitness-tests, ex. <code>scipy.stats.norm.fit</code> work? Investigation of scipy source code led me to <a href="https://github.com/scipy/scipy/blob/0650eac9e01d91f636ef266e8b94f0602bae3c17/scipy/stats/distributions.py#L1790" rel="nofollow"><code>rv_continuous.fit</code></a> method, but it looks like beating the air. What algorithms are used, <a href="http://en.wikipedia.org/wiki/Pearson%27s_chi-squared_test#Test_for_fit_of_a_distribution" rel="nofollow">Pearson's chi-squared test</a> or some other ones?</p>
  
  <p><strong>UPD</strong> As I understood optimization algorithm inside <code>fit</code> finds maximum likelihood estimation. But for example for <code>scipy.stats.norm</code>, maximum likelihood is well-known - it is sample mean for normal mean and square root from sample variance - for sigma. Why it isn't calculated direclty?</p>