Probability question

matt22sound's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Does this provide me with an equal 10% chance of any number being selected?
In other words, does the random object with an argument of 10 give any number between 0-9 an equal probability that it will be chosen?

Peter Castine's icon

The last time David Zicarelli wrote about this, [random] was simply using the linear congruence RNG from Numerical Recipes (the book is available online if you want full details).

Max Patch
Copy patch and select New From Clipboard in Max.

The Linear Congruence algorithm gives a pretty flat distribution. It has several problems that make in unsuitable for hardcore statistical Monte Carlo simulations. For what you're doing it's probably more than good enough. Try the enclosed modification of your patch to get an idea of how many of each value you'll get after 1,000,000 bangs. Working out if that is "close enough" to equi-probable is up to you.