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.
MATLAB: How can we calculate probability density of a histogram
histogramprobability density
Best Answer
If you have version R2014b or later, you can use the histogram command, and specify the 'Normalization' property to be 'probability':
h.Values will give you the density.