MATLAB 如何判断数据样本是否服从伽马分布(Gamma)
data = abs(randn(1000, 1)); % Example data
params_gamma = fitdist(data, 'Gamma');
cdf_gamma = gamcdf(data, params_gamma.a, params_gamma.b);
[h_gamma, p_gamma, stats_gamma] = chi2gof(data, 'CDF', params_gamma);
fprintf('Gamma Distribution:\n');
disp(p_gamma);
代码来源:How to check which distribution (normal or exponential or gamma) fits best to a data set? Which function to use for this?