What is the difference between the density and probability?
I have tried R in which I can use both pnorm
and dnorm
for the normal distribution and pbinom
and dbinom
for the binomial distribution, etc.
I have tried reading the documentation but I don't think it's quite clear what the difference is between those two functions. I know that pnorm(x)
gives me $P(X \leq x)$.
My guess is that the density is the value of $f(x)$ while the probability is $\int_\infty^x f(x) \, \mathrm{d}x$. If this is correct, I don't understand what the value of $f(x)$ gives me of information since only the area under the function gives me the probability.
I know that the interesting values are pdf=probability density function and cdf=cumulative density function. So maybe the pdf is the value from dnorm
and is the area at a specific x while cdf is the value from pnorm
and is the area from $\infty$ to the specific x. But I have learned that you cannot get the probability at a specific $x$ in continuous distributions so that explanation does not make sense.