I performed the following test using the allfitdist, fitmethis, and fitdist function using the same statistical toolbox. The results are as follows:

>> data1 = normrnd(5,3,1000,1);

>> data2 = gamrnd(5,0.5,1000,1);

>> x = data1+data2;

>> [D PD] = allfitdist(x); D(1)

>> F= fitmethis(x);

>> pd = fitdist(x,'Normal')

Results of allfitdist: DistName: 'normal'; Params: [7.3265 3.1743]

Results of fitmethis: name: 'normal'; par: [7.4077 3.1510]

Results of the fitdist: mu = 7.51921; sigma = 3.27417

As shown, both allfitdist, and fitmethis found the same best fit; however, the parameters are not the same. In addition, the fitdist results in another set of parameters. Can anyone explain this issue?

More Mohamed EL-Shimy's questions See All
Similar questions and discussions