I am trying to understand the delta function notation used to be express a monte carlo approximation of a probability distribution. The notation used in this (p10) is

$\pi(x_{1:n}) = \frac{1}{N}\sum^N_{i=1}\delta_{X^i_{1:n}}(x_{1:n})$

where $X^i_{1:n} \sim \pi(x_{1:n})$ for i=1,..,N

I'm wondering whether this is equivalent to the following

$\pi(x_{1:n}) = \frac{1}{N}\sum^N_{i=1}\delta(x_{1:n}-{X^i_{1:n}})$

for a specific value of $x_{1:n}$, say $x_{1:n} = y$. I understand the latter to mean that the probability of a particular $x_{1:n}$ is given by the number of samples that take this value, (hence $\delta(y - X^i_{1:n}) = \delta(0) = 1 )$ divided by the total number of samples, N.

Is this correct?

I realise my questions is similar to the question asked here: Delta Function in Monte Carlo Sampling and have read it and looked at linked answers.

  • $\begingroup$ Related: stats.stackexchange.com/questions/73623. $\endgroup$
    – whuber
    Apr 5, 2016 at 21:38
  • $\begingroup$ This Monte Carlo approximation consists in replacing the unknown distribution $\pi$ with a finite support distribution, which support is the simulated sample $X_{1:n}$. This is also the basis of bootstrap. $\endgroup$
    – Xi'an
    Apr 8, 2016 at 17:04
  • $\begingroup$ I wrote a blog post about it. I explain what the Dirac-delta function is and how it can be used for sampling, here $\endgroup$ May 19, 2020 at 15:38

1 Answer 1


Yeah, that's correct. You can see from the wikipedia definition here how the generalization with subscript is defined, and your transformation, in the case at hand, renders it back into original delta notation.


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.