Dear all,
As the question describes, I'd like to generate a random number but from a specific distribution. For example, there is 80% chance that the random number is 1, 10% chance that the number is 2 and 10% chance it is 3. I tried both the random generator from the piped text and Randomiser. But I failed to specify the distribution that the random number is drawn from. Any idea how to accomplish this?
Thank you very much!
Solved
A random number generator from a specified distirbution
Best answer by ahmedA
You'll have to build it yourself.
The easiest solution is to define your distribution, put it in an array and pull one number randomly from that array.
In the example you've given above, you'll have to create an array with eight 1s, and one each of 2 and 3.
Then pull one number randomly from the array.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
