-2

I am using hist(x_new,freq = FALSE) command to plot histogram, but the probability density exceed the value unity.

  • A code example and screenshot of your plot would be helpful. – BonsaiOak Nov 09 '17 at 17:31
  • A [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) is needed if others are to provide a meaningful answer to this question. – Peter Nov 09 '17 at 17:44
  • I am new to this site and this is my first ever question. I also tried to but add the screen shots the site wasn't accepting the question. please remove the downvotes, it would be much appreciable. – Vijay Kumar Nov 10 '17 at 18:58
  • I got the answer from https://stackoverflow.com/users/4996248/john-coleman . It is the area which should be unity, not necessarily the values on y axis. – Vijay Kumar Nov 10 '17 at 18:58

1 Answers1

3

Probability density is not the same thing as probability. Densities are not in general bounded by 1. The point is that the total area under the density is 1, which is completely consistent with portions of it being above 1. In fact, it is quite common for a density function (or density histogram) to be above 1 in some places.

John Coleman
  • 51,337
  • 7
  • 54
  • 119
  • agreed. could you please mention how can I get the parameter of the kernel density estimate in R The command is hist(data) and density(data) – Vijay Kumar Nov 10 '17 at 09:36
  • @VijayKumar Type `?density` at the console. R help files are very informative (for most functions) and typically have detailed descriptions of the parameters and references to sources which describe the implemented algorithm. – John Coleman Nov 10 '17 at 14:59