mercredi 17 juin 2015

RNG distribution test for several picks combination

I have a RNG method with sucj signature:

short[] GetRandomNumbers(picks,From,To,ExcludedNumbers)

it is used to generate for example Lottery results, hence: pick 6 random numbers from range [From ... To] excluding several numbers.

I need to test it, and show even distribution.

  1. Can I simply test a single pick within a range and test it's distribution? or must I check there is no correlation within combinations?

  2. if I need to check the combinations distribution, any idea for good algo? even pick 6 numbers out of range [40...70] would end up in Population of 70*69*68*67*66*65 = 94403509200 . what would be a good way of test distribution for it? (Monte Carlo Method with some Hash table - couldn't think of any)

Any Ideas?

Thanks in advance ...




Aucun commentaire:

Enregistrer un commentaire