I am trying to build an estimator based on my distribution that has 1585 values in it. The distribution itself kinda looks normal so I created a KDE and MLE estimators to find the best fit for my distribution.
KDE Estimate:
density = kde.gaussian_kde(odu, bw_method=None)
MLE
alpha = norm.fit(odu)[0]
beta = norm.fit(odu)[1]
e = norm(alpha,beta)
After running KS test for both, I get these values: (Note odu is the dataframe I am comparing too).
KDE KS Test
kstest(odu,density)
output:
KstestResult(statistic=0.9999938489747389, pvalue=0.0)
MLE kstest
kstest(odu,e.cdf)
Output:
KstestResult(statistic=0.11133223603089792, pvalue=3.9032020068459515e-17)
I am confused with the output kstest gives for both values. Lower the p-value means the null hypothesis is false, that means the distribution is a good fit? My professor says D-value close to 1 means its a good fit and the lower p-value means it has a high level of confidence. Is this correct? Thank you