October 7th, 2008, 10:16 am
here is an interesting way to simulate correlated random numbers that I learnt recently from my boss. I thought I will share it. I had asked a question in interview about generating two correlated uniform random numbers and was expecting a standard answer. My boss told me a interestin way:1) I generate three uniform random numbers u1, u2 and u3.2) with probability p i pick up u1 and with prob (1-p) i pick u2 i.e i generate from mixture u43) now look at the corr between u3 and u4 ;-)I luved the soln.It can be generlised for a class of distribution. I will let you think abt it.