# Histogram “PDF” vs “Probability”

I have a discrete random variable with values from $0$ to $100$. I have plotted its histogram with bars centered in $0, 5, 10,\dots,100$. First I made the histogram using the "PDF" option, But I notice that the sum of values (height) of, for example, bars $\ge 70$ only sums $0.086$. And therefore, I do not know if the $y$-axis should say probability.

After that, I have used option "Probability". In this case, the bars sum to $1$ which indicates that each bar has its value of probability.

I know this can be more a mathematical question than a question about the Mathematica language, but I do not understand the difference between the two options, "PDF" and "Probability". Besides, I do not know how to label the $y$-axis. What label results are more appropriate? Probability? Density? Relative frequency?

Thank you very much for your help.

## 1 Answer

I believe that when you specify "PDF", the value on the ordinate is the average probability density within a given bin. And to get the "within-this-bin" probability, you need to multiply the ordinate by the bin width (5 in this case); and that's what you get when you specify the "Probability" option.

• Thank you is correct – user1993416 Aug 15 '17 at 20:34
• An additional note that others might find useful for when trying to use the "Count" option in Histogram. To get a continuous PDF to match, scale the density function by (binWidth * Length[data]) – mikemtnbikes Oct 20 '17 at 17:24