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?

点赞(0) 打赏

评论列表 共有 0 条评论

暂无评论

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部