fitter icon indicating copy to clipboard operation
fitter copied to clipboard

Bug: get_best() returns worst fitting distribution when method is set to the ks_statistic

Open andymd26 opened this issue 2 years ago • 1 comments
trafficstars

The logic for the identification of the best distribution fit in the get_best() function when the ks_statistic method is selected is backwards given the null hypothesis of the KS test. It looks like the get_best() function is returning the distribution with the minimum KS p-value. But the null hypothesis of the KS test is that the sample is distributed according to the reference distribution. And selecting the model with the minimum KS p-value means we're potentially picking the worst fitting distribution.

andymd26 avatar Dec 16 '22 14:12 andymd26

@andymd26 do you have a simple example to fix the potential issue ? thanks in advance

cokelaer avatar Jan 01 '23 21:01 cokelaer