Before stating and proving the elegant theorem, let's have some preliminaries.

A set (*S*) of events is said to be "mutually exclusive and collectively
exhaustive" (MECE) if *exactly one* of the events will occur.
For example,
*S = { s _{1}, s_{2}, s_{3}, ... s_{33} }*
might be the set of possible answers to the question "Who will win next year's
Superbowl", and

Why do I show 33 possible outcomes when there are only 32 teams in
the NFL? Because to avoid confusion I want to ensure that
the probabilities sum to exactly 100.0%, not to 99.999999%.
Extra teams might be added between now and then; the NFL might go bankrupt;
whatever -- I'm leaving room for "s_{33} = 'None of the above'."

If you have a million dollars and Bill Gates offers to let you gamble on a fair coin toss where he's paying off 6-5, would you bet the whole million? Sure, 50% of the time you finish with $2.2 million, but the other 50% -- you'll be in the poorhouse begging for bread and water! Betting the whole million would maximize your expected winnings ($100,000) but would be very foolish.

Instead of maximizing expected bankroll it might be better to maximize its
expected logarithm. Or stated differently, rather than maximizing
the (weighted) arithmetic mean of your
resultant bankroll, you should maximize the (weighted) geometric mean (or,
equivalently, its power).
In our simple example, this is the same as maximizing
*E(b) = (1 - b)*(1 + 1.2b)*
where *b* is your bet-size in millions.
Set E'(b) = 0 to find the extremum. It's at b = 0.083333; you're
best off betting just $83,333. If you use Kelly's Criterion.
I won't try to explain or justify Kelly's Criterion which is named after
John Kelly (1923-1965), an associate of Claude Shannon. But I'll
rename it the Bernoulli-Kelly Criterion to emphasize that the
Criterion isn't really new -- Daniel Bernoulli had written on the
basic principle in the 18th century.

So we have a set S = {s_{1}, s_{2}, ... s_{33}}
of 33 MECE events and two
gamblers, Bill and Alice.
(s_{k} might be the event that some particular team wins the next
Superbowl; I think it would be more fun to bet on who will be
the Democratic nominee for President.)
Each of the gamblers assigns probabilities to the events.
To simplify and avoid quibbles we'll assume that Bill publishes the
33 probabilities (q_{k}) that he believes in and promises not to
change them. These 33 probabilities sum to 1 exactly.

Alice is welcome to study Bill's {q_{k}} and use his
expertise to help refine her own estimates, but let's assume she finishes
with estimates {p_{k}} that are different from Bill's
estimates {q_{k}}. Otherwise there'd be no interesting gambling
to happen.

Now Bill (who happens to be Bill Gates and is just having fun -- he knows
that Alice's winnings or losses will have no real effect on his fortune)
offers to sell tickets. If his q_{4} = 0.29 for example, he'll
sell Alice tickets on s_{4} at a price of $0.29.
The tickets will be worth $1 if s_{4} succeeds, zero otherwise.
Note that, since the {q_{k}} sum to one, these are fair bets;
there is no "vigorish." If Alice spends the portion q_{k}
of her bankroll on each of the s_{k} tickets, she will
be guaranteed to break exactly even at the end.

Alice can buy as many tickets as she likes, subject to only one constraint: She must pay cash; when she's out of money she must stop buying.

Assuming that she applies the Bernoulli-Kelly
Criterion and seeks to maximize the expected geometric mean of
her resultant bankroll, **How should Alice Bet?**

We'll assume that Alice's starting bankroll is 1 in some units,
e.g. $1 million. The solution will be Alice's 33 bets (or ticket purchases)
(b_{1}, b_{2}, ... b_{33}).
Her total bet is Σ b_{i}. Her bankroll after the winning
event is chosen (call it s_{w})
will be 1 - Σ b_{i} + b_{w}/q_{w}.
Alice believes that event will occur with probability p_{w}.

The amazing solution is that Alice's wagers should be exactly
b_{k} = p_{k} for each k. Note that the odds (q_{k})
that Bill is offering seem to be ignored in this solution!

There are other solutions that are just as good. A bet list of
(a·q_{k}) will break even on any result,
where a is any positive number, so Alice might choose to wager
*b _{k} = p_{k} - a·q_{k}*
on each of 32 events and wager
zero on event s

I'm not sure when and where this Theorem was first published: I'll call it Shearer's Wagering Theorem since James B. Shearer presented it as the IBM Ponder puzzle in January 2007.

From the preceding observation we
can arrange that Σ b_{i} = 1.
In this case observe that an optimal bet list will have
b_{k} > 0 whenever p_{k} > 0;
otherwise s_{k} would yield
a non-positive final bankroll, which would destroy our geometric mean!

Now, 1 - Σ b_{i} + b_{w}/q_{w} becomes
0 + b_{w}/q_{w}. The weighted mean of bankroll logarithms
over all possibilities is
Σ p_{i} log (b_{i}/q_{i}).
Finding the 33 optimal (b_{k}) requires setting
the 33 partial derivatives -- one for each b_{k} -- to zero.
As we've observed, there are infinitely many solutions of which
one satisfies Σ b_{i} = 1. Let's enforce that satisfaction,
which will allow an easy application of the Euler-Lagrange Theorem.

So, we find the partial derivative F_{k}
with respect to b_{k},
of Σ p_{i} log (b_{i}/q_{i}).
This is F_{k} = p_{k} / b_{k}.
(When you work the details you'll get q_{k} in both numerator
and denominator and they cancel.)
To this we'll add, in accordance with the Euler-Lagrange Theorem, the
partial derivative of Σ b_{i} -- just 1 --
times an "undetermined multiplier;" and find the extremum
by setting this sum (F_{k} + λ) to zero.
After rearrangement this is simply p_{k} = λ b_{k}.

λ is the same for all events, Σ p_{k} = 1 because
these are the probabilities of MECEs and
Σ b_{i} = 1 by the constraint we imposed above.
This means λ=1 and we're left with
b_{k} = p_{k} for all k.
Q.E.D.

Please send me some e-mail.