I'm writing a video poker simulator and I am trying to verify it is working correctly by looking at the results. To understand the operation, it works as follows:
- Generate a random hand
- Apply a strategy to the hand to determine the cards to discard
- Discard those cards and get new random cards from the remaining deck
- Determine if the resulting hand gets any payout and, if so, add it to the results
Long story short, when I'm doing this I find that even when I do a large number of trials (400m) my payout percentage is about 0.1% lower than it should be. I should be getting around 99.54% but I'm actually getting around 99.44%.
What I'd like to know is, given N hands, how can I determine the likelihood of being off X% if I know the expected variance of the game? Here are relevant statistics on the game.
As you can see, that page shows the probability of each hand occurring when using proper strategy, how many hands (on average) it will take for the hand to occur, as well as the variance. It also sums up everything so there's an overall variance for the game. What/how can I use this in conjunction with my program results to help verify correctness? If necessary my program can also produce statistics about how often those hands were hit in the simulation to match up with the probability column.
Thanks!