137k views
2 votes
Using monte carlo simulation, find how many hands need to be dealt in order to gain a hand of 3 of one card. for example your hand might 5 (clubs), 6(hearts) , 6(diamonds), 6(spades), queen(hearts). this hand has 3 of a kind( or 3 of the same number ) which is 6 in this case. do 1000 simulations and find the average number of hands that needed to be dealt before finding 3 of a kind. do not use arrays. you can poker hands and find the expected odds. it is likely your average will be lower than published averages..think of why that might be.

1 Answer

4 votes
To work this problem I simulated 70,000 poker hands and noted the ones that had 3 of a kind (including ones that were full house and 4 of a kind). I counted the number of hands between instances of this, and quit after I had counted 1000 instances. (There were generally more than 1000 instances in 70,000 hands.)

In 10 such simulations, the average number of hands that had to be dealt before 3 of the same kind were seen ranged from 40.507 to 46.064. The mean of those 10 simulations was 43.359.

The published numbers for frequency of occurrence of the hands of interest are
54,912 . . . . for 3 of a kind
3,744 . . . . . for full house
624 . . . . . . .for 4 of a kind
for a total of 59,280 out of 2,598,960 possible poker hands. Then you'd expect a hand containing 3 of the same number approximately one every 43.842 hands.

This number is pretty close to the simulated value.

_____
The problem isn't clear as to the number of cards that are dealt for one hand. If it is only 3, then the odds change somewhat, as do the simulation results. I used a 5-card hand for my simulation.
User Mohammed Mansoor
by
5.7k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.