I aim to achieve variance reduction in Random Walk Metropolis Hastings algorithm by introducing stratification to the random walk jumps. What I have tried is to make use of Latin Hypercube Sampling in each iteration.

lhs_1 <- randomLHS(1, 5)
ym_1 <- qnorm(lhs_1, sd = sqrt(5))

In above code I predefine the Random Walk jumps by using Latin Hypercube sampler. I have five groups in stratification. Values in ym_1 can serve as different proposals. I can try each of these proposals and pick the one with the highest density. This naturally increases the acceptance ratio but chain explores a limited region.

I am not sure about how to make use of these proposals. More generally, I am not sure about how to correctly achieve variance reduction here by using stratification in Random Walk Jumps. Any idea would be greatly appreciated.



1 Answer 1


The Latin hypercube code you wrote may not be accomplishing what you want.

This code draws 5 variables with marginals on U(0,1) with no stratification. You will not achieve any variance reduction this way:

lhs_1 <- randomLHS(1, 5)
ym_1 <- qnorm(lhs_1, sd = sqrt(5))

If you want one variable with 5 strata across [0,1]:

lhs_2 <- randomLHS(5, 1)
ym_2 <- qnorm(lhs_2, sd = sqrt(5))

In most other applications, the way to achieve variance reduction with a Latin hypercube is to draw the whole Latin hypercube at once, not iteratively as one does in a Metropolis Hastings algorithm. If you can determine a way to have a lot of Latin hypercube samples available up front, and then use them as the algorithm progresses, you might be able to make this work. There is also the technique of Progressive Latin hypercube sampling you might want to explore here

  • $\begingroup$ Thank you Mr. Carnell! Inside Metropolis-Hastings algorithm I can create the LHS matrix beforehand and use these values as proposals. I can iterate through that matrix in a loop and run qnorm(lhs_matrix[i,], mean=chain[i,], sd=sd) in order to get the proposal value for chain[i+1,]. But in that case I can have 5 different proposals, each pointing different direction. I can calculate the best direction by getting density values of each and decide to go to that direction, but it makes chain perform badly in terms of estimations. Do you have any suggestions about how to achieve VRF using LHS here? $\endgroup$
    – boyaronur
    Commented Apr 21, 2021 at 13:18
  • 1
    $\begingroup$ I've put some thought into it, and tried to find other researchers using LHS for MCMC, but I haven't found anything on point. I'm worried that the theory of Metropolis-Hastings requires a sample from the full distribution, and doesn't allow for stratification in sampling. On the other hand, a LHS ought to help in specifying the posterior in some way, but I don't have an answer on how. $\endgroup$
    – R Carnell
    Commented Apr 21, 2021 at 14:16
  • $\begingroup$ Thanks a lot for investing your time on it! There are types of Metropolis Hastings algorithm with multi try proposals. I am trying to find a way to apply stratification using that. $\endgroup$
    – boyaronur
    Commented Apr 22, 2021 at 7:41
  • $\begingroup$ @boyaronur Did you found a solution? I'd also be interested in achieving stratification inside Metroplois-Hastings. $\endgroup$
    – 0xbadf00d
    Commented Dec 2, 2022 at 14:36
  • $\begingroup$ Dear @0xbadf00d, thanks for your comment. You can simply apply stratification to your random walk steps. You need to predefine your random walk steps in order to achieve that. If you are to run your chain for 10000 steps, you need to create D dimensional random walk steps at once instead of creating them one by one within the chain. In that way, you can apply any stratification technique while creating that 10000 steps. $\endgroup$
    – boyaronur
    Commented Dec 4, 2022 at 17:27

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.