How can we calculate probability density of a histogram?
古いコメントを表示
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.
採用された回答
その他の回答 (3 件)
Image Analyst
2017 年 8 月 19 日
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 件のコメント
ishita agrawal
2017 年 8 月 19 日
Sajid Afaque
2020 年 6 月 12 日
what about for prior version.
i am using 2013b and i need probability distribution
Image Analyst
2020 年 6 月 12 日
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
2017 年 8 月 19 日
0 投票
Use the 'Normalization' option of the histogram function.
Mehri Mehrnia
2022 年 6 月 27 日
0 投票
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 件のコメント
Image Analyst
2022 年 6 月 28 日
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:
カテゴリ
ヘルプ センター および File Exchange で Histograms についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
