フィルターのクリア

Why do I get different lognormal parameters using lognfit vs. using the fit function with the lognormal equation?

2 ビュー (過去 30 日間)
I am working to fit a lognormal distribution to in situ aerosol size distribution data. I have tried a variety of approaches. When I use lognfit or calculate mu and sigma by hand (calculating the mean and standard deviation of the natural log of the data), I get the same numbers (mu = -10.3954, sigma = 1.8503). However, the PDFs based on these values do not match the data at all. In the plot below, the blue represents the mu and sigma when I use lognfit or calculate by hand, and orange is my actual data.
I have also tried using the MATLAB "fit" function with a specified (lognormal) equation and initial guesses for the parameters. When I use this method, I get mu and sigma values that make more sense when looking at the data (mu = -1.8843, sigma = 0.3915). Below I show this lognormal pdf compared to the data.
I have been trying to reconcile the differences between these methods for days and can't seem to figure out anything that makes sense. In short, I am wondering why these methods are giving such different answers? Any help would be appreciated!

採用された回答

Torsten
Torsten 2024 年 1 月 17 日

その他の回答 (0 件)

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by