I need to generate a list of about 50 zeros and ones where each position on the list have a certain probability (say 70/30) to be picked over zeros and the result is to be used in a monte carlo simulation. Easy enough: if(rand()<0.7,1,0).
The problem is I need the list to “go towards the mean” rather quickly. At least closer to the mean than the list of 50 numbers get me on average. One way is to let the generation of the next number on be influenced by the distribution of zeros and ones so its probability is mildly screwed to bring the overall distribution in line. And I can do it quite easily. But is there a more “accepted” method?
I know any method suggested will be quite unfit for any scientific work and it would certainly not qualify as a list of random numbers but thats perfectly acceptable for the purpose.
The problem is I need the list to “go towards the mean” rather quickly. At least closer to the mean than the list of 50 numbers get me on average. One way is to let the generation of the next number on be influenced by the distribution of zeros and ones so its probability is mildly screwed to bring the overall distribution in line. And I can do it quite easily. But is there a more “accepted” method?
I know any method suggested will be quite unfit for any scientific work and it would certainly not qualify as a list of random numbers but thats perfectly acceptable for the purpose.