i am after a function that, given a mean and standard deviation, returns a random value such that if you call the function often enough, the values it returns represent a normal distribution.
Thanks for that....the formula you gave, while correct, is a bit hard to put in code (like...integral to infinity). I guess i could approximate, but still tricky.
Maybe it would be best to approximate to binomial distr, with large enough n for good fit, but low enough to not take too long to compute....
The integrand gets extremely small as you approach large negative (or positive) x-values. Just approximate with some reasonably large in magnitude minimum value - you'll be limited by floating point number precision and roundoff errors anyway.
Wow! that's great
thanks, the second part is exactly what i was looking for...
but, for the Box-Muller thing, which i'll end up using, the random values that you give it (r1 and r2), do they have to be between 0 and 1, or must be integers, or what?
but anyway, thanks for the sheet...it's made really nicely. U have that already, or make it for this?
Wow! that's great
thanks, the second part is exactly what i was looking for...
but, for the Box-Muller thing, which i'll end up using, the random values that you give it (r1 and r2), do they have to be between 0 and 1, or must be integers, or what?
r1 and r2 are any random values between 0 and 1. They have to be decimal numbers. I attach another MS-EXCEL file (Normal_Forum_1.XLS) with an example of the Box-Muller method and a better explanation of the expression and some stats procedures possible.
but anyway, thanks for the sheet...it's made really nicely. U have that already, or make it for this?
I use computer simulation methods often for the decision making processes: lay-out alternatives, organizational methods, equipment investments, overhauls of big machinery, etc., so I am used to these stats which give me lots of fun.