Consider a distribution $P = \frac{1}{2}P_1 + \frac{1}{2}P_2$ where $P_1, P_2$ are probability measures on a measurable space $(\mathbb R, \mathcal B)$ such that

$P_1: A \to \int_A \mathcal N(x; 0, 1) d\mu(x)$ for all $A \in \mathcal B$, and

$P_2 = \frac{1}{3} \delta_0 + \frac{2}{3} \delta_1$, i.e. a discrete distribution which assigns $0$ and $1$ probabilities $\frac{1}{3}$ and $\frac{2}{3}$.

What kind of proposal is chosen in this case and do we evaluate densities (as given in recipes for MCMC/SMC) or something else when calculating acceptance ratios (e.g. for Metropolis-Hastings) or importance weights (e.g. for Importance sampling, SMC, etc.)? Can you please point me to the correct resources?


1 Answer 1


$P$ has a density against a (reference) measure made of the Lebesgue measure plus the counting measure on $\{0,1\}$. The later measure gives weights of $1$ to the atoms $0$ and $1$. This means that the density at atoms like 0 and 1 is equal to the weight against the counting measure and only the counting measure!, hence it is 1/6 and 2/6 for 0 and 1, respectively, in your example. (See this other entry for additional comments on mixed measures.)

Therefore, MCMC and in particular Metropolis-Hastings apply to this case. This means that the proposal must also be continuous against the measure made of the Lebesgue measure plus the counting measure, hence the proposal can have atoms at 0 and 1. For the chain to be converging it must have atoms at 0 and 1.

Here is an example of a (dumb) Metropolis-Hastings algorithm for your target

#target is N(0,1) with prob 1/2, mass at 0 with prob 1/6 and at 1 with prob 1/3
  if (isint){ t=(x==0)/6+(x==1)/3
    }else{ t=.5*dnorm(x)}

#Metropolis with random walk+U{0,1} proposal

for (t in 2:T){
  if (sampint[t]){ 
  if (runif(1)>metro){ samp[t]=samp[t-1];sampint[t]=sampint[t-1]}

This gives the proper fit, as shown by the following histogram: enter image description here

and the (right) proportion of zeros and ones:

> sum(sampint)/T
[1] 0.49676
> sum(samp==0)/sum(samp==1)
[1] 0.5027832

Your Answer

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

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