I'm trying to fit my data to one of well known distribution functions
using kstest. What I'd like to say at the end is something like
"Gamma distribution passed Kolmogorov-Smirnov test with 90%
confidence level for my data" (Gamma distribution and the 90% value
were arbitrarily chosen).
Please take a look at the following code.
Three different distributions were tested to fit my data 'xx' using
normfit, gamfit, and weibfit as shown in the code.
'alpha' is the significance level, and whatever it is, that is the
question I'd like to make.
[norm_para(1) norm_para(2)] = normfit(xx);
gam_para = gamfit(xx);
weib_para = weibfit(xx);
First, alpha = 0.05, and run the code.
The result shows H=[1 1 0], P=[0.0127 0.0121 0.2041].
Second, alpha = 0.01;
then, H=[0 0 0], P==[0.0127 0.0121 0.2041].
What result could I get from this?
Does it mean that the third distribution(weibull) fits the best?
(Why? biggest p-value?)
Can I simply conclude the distribution with the biggest p-value is
the best fit?
What is the confidence level in this case? (what is the link between
p-value and confidence level and significance level?)
Thank you in advance.