Lognormal probability density function Fitting to experimental data
显示 更早的评论
Hello. I would appreciate so much if someone could give me a hand whit this, I've been trying to fit a Lognormal probability density function curve to an experimental data that comes from frequency info. I was able to reproduce some examples using "lognpdf", but I didn't succeed when I tryed to adjust them.
The experiemental data is:
rp = [0.125 0.175 0.200 0.250 0.300 0.375]*1e-6 ; % um
fp = [6.160 19.63 61.19 10.96 1.370 0.690]/100 ;
plot (rp,fp,'linestyle','--','color','b')
stem(rp*10^6,fp)
grid on;
ax = gca;
ax.GridLineStyle = '--';
ax.GridColor = 'r';
xlabel ('r (\mum)');
ylabel ('fp');
I need to fit it with the "lognpdf" if possible, it would also work with lognormal distributions, in both cases I need to calculate the statistic values (mean and standard deviation).
Thanks in advance.
1 个评论
infinity
2019-7-29
回答(1 个)
Jeff Miller
2019-7-30
0 个投票
I'm guessing that your rp values are the tops of various bins and that the fp values are the probabilities in each bin? If so, Cupid says that the minimum chi-square estimates of the lognormal mean & sd (multiplied by 10^6 as in your figure) are 0.18144 and 0.032248.
As far as I can see, lognfit will only work with the original data values, not with binned frequency data.
2 个评论
Jhon MT
2019-7-30
Jeff Miller
2019-7-31
Hmmm...now I'm not sure what your rp and fp are. Your original fp values summed to 1, so I thought they were bin probabilities. These new fp values obviously aren't probabilities however.
If you have the original data, it is better to use those. What was the problem that made you say "even with the original data I couldn't do it"?
类别
在 帮助中心 和 File Exchange 中查找有关 Lognormal Distribution 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!