I have a data-set with n = 90, probably follows the gamma distribution. I used the maximum-likelihood estimation (MLE) to estimated the alpha and beta parameters of the gamma distribution using Matlab.

My question is

What is the best way to test the fit (goodness of fit) of the gamma distribution with the estimated parameters versus the original data-set ?

Can I compare the Cumulative distribution function (cdf) - empirical vs theoretical ?

*empirical_cdf = ecdf ( data set )*

theoretical_cdf = cdf ( gammafit )

theoretical_cdf = cdf ( gammafit )

And make same test, for example the KS two samples

*kstest2 ( empirical_cdf, theoretical_cdf )*

Is this the correct way ?