Suppose you have a bet which loses money most of the time, but wins a massive amount now and then, how much money should you put on it?

Let’s say the 1 time you win, you win $a for each dollar you bet, and the N times you lose, you lose $b for each dollar you bet. By the Kelly criterion, the geometric average rate of gain if you bet of your wealth would be

Setting , you get

Suppose you are asked to flip a coin, and heads you win $3, and tails you lose $1—then , and therefore , i.e., you should bet 25% of your wealth.

If you have a lottery ticket that has a 1 out of 5,000 chance of winning $10,000 that costs $1, and you are only allowed to buy one number, then , and

and you should only bet 0.01% of your wealth at a time.

Conversely, if you were selling a lottery ticket that had 1 out of 10,000 chance of winning $5,000 that cost $1, , and and you should be trying to have about 0.01% of your wealth at stake.

**Related: **Do not play the lottery unless you are a millionaire