mercredi 6 avril 2016

Does PRNG explain consistent discrepancies between these predicted and actual outcomes?

I'm trying to determine probabilities of events by two separate means:

  1. Calculating the probabilities with mathematical formulas and
  2. running many simulations and averaging the results. The results of each do not agree.

To be more specific, I am trying to predict the likelihood of getting different numbers of symbol matches in a digital slot machine.

I'm running the simulation using JavaScript's Math.random() in Chrome 49, which uses the xorshift128+ algorithm for PRNG. I am finding that, across one million spins, the simulated results are pretty consistent.

For instance, I'm seeing matches of 3, 4, and 5 Cherries symbols appearing ~0.68%, ~0.14%, ~0.038% of the time, respectively. However, my math predicts these matches at exactly 0.62%, 0.13%, 0.03% given infinite spins. (Obviously I cannot run infinity spins, but since the results are consistent at one million spins, I don't believe I need to.)

Can the use of a PRNG explain the discrepancies here, or does the error lie somewhere in my mathematical formulas instead?

Will xorshift128+ show consistent inaccuracies in a predictive model across one million calls?

For more information about the problem and the specific formulas, please see this post: http://ift.tt/1oCCedq




Aucun commentaire:

Enregistrer un commentaire