I got this explenation:

"It is well-known that an image’s histogram is essentially the probability mass function (pmf) of the image (only differing by a scalar). Multiplying each component of the pmf by a correspondingly shifted unit impulse results in the probability density function (pdf). Obviously, in the context of discrete Fourier transform (DFT), the unit impulses can be ignored, implying that we can treat pmf and pdf exchangeable. Thus, the pdf can be thought as the normalized version of a histogram."

and I am trying to fully understand it.

It is clear to me that histogram of an image are probability mass functions. How can we treat is as probability density function since it is discrete signal, not continuous? Is the only reason that DFT of both PMF and PDF would give us same result so it doesn't really matter in this scenario?

And how can we even get PDF from PMF? I don't get this part: "multiplying each component of the pmf by a correspondingly shifted unit impulse results in the probability density function" and I cannot find any good example or explenation.


1 Answer 1


A random variable (RV) doesn't need to be continuous in order to have a PDF. The PDF of a discrete RV, i.e. a RV that takes on only discrete values, is of course not a continuous function but is only different from zero at the possible discrete values of the RV.

An example would be the outcome of a fair die. It takes on the values 1 to 6 with equal probability $1/6$. It's PDF is given by


where $\delta(x)$ is the Dirac delta impulse. The Dirac delta impulses are necessary in the PDF (as opposed to the PMF) because probabilities are computed from the PDF by integration. Since for any interval $[a,b]$ containing the value $0$


the PDF given by (1) integrates to $1$, as desired. And the probability of the RV $X$ being inside an arbitrary interval $[a,b]$ is

$$P[a\le X\le b]=\int_a^b p(x)dx$$

  • $\begingroup$ Wow thanks, didn't know this is possible. However I am working with normalized image histogram (PMF) which contains wild numbers so I am afraid it won't be possible to make PDF of it anyhow easy like in your fair dice example. As final result I am trying to get characteristic function which is DFT of PDF and I have only PMF. And my source says that in this case the PDF and PMF are exchangeable so I dont need any PDF and I should just do DFT of PMF and it will be that CF. How is this possible? I can't see the idea behind that. $\endgroup$
    – Ding
    Commented Feb 16, 2015 at 0:15
  • $\begingroup$ @Ding: You just need to normalize the PMF such that its values add up to 1. As for the characteristic function, you can either take the continuous time Fourier transform of the PDF (with Dirac deltas), or - equivalently - the discrete time Fourier transform (DTFT, not DFT) of the PMF. Both will give the same result, which is a continuous function. $\endgroup$
    – Matt L.
    Commented Feb 16, 2015 at 8:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.