|
-
Apr 6th, 2003, 06:33 PM
#1
Thread Starter
Addicted Member
Random Numbers along Bell Curve?
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,
-
Apr 7th, 2003, 04:37 AM
#2
Sleep mode
Hmm , are you using Random obj ??
-
Apr 7th, 2003, 10:02 AM
#3
Thread Starter
Addicted Member
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.)
-
Apr 7th, 2003, 10:08 AM
#4
Sleep mode
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 ?
-
Apr 7th, 2003, 10:10 AM
#5
Thread Starter
Addicted Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|