2

How do distribution fitness-tests, ex. scipy.stats.norm.fit work? Investigation of scipy source code led me to rv_continuous.fit method, but it looks like beating the air. What algorithms are used, Pearson's chi-squared test or some other ones?

UPD As I understood optimization algorithm inside fit finds maximum likelihood estimation. But for example for scipy.stats.norm, 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?

leventov
  • 14,760
  • 11
  • 69
  • 98
  • *"Why it isn't calculated directly?"* In recent versions of scipy, the MLE parameters computed by the `fit()` method are calculated directly for a few of the distributions, including `norm`. – Warren Weckesser Jun 23 '16 at 19:05

1 Answers1

2

All rv_continuous.fit seems to be doing is act as a wrapper method for various functions, beginning with fmin, in the optimize class, using the downhill simplex algorithm.

hd1
  • 33,938
  • 5
  • 80
  • 91