How can we calculate probability density of a histogram?
Afficher commentaires plus anciens
Hello, I have a dataset containing hundreds of data points representing duration of events. I have plotted a histogram for this data set. I want to calculate probability density for the same. I want a plot having event duration at X-axis and probability density at Y-axis. I have attached histogram for which I want to calculate PD.
Réponse acceptée
Plus de réponses (3)
Image Analyst
le 19 Août 2017
Did you look in the documentation for histogram and see the normlization option:
'Normalization' — Type of normalization
'count' (default) | 'probability' | 'countdensity' | 'pdf' | 'cumcount' | 'cdf'
3 commentaires
ishita agrawal
le 19 Août 2017
Sajid Afaque
le 12 Juin 2020
what about for prior version.
i am using 2013b and i need probability distribution
Image Analyst
le 12 Juin 2020
Just divide your counts by either the number of counts in the highest bin, or by the sum of all bins, depending on how you define normalize.
Steven Lord
le 19 Août 2017
0 votes
Use the 'Normalization' option of the histogram function.
Mehri Mehrnia
le 27 Juin 2022
0 votes
I have the same problem , just at I want to have same edges in both before normalization and after normalization.
I got an strange result!!!
1 commentaire
Image Analyst
le 28 Juin 2022
Thanks for the announcement. If you have any questions, then attach your data and code to read it in with the paperclip icon after you read this:
Catégories
En savoir plus sur Histograms dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
