Fitting a gamma distribition to x,y data

2 views (last 30 days)
Moritz
Moritz on 3 Mar 2014
Edited: Moritz on 3 Mar 2014
Dear all,
i do have data from size distribution measurements. The data is like: number of counts in specific size class ( e.g 1 - 1000 µm).
I can use nlinfit like:
p = nlinfit(sizeclass,NormalisedCounts,@gammafun_3param,[1 10 1500])
with
function y = gammafun_3param(abc,x)
a = abc(1); b = abc(2); c = abc(3);
y = c * x.^(a-1) .* exp(-x/b) / (b^a * gamma(a));
end
This works pretty well. The reason why i do not understand this issue is probably due to my lack of statistic knowledge.
1) Why does the usual gammafunction with c=1 not fit (the scaling is wrong)
2) How can i use gamfit if i cannot pass the information of the sizeclass to it ?
Do i have to normalize the data somehow different ? I normalized the counts by dividing by their sum.
Kind regards
Moritz

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!