Hakan Kiyar
Hakan Kiyar

Reputation: 1209

Fit A Curve to a Histogram

Hisgram distribution

Is there any possibility to fit a curve to that histogram above in Matlab?

The histogram is not normalized or anything like that. I know that there is a function called histfit,but can i use it here?

Upvotes: 3

Views: 14762

Answers (4)

yuk
yuk

Reputation: 19870

Try this FileExchange submission:

ALLFITDIST - Fit all valid parametric probability distributions to data.

--- UPDATE ---

ALLFITDIST is no longer available on the MATLAB File Exchange.

You can try this instead:

FITMETHIS - finds best-fitting distribution to data vector, including non-parametric.

Upvotes: 2

Michael
Michael

Reputation: 2250

See also Kernel density estimation

http://en.wikipedia.org/wiki/Kernel_density

Upvotes: 0

Memming
Memming

Reputation: 1739

I think what you want it to fit a distribution, not any curve that might not have finite area under the curve. Data looks like it's censored on the right tail, but over all it may fit log normal distribution or Gamma distribution pretty well. If you have stats toolbox, try gamfit or lognfit for starter.

Upvotes: 0

jkt
jkt

Reputation: 2578

If you know the underlying distribution (i.e. skewed gaussian etc.), you can manually do a maximum likelihood estimate for the parameters of the distribution and then plot the resulting distribution on top of your histogram. However, you need to normalize your histogram so that you see empirical probabilities instead of the numbers.

Upvotes: 0

Related Questions