Histogram then a curve fitting to compare with normal
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Dear Everbody, I have a array of daily returns of size 1775.
When I use:
histfit(GLLlogreturn, 60)
I get a histogram with a normal curve superimposed.
Is there a way I can get a curve fitting tool to match my data as a comparison to the normal distribution curve?
So 3 things on 1 plot: Histogram, Curve fitting of my data, Normal curve.
0 commentaires
Réponse acceptée
the cyclist
le 5 Fév 2012
It's not perfectly clear to me what you want, but here are a couple factoids for you.
First, it's important to realize that the normal curve that histfit() calculates is a fit to the underlying data, not to the histogram of the data. So, if what you want is a normal curve fit to your curve, histfit() is doing what you want.
If you don't want a normal curve, then what do you mean by "curve fitting of your data"? Do you have some other functional form in mind? MATLAB can fit to many different functions.
If you want to do something non-parametric rather than a specific function, then one possibility is to do a kernel density estimation. MATLAB has a function for that as well: ksdensity().
0 commentaires
Plus de réponses (1)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!