0

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...

  • https://stats.stackexchange.com/questions/86094/what-is-a-density-function?rq=1 - does this help? – Alex J Oct 03 '23 at 05:12
  • @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? – KansaiRobot Oct 03 '23 at 05:17
  • Does the density plot values have to be always under 1.0? – KansaiRobot Oct 03 '23 at 05:30
  • 5
    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. – Igor F. Oct 03 '23 at 05:54
  • @IgorF. so the last plot I show is not a density plot? – KansaiRobot Oct 03 '23 at 05:57
  • I don't know. What's the area under the curve? – Igor F. Oct 03 '23 at 06:05
  • @IgorF.Oh I see, What does the number for each X represent in simple terms? – KansaiRobot Oct 03 '23 at 06:21
  • Maybe this answer can help: https://stats.stackexchange.com/a/500788/169343 – Igor F. Oct 03 '23 at 08:16
  • 5
    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. – whuber Oct 03 '23 at 13:40
  • 2
    @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 https://stats.stackexchange.com/questions/4220/can-a-probability-distribution-value-exceeding-1-be-ok – Glen_b Oct 04 '23 at 01:08

0 Answers0