0
$\begingroup$

I have been working with histograms so far. I understand what they show. I am trying to understand what density plots are. In this tutorial it says

The curve (of the density plot)represents the proportion of the data in each range, rather than the frequency.

the height of the curve (shows) the proportion of the data that falls into that range.

What does that mean in practical terms. For example I have the following histogram

enter image description here

or similarly enter image description here

Then I try to plot the density and I got

enter image description here

I know what the value in the bin [0,0.1] means. (how many values in that range appear in my data) But what does the curve in there mean. "the proportion of data that falls into that range" What range? The curve is a value for each point, not a range...

$\endgroup$
10
  • $\begingroup$ stats.stackexchange.com/questions/86094/… - does this help? $\endgroup$
    – Alex J
    Commented Oct 3, 2023 at 5:12
  • $\begingroup$ @AlexJ reading that question and answer it gives me the impression that density has to be always below 1.0 ("probabilities") and therefore the plot above is wrong? $\endgroup$ Commented Oct 3, 2023 at 5:17
  • 5
    $\begingroup$ Density is not probability. It can have any non-negative value. Only its integral i.e. the area under the density curve must be = 1. $\endgroup$
    – Igor F.
    Commented Oct 3, 2023 at 5:54
  • 5
    $\begingroup$ Your problem is that your understanding of the histogram is incorrect: it represents probability by means of area of bars, not their heights. Adopting this perspective leads to an immediate and natural connection to density plots, which use the same graphical metaphor: area represents probability. The plot you label "density" is not a correct density: its total area is only about $1/4$ rather than $1$ as it must be. $\endgroup$
    – whuber
    Commented Oct 3, 2023 at 13:40
  • 2
    $\begingroup$ @KansaiRobot Re "Does the density plot values have to be always under 1.0?". If you type density > 1 into the search bar, magic happens. A couple of clicks and you end up at stats.stackexchange.com/questions/4220/… $\endgroup$
    – Glen_b
    Commented Oct 4, 2023 at 1:08

0

Browse other questions tagged or ask your own question.