3

What is the difference between a probability density function and a probability mass function?

Deekor
  • 263

2 Answers2

4

One is for discrete variables, the other for continuous.

They are also interpreted differently. The PDF is a probability density. If f(x) is a PDF, f(x) doesn't tell you the probability of getting x (In fact, the probability of getting precisely x is 0). The way you use a PDF is through integration. So, the probability of getting a value that is in a dx area around x is approximately f(x)*dx.

elexhobby
  • 1,597
  • 11
  • 18
  • 1
    why is it approximate? What is an exact value? $f(x)dx + o(dx^2)$? – naz Mar 24 '19 at 12:44
  • Can discrete random variables can be treated as continuous (and thus be described by a PDF as well)? – ryanwebjackson Mar 08 '22 at 03:49
  • @naz Quite the late answer, but – it's approximate because $f(x)$ isn't necessarily constant, even in a tiny $dx$-area around $x$. It is approximately so, however, as (intuitively) "this well-behaved (in some way) function is unlikely to change much in such a small area". An exact value would then be $\int_a^{a+dx} f(x) dx$ (which note is indeed $f(x) \cdot dx$ if $f(x)=$const in $(a, a+dx)$). – Shay Dec 06 '24 at 14:54
3

To be precise, a probability mass is a probability distribution. However, it is not a probability density - probability masses are discrete, while probability densities are continuous.

Ayesha
  • 2,740
  • So the only difference is that a PDF is continuous? – Deekor Mar 07 '14 at 00:28
  • More or less. Keep in mind that the discrete-ness of a PMF gives rise to some other differences. For example, the value of a PMF for an element of the sample space is a probability, while we must integrate the PDF to obtain a probability. – Ayesha Mar 07 '14 at 00:30