# Simulating a poker win rate over time

Poker players start with a fixed bankroll (bankroll) and play with a win-rate winRate (say measured in dollars per hour) and standard deviation of win-rate (sd).

How can I use the Wolfram Language to graph/simulate a poker player starting with bankroll and playing for, say, 100 hours (t = 100)?

If the total winnings ever dip below bankroll, the simulation result should just be \$0 since the player has no ability to keep playing anymore!

• Look at RandomProcess, using WienerProcess. That should get you started. – ciao Nov 7 '19 at 1:49
• You may want to incorporate the Kelly criterion , which maximizes the expected value of the logarithm of wealth (the expectation value of a function is given by the sum, over all possible outcomes, of the probability of each particular outcome multiplied by the value of the function in the event of that outcome). – Jagra Nov 7 '19 at 12:12
• Applying the Kelly bet sizing methodology (a proportional bet, sized relative to bankroll, risk, and signal noise at each sequence of play) protects a player from their bankroll ever going to 0. – Jagra Nov 7 '19 at 15:00

ListPlot[
NestList[# RandomVariate[NormalDistribution[1.05, .1]] &, 100, 50],
Joined -> True,
AxesLabel -> {"Games played", "return (dollars)"}]


Or...

ListPlot[
Table[
NestList[# RandomVariate[NormalDistribution[1.05, .1]] &, 100, 50],
10],
Joined -> True,
AxesLabel -> {"Games played", "return (dollars)"}]


The bankroll constraint is easily incorporated:

ListPlot[
NestList[
If[# > 60, # RandomVariate[NormalDistribution[1.05, .1]], 0] &, 100,
50],
Joined -> True,
AxesLabel -> {"Games played", "return (dollars)"}]


Here the "bankroll constraint" is 60 (even though you start with 100). If your game ends if you ever go beneath your starting money, you will often stop fairly quickly.

• What has this to do with the poker, or the bankroll constraint? – wolfies Nov 10 '19 at 4:08