How can I generate random numbers using a bell curve as a model?
For example, 10 random numbers with higher odds being between 45-55 than between 35-45 or 55-65, and extreme odds of being 0-5 or 95-100, etc?
thanks,
Printable View
How can I generate random numbers using a bell curve as a model?
For example, 10 random numbers with higher odds being between 45-55 than between 35-45 or 55-65, and extreme odds of being 0-5 or 95-100, etc?
thanks,
Hmm , are you using Random obj ??
Yes. I figured out 2 different ways of doing this.
1) Use the old D&D dice rolling method (i.e. 3d6 has more chances of having a 9-11 than a 3 or a 18, etc.) This would produce a triangle rather than a bell curve.
2) Use a Sin wave, with the x as the returned value and y as a random number/inverted at 50%, etc. This would produce a bell curve, but I need to study on my trigonmetry a little more :) (This is kinda hard for me to explain, but I have the code worked out in my head.)
lol , I thought you're using Random class existed in the .NET Framework !
Dim rand As New Random()
Have you seen it or even tried it before ?
Yes I am using that now until I can tweak out the curve values. That System.Random produces random numbers just like the old VB rnd function, etc.
dim rnd as new system.random
i = rnd.next(10) ' produces random 1-10