# How to interpret height of density plot

How should I interpret the height of density plots: For example in the above plot, peak is at about 0.07 at x=18. Can I infer that about 7% of values are around 18? Can I be more specific than that? There is also a second peak at x=30 with height of 0.02. Would that mean that about 2% of values are around 30?

Edit: The question on Can a probability distribution value exceeding 1 be OK? discusses the probability value of >1 which is not an issue here at all. It also discusses that in relation to naive Bayes classfier which is also not the point here. I want to have, in simple language, the numerical inferences that we can draw from such density curves. The role of area under curve is discussed but my question is specifically what inference can we draw regarding a particular x and y combination that exist on the curve. For example, how can we relate x=30 and y=0.02 on this graph. What statement can we write regarding relation between 30 and 0.02 here. Since densities are for one unit value, can we say that 2% of values occur between 29.5 and 30.5? If that is the case, how do we interpret if values vary from only 0 to 1, as in following plot: If 100% of values occur between 0 and 1, why any curve is there outside 0 and 1?

There is a flat part here at x=0.1 to x=0.2 where y equals 0.8. It forms a rectangle. How can we find out what proportion of values occur between x=0.1 and x=0.2

• – Tim Apr 23 '15 at 6:24
• The first thread mentioned as a duplicate is relevant, despite the precise wording in its title, as it makes the key point that as calculated for continuous variables a probability density is not a probability. (A more subtle version would define density rigorously, and include the possibility that density is defined by counting measure.) – Nick Cox Apr 23 '15 at 8:40
• I agree with @NickCox, though with the extra edits, there is more focus on area (which is like the third question) as well as height (which is more like the second question) in Tim's very good list of closely related questions. – Silverfish Apr 23 '15 at 8:57
• There's also a separate issue that is not raised in those questions, which is why I do not think this is overall a duplicate of any of those questions individually: why in the empirical as opposed to theoretical density plots, can there be "density" outside the support (or observed values) of the distribution? That requires additional discussion about bandwidth and the construction and interpretation of kernel density plots. Perhaps this question would benefit from an edit and refocus on those issues which do not duplicate existing questions. – Silverfish Apr 23 '15 at 8:59

## 1 Answer

You need to be careful with your wording here. Assuming x is a continuous variable, the probability of any individual value is precisely zero. Talking, as you did, about the probability of a value lying around some point is fine, though you might want to be a bit more precise. Your second statement, in which you provided the interval along with the probability is something I would be looking for.

In essence, an integral of density function with respect to x will tell you about the probability itself (that's why it's called density). Obviously, the interval over which you will integrate may be arbitrarily small, so you can get close to a point to an arbitrary degree. That said, when the density function is varying very slowly over that interval, you can approximate the integral by some numerical technique, such as the trapezoidal rule.

To summarize: the height of the density function is just that, its height. Anything you might want to conclude about probability will have to include integrating of some form or another.

• does the area under the curve always sum to 1.0 in this sort of plot? – ecologist1234 Apr 22 '17 at 0:32
• @ecologist1234 Yes, since this is probability density distribution, the integral from $-\infty$ to $\infty$ (at "worst") will result in a 1.0. It means that all the data is somewhere along that interval with a 100 % probability. – Fato39 May 3 '17 at 14:51