# Choosing The Best Fitted Probability Distribution Model

The following Example 20 Obs and i used Goodness of fit test with Exponential distribution, another time with Weibull distribution and third time with Pareto distribution .All of them are significant but the question which of them are the best fitted model?? so i want compare between them by Akaike information criterion and likelihood ratio test statistic and so on

R={0.742089, 1.30406, 0.662704, 0.387884, 0.131098, 0.168853, 0.181532, 0.336997,
0.163182, 0.14527, 0.781211, 0.533697, 1.22093, 0.343433,  0.332585, 0.179971,
0.487594, 1.14555, 0.402918, 0.757988}


first: with respect to Exponential Distribution

H = DistributionFitTest[R, ExponentialDistribution[a], "HypothesisTestData"]
H["TestDataTable", All]


Second:with respect to Weibull Distribution

H = DistributionFitTest[R, WeibullDistribution[a, b], "HypothesisTestData"]
H["TestDataTable", All]


Third with respect to pareto distribution

H = DistributionFitTest[R, ParetoDistribution[a, b], "HypothesisTestData"]
H["TestDataTable", All]

• Thanks for your interest I formatted it – Momo Oct 9 '14 at 22:11
• When I run the DistributionFitTest only the ParetoDistribution shows any promise to predict the sample - it has enough small values to be fit, the other two really don't. What do you mean by that they are all "significant". – SEngstrom Oct 9 '14 at 22:43
• NonlinearModelFit provides AIC information. – bobthechemist Oct 9 '14 at 22:52
• Dear @SEngstrom look at the P-value of K-Smirnov statistic all of distribution are greater than 0.01 so all of them are significant at significance level 0.01 – Momo Oct 9 '14 at 23:16

edistdata = Table[{x, CDF[EmpiricalDistribution[R], x]}, {x, R}];

cdfw[a_, b_, x_] := Simplify[CDF[WeibullDistribution[a, b], x], x > 0];
cdfe[a_, x_] := Simplify[CDF[ExponentialDistribution[a], x], x > 0];
cdfp[a_, b_, x_] := Simplify[CDF[ParetoDistribution[a, b], x], x > 0];
nlmw = NonlinearModelFit[edistdata, cdfw[a, b, x], {a, b}, x];
nlme = NonlinearModelFit[edistdata, cdfe[a, x], {a}, x];
nlmp = NonlinearModelFit[edistdata, cdfp[a, b, x], {a, b}, x];

Transpose[{{"", Weibull, Exponential, Pareto}, {"AIC", nlmw["AIC"], nlme["AIC"], nlmp["AIC"]},
{"BIC", nlmw["BIC"], nlme["BIC"], nlmp["BIC"]}, • @Momo, unfortunately, LR statistics is not available for NonlinearModelFit. I used all goodness-of-fit measures available for NonlinearModelFit. LR is available for only GeneralizedLinearModelFit, and, although it may be possible to use GLM after some data transformations, haven't had time to think about the right approach for that.. – kglr Oct 9 '14 at 23:30