i'm trying to run some monte carlo simulations and need to draw a sample from a distribution which is defined by its parameters (e.g.a normal distribution with given mean and stdev).
i have no idea how to do this. any help would be much appreciated. thanks.
Not entirely sure what you are asking for help with here...
i just dont know how to do this in VB. i have no clue what sort of sub or functions you'd need to do this... i've tried searching the forums...but am not getting much. is there some critical keyword i'm lacking?
There's a link in my sig to some code for generating a Gaussian random number distribution. In the past I have used this to generate n random numbers, scaled appropriately and then fed each into the bootstrap Monte Carlo method to generate the results.
The generator is effectively the same as the sample from a Gaussian, and of course you can run it many times over to get a number of different possibilities.
I don´t know how to do it in VB but it is quite easy to do it in MS-EXCEL. I think it won´t be difficult for you to translate the code in cell I15 in sheet "data and Results" into VB.
To get new random values from the Normal distribution with parameters entered in cells I6 and I7, just press the function key F9.
Rui
...este projecto dos Deuses que os homens teimam em arruinar...