Kelly criterion with more than two outcomes

I want to calculate the Kelly bet for an event with more than two possible outcomes. Suppose the following game:

A jar contains $10$ jelly beans. There are $7$ black jelly beans, $2$ blue jelly beans, and $1$ red jelly bean. The player wagers $x$ and grabs a single jelly bean randomly from the bag. The payouts are such:

• Black Jelly Bean: no payout (i.e. simply lose wager amount $x$)
• Blue Jelly Bean: net odds received on the wager = $10$
• Red Jelly Bean: net odds received on the wager = $30$

In essence the only way to lose the bet is to grab a black jelly bean (i.e. $q = 0.7$). But the net odds received on the wager is still dependent on whether the player grabs a blue ($b = 10$) or red ($b = 30$) jelly bean.

How would I calculate the Kelly bet for this game?

Is it correct to simply calculate the Kelly bet for each positive outcome and then find the weighted average for the final wager? For example:

$$x_b = \frac{10\times0.2 - 0.8}{10} = 0.12$$

$$x_r = \frac{30\times0.1 - 0.9}{30} = 0.07$$

$$x = \frac{0.12\times0.2 + 0.07\times0.1}{0.2 + 0.1} \approx 0.103$$

So the amount to wager would be 10.3% of the bankroll.

Or should I have instead found the weighted average of the net odds received on the wager and then calculated the Kelly bet based on the winning outcomes as a whole (i.e. $p = 0.1 + 0.2 = 0.3$)? For example:

$$b = \frac{10\times0.2 + 30\times0.1}{0.2 + 0.1} \approx 16.7$$

$$x = \frac{16.7\times0.3 - 0.7}{16.7} \approx 0.258$$

So the amount to wager would be 25.8% of the bankroll.

• Im confused about the options you have to actually make a bet? Are you being offered a simple win-lose bet? ie. If you pick either a blue or a red bean you win; if you pick a black bean, you lose (a binary choice yes/no bet)? OR Can you make individual bets on each possible outcome (multiple choice bet)? – Toby Booth Jan 23 '15 at 15:30
• @TobyBooth In this particular example, a single bet amount is wagered, and the payout is determined by the outcome. Using your terminology, this would be an example of a "binary choice yes/no bet" rather than a "multiple choice bet." – Vilhelm Gray Jan 23 '15 at 17:08
• Would this be offered to you as an odd? Ie. In this example, the combination of the two odds, equating to ~6.5-1 to pick Red or Blue (Very favourable!). – Toby Booth Jan 23 '15 at 17:26
• @TobyBooth You may be able to model this example as an equivalent binary outcome bet with the respective win/loss outcome odds respectively combined, but I'm unsure of the proper mathematical way to achieve this. I recommend opening a dedicated question here on the site as this would be an interesting problem to consider. – Vilhelm Gray Jan 23 '15 at 20:31

Return to the derivation of the Kelly criterion: Suppose you have $n$ outcomes, which happen with probabilities $p_1$, $p_2$, ..., $p_n$. If outcome $i$ happens, you multiply your bet by $b_i$ (and get back the original bet as well). So for you, $(p_1, p_2, p_3) = (0.7, 0.2, 0.1)$ and $(b_1, b_2, b_3) = (-1, 10, 30)$.

If you have $M$ dollars and bet $xM$ dollars, then the expected value of the log of your bankroll at the next step is $$\sum p_i \log((1-x) M + x M + b_i x M) = \sum p_i \log (1+b_i x) + \log M.$$ You want to maximize $\sum p_i \log(1+b_i x)$. (See most discussions of the Kelly criterion for why this is the right thing to maximize, for example, this one.)

So we want $$\frac{d}{dx} \sum p_i \log(1+b_i x) =0$$ or $$\sum \frac{p_i b_i}{1+b_i x} =0.$$

I don't see a simple formula for the root of this equation, but any computer algebra system will get you a good numeric answer. In your example, we want to maximize $$f(x) = 0.7 \log(1-x) + 0.2 \log(1+10 x) + 0.1 \log (1+30 x)$$ I get that the optimum occurs at $x=0.248$, with $f(0.248) = 0.263$. In other words, if you bet a little under a quarter of your bankroll, you should expect your bankroll to grow on average by $e^{0.263} = 1.30$ for every bet.

• This assumes there is only a binary choice about whether to bet or not, yet there are net odds offered for each outcome. This size of wager is fine if the choice is binary, but what if there are multiple choices where a player might have a positve edge on each choice? Do those outcomes need to be distilled into a single optimal bet on one outcome, or can multiple differently sized bets be made on the differing options? – Toby Booth Jan 23 '15 at 15:37
• @TobyBooth Then you have a multivariate optimization problem, of how much to place on each bet. The function you are optimizing is still concave, so there is still a unique optimum. Unless there is a trick I'm not seeing; I imagine the best thing to do is to put it into a computer. – David E Speyer Jan 23 '15 at 15:56
• I'm trying to resolve whether multiple bets of differing sizes, odds, & positive expected value edges per selection, would lead to over-staking & ruin with mutually exclusive (ME) outcomes. Eg. One bet is 50-1 (5% edge), another is 10-1 (10% edge)(ME within same market) leading me to bet on both. During a long losing streak, will the larger bets I make on the higher probability option be ruinous regarding the lower probability option? My intuition says it wont, but im checking ;) Im using this calculator to compute my outcomes. – Toby Booth Jan 23 '15 at 16:21
• @TobyBooth This sounds like it could make a good question to ask here, given a bit more explanation and a little less jargon. – David E Speyer Jan 23 '15 at 18:05
• @DavidSpeyer How would you find out what the percentage increase to your bankroll is per bet on average? does that 1.30 mean 1.3% bankroll increase? – Jack Fraser Aug 1 '15 at 15:54

David Speyer provided an outstanding response that really helped me out during a project, and I thought as a thank you I would provide the code I generated using his approach. Included in the code is a method to solve for the correct percentage using Newton's method and it is very fast. It is coded in MATLAB, and while currently formatted as a script, commenting out the definition of matCurr (which uses the values defined for this question) and uncommenting the function definition will have it operate as a function. Also commented out at the bottom is the ability to plot the ln(growth) in terms of the percentage wagered, as David also demonstrated above:

% function valPercent = funcKellyCriterionThroughNewton(matCurr)
% Peirano, Daniel
% djpeirano@gmail.com

% This function will get argument matCurr as defined in
% scriptOptimalTourney so that the first column defines b and the second
% column defines p.  Using the equation defined at
% http://math.stackexchange.com/questions/662104/kelly-criterion-with-more-than-two-outcomes
% combined with Newton's approach, an attempt will be made to solve for 0
% which should be the location of the maximum pay out.

% Checks for sum of percent greater than 1, and if the matrix isn't
% profitable will also be done.

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % Debugging
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% clearvars -except matCurr

matCurr = [-1, .7; 10, .2; 30, .1];

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Constants
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
valThreshold = 0.000001;
valInitialValue = 0.25;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Code
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Normalize the percentage to 1
if sum(matCurr(:,2)) ~= 1
matCurr(:,2) = matCurr(:,2) / sum(matCurr(:,2));
end

% Check if the matrix is even profitable
if sum(prod(matCurr, 2)) <= 0
valPercent = 0;
return
end

valPast = 0;
valNext = valInitialValue;
%[b p]
b = matCurr(:,1);
p = matCurr(:,2);

boolBump = 0;
while abs(valPast-valNext) > valThreshold
valPast = valNext;

valNumerator = sum(p.*b./(1+b*valPast));
valDenominator = sum(-b.^2.*p./(1+b*valPast).^2);

valNext = valPast - valNumerator/valDenominator;

if valNext < 0 && ~boolBump     %Only bump it once
valNext = 0;
boolBump = 1;
end
end

valPercent = valNext;

% x=linspace(0,1,1000);
% y=zeros(size(x));
% for i=1:length(x)
%     y(i) = sum(p.*log(1+b.*x(i)));
% end
%
% plot(x,y)


If $\sum_{i=1}^{n} p_ib_i$ is sufficiently close to zero, then a good approximation to the solution $x$ of the equation $\sum_{i=1}^{n}p_ib_i/(1+xb_i)$ is given by the ratio of the expected advantage and the variance of the advantage. That is, $x$ is approximately given by $\sum_{i=1}^{n}p_ib_i$ divided by the difference of $\sum_{i=1}^{n}p_ib_i^2$ and $(\sum_{i=1}^{n}p_ib_i)^2$. However, the condition is not satisfied in this specific example.

• Would you mind giving a derivation of and even better an error bound on your approximation? – Hans Jul 13 '15 at 6:09