Forums > MaxMSP

Probability question

January 12, 2013 | 2:17 am

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?

– Pasted Max Patch, click to expand. –

January 12, 2013 | 7:01 pm

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).

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.

– Pasted Max Patch, click to expand. –

Viewing 2 posts - 1 through 2 (of 2 total)