From: jacobs@cs.utah.edu (Steven R Jacobs)
Subject: Re: BJ strategy diff. (need help on  h,dd,s)
In-reply-to: breid@pyrhard2.eng.pyramid.com's message of 21 Jul 92 16:05:23 GMT
Organization: University of Utah CS Dept
	<JACOBS.92Jul18101647@cells.cs.utah.edu> <182725@pyramid.pyramid.com>
Date: 22 Jul 92 14:03:07

In article <182725@pyramid.pyramid.com> breid@pyrhard2.eng.pyramid.com (Bill Reid) writes:
>In article <JACOBS.92Jul18101647@cells.cs.utah.edu> jacobs@cs.utah.edu (Steven R Jacobs) writes:
>
> I'm confused (pause for oh-so-witty comeback)
>>
>>                         distribution of outcome
>>                        --------------------------  
>>    play    value       -2    -1     0    +1    +2
>>----------------------------------------------------
>>   double:  0.482626   .345        .069        .586
>>    stand:  0.482354         .204  .110   .686
>>
>>If you double down, you expect to win 58.6% of the time and lose 34.5% of
>>the time.  If you stand, you win about 10% more often (68.6% of the time)
>>and lose about 14% less often (20.4% of the time).  This tradeoff almost
>>exactly balances out the expectation for these two options.
>>
>>Let's see how Kelly would bet on these two plays, if adjusting the bet
>>size were allowed.  Note that the expectations here are very large, so
>>we cannot use the "bet proportionally to expectation" rule to get an
>>accurate answer, because that rule is an approximation that only applies
>>when your advantage is small.
>>
>>First, lets find the optimal bet size for doubling down.  The log
>>utility for betting a fraction 'b' of the total bankroll is:
>>
>>   U(b) = .586*log(1 + 2b) + .345*log(1 - 2b)
>      ^                 ^^                 ^^
> What is b?  Is b our bet size, bankroll, or Kelly fraction (I guess 
> U(b) is our Kelly fraction, as in f(b)?)?

Read the line above the equation.  See where it says "betting a
fraction 'b' of the total bankroll"?  That means "b is the fraction
of bankroll that you are betting".  It isn't necessarily the fraction
that Kelly says is optimal.  This equation tells you the utility
as a function of 'b', thus U(b).

If you double down and draw exactly one more card, the you have a
58.6% chance of winning two bets and a 34.5% chance of losing two
bets.  The 'b' is the _initial_ bet size.

> And why are 
> we doubling it?  Because we are doubling the bet?  Isn't that begging 
> the question?  Aren't we trying to find the optimal size to bet on the 
> expectation and variance of "A8 v 6 with one more card"? How can we 
> do that if we have already arbitrarily doubled our a) bankroll b) bet 
> size c) Kelly fraction d) whatever b is supposed to be (do-be-do-wah)? 

We are doubling because we want to find the utility for doubling down.
When you double, the only possible outcomes are "win 2 bets", "push",
and "lose 2 bets".

>>The coefficients of .586 and .345 are the probabilities of winning or
>>losing two bets in this situation.  The maximum can be found by taking
>>the derivative of this equation and setting dU/db = 0.
>>
> We'll take your word for it, as the rules of derivations in calculus is 
> the kind of grunt work I leave for the hoi polloi to soil their hands 
> with.  

Typical smug elitist comment, but I'll try to ignore it for now.  I
suspect that almost all of the readers who remember their calculus
have followed what I'm doing.  Simple optimization, maximum utility
can be found by setting the derivative equal to zero.  If I had screwed
this up, I'm sure Michael would have nailed me for it.

>>>      2(.586)/(1+2b) -2(.345)/(1-2b) = 0
>>>   => 1.172*(1-2b) = .690(1+2b)
>>>   => (1.172 - .690) = 2*(1.172 + .690)*b
>>>   => 0.482 = 3.724b
>>>   => b = .1294
>	 ^   ^^^^^
> Ah, so b IS the Kelly fraction, not f(b), or U(b)?

The bet fraction that optimizes this utility function is .1294.  You
might call that particular value of 'b' the "Kelly fraction", as that
is the fraction that Kelly would recommend in order to maximize bankroll
growth rate.

>>So, Kelly says to bet 12.9% of your bankroll if you are allowed to
>>double down.  Not quite the 18% that Bill claimed, but still a pretty
>>good chunk of the bankroll.  
>
> Now is that the doubled amount, or the undoubled amount?  I really AM 
> confused here.

The 12.9% is the original bet size, doubling gives 25.8% of total
bankroll at risk.  You are right, I didn't make this as clear as
I should have.

> If we have 6.45% of our bankroll out, do we  
> acheive perfect log utility by doubling it, or are you saying that 
> we should double 12.9% to 25.8%?  Please clarify.  Who gave you 
> permission to do this?

Permission?  I don't need no steenking permission....

>>Now let's see what Kelly would say about
>>standing with these cards.  The utility equation in this case is:
>>
>>   U(b) = .686*log(1 + b) + .204*log(1 - b)
>       ^^^                 ^                 ^
> Okay, here we are looking at solving the Kelly fraction U(b) (f(b)?) for 
> the expectation and variance of "A8 vs 6, no cards taken".

U(b) is the _utility_ for bet size 'b'.

> And although 
> in this case we have not doubled our b, we seem to be solving for 
> b (bankroll unity?) or b (bet size) or wwwwwwhat?  Are you saying 
> f(b)=b above, then solving for b, or have I been exposed to too much 
> EMF here?

I'm not qualified to speculate on what harmful influences you've been
exposed to.

>>  dU/db = .686/(1+b) - .204/(1-b)
>	            ^Kelly?      ^Kelly?
>>
>>   =>  .686*(1-b) = .204*(1+b)
>>   =>  (.686 - .204) = (.686 + .204)*b
>>   =>  .482 = .890b
>>   =>  b = .5416
>        ^   ^^^^^Yeah its Kelly allright, so 
>		    f(.5416)=.686*log(1+.5416)+.204*log(1-.5416)
>		    spurk-sparkle-spuzz-spatter-sbam-sputtttttttttth! 

Actually, you've (quite accidently) made a valid point here.  The
optimal bet size should be plugged into the equations to find out
what the actual utility is each case, and the "best" bet chosen by
taking the option which gives the most utility.

So, utility if we choose the "double down" game (with bet sizes
that are optimal for doubling):

   U(.129) = .586*log(1 + .258) + .345*log(1 - .258) = 0.03155

and the utility if we choose the "stand" game (with bet sizes
that are optimal for standing):

   U(.5416)= .686*log(1+.5416) + .204*log(1-.5416) = 0.1378

So, we get much more utility by standing instead of doubling, even
if we have the luxury of changing the bet size in each case.

>>So, Kelly says to bet over 54% of your bankroll in this case.  
>
> So KELLY gave you permission.  I should take this up with him.

We will expect a full report.

>>This
>>is a little over 4 times as much as Kelly would say to bet on doubling
>>down.  Since the expectation in about the same in both cases, a Kelly
>>bettor will make 4 times as much money by ignoring basic strategy
>>and standing instead of doubling down.  
>
> How does this follow?  I thought the precise Kelly fraction would yield 
> the log optimal bankroll growth, and that any other bet would yield 
> less utility.

You're right.  Now look at the utility for the two cases, as computed
above.  You still get more than 4X the utility from standing as you
get from doubling.

> Did Kelly give you permission to make the giant leap of 
> logic and math and say that if the Kelly fraction is lower for one 
> bet over another, we just divide the two fractions and claim that as 
> our relative utility?  Prove this mathematically.

You're right, it is the utilities that should be compared rather
than the optimal bet fractions.

>>This would seem to imply
>>rather strongly that standing is a _much_ better play, at least for
>>*some* bet sizes.
>>
> For the bet sizes (b) above, which is also the bankroll size (even though 
> we double it arbitrarily, so now we have TWO bankrolls), 
> which is also the Kelly bankroll fraction, all at 
> the same time.  It is also true in flatland, I hear.

Sigh.  You've accidently found some problems in my derivation, but
don't get (more) cocky (than you already are).  It is clear to me
that you'd never _really_ know that you'd found a problem unless
I helped point it out for you.

>>OK, we aren't generally allowed to see in advance which cards will
>>be dealt to us, so we have to make bets that are much smaller than
>>54% of the bankroll.  
>
> We are also making bets smaller than 12.9% if we use log optimal betting 
> before we begin to play.  In fact, with Basic Strategy, we are making bets 
> around 0.042% (roughly 0.0006 = 1.4b, as above, feel free to correct).

Where do you get this from?  If you are only betting .042% of your bankroll,
then you have a bankroll of 2380 bets.  Lucky you.

> So 
> if 12.9% is our riskless optimal bankroll growth log fraction for doubling, 
> how can be possibly be "going crazy" if we are using log optimal betting 
> rigorously throughout the game? 

That is the optimal bet size only if you somehow know in advance that you
will be dealt A8 vs. dealer's 6.  If you have such foresight, you would
be filthy rich and have little need to argue relentlessly in rec.gambling.

>>Let's say we've just bet 1% of our bankroll,
>>and see which of these play options will give us greater utility. 
>
> Oh yes, let's do.  This gets better all the time.  Watch the hands 
> carefully folks.  

Bill, have you ever noticed that NOBODY has backed you up on ANY of
your stupid claims?  Could this be because you aren't nearly so full
of understanding and wisdom as you seem to think you are?

>>THAT is how you decide which play to make, if you want to optimize
>>utility (this applies to _any_ utility function, not just log).
>>

> So THAT'S how you do it!!!!

I haven't seen any suggestions from you on this matter.  How would
YOU do it, all knowing one?  Can't you please condescend to help us
poor pitiful and struggling gamblers?

You either don't really know what you are talking about, or are too
selfish to share your knowledge with us.  Which one is it?

>>For doubling:
>>
>>   U(b) = .586*log(1 + 2b) + .345*log(1 - 2b)
>	 ^Kelly right?     ^^Kelly*2 right?   ^^Kelly*2 right?

Sorry, this isn't a math class.  If you can't follow what I've done
here, and can't find any hoi polloi to help you keep your hands clean,
then I guess you are just SOL.  (Anyone else who would like some help
getting through this, feel free to email me).

U(b) is the utility for any bet fraction 'b' that you wish to provide.
I think a _careful_ reading of my post made this reasonably clear.
If you plot this utility as a function of 'b', and plot the utility
for standing as a function of 'b', it will be clear when standing
is the better option.  You will also see the peaks in the "doubling"
and "standing" curves that correspond the the bet sizes that Kelly
would say to use if you have a perfect view into the future.

>>
>>so
>>
>>   U(.01) = .586*log(1.02) + .345*log(0.98) = 0.00463
>      ^^^NOT KELLY!!! ^^^^OH NO!!!!    ^^^^YIKES!!!!
>
> And with a hearty "PRESTO"!:

Bill, your arguments do little more than make you appear foolish.
My biggest mistake has been to reply to your pitiful arguments,
because when arguing with fools it is sometimes difficult to tell
the difference...

>>
>>For standing:
>>
>>   U(b) = .686*log(1 + b) + .204*log(1 - b)
       ^now bank frac    ^now bank frac    ^now bank frac

The 'b' parameter in ALL of the functions that I've shown is
the bet size in terms of a fraction of the bankroll.  If anyone
else thinks I've tried to be deceptive or pull a fast one here,
please let me know.

>>
>>so
>>
>>   U(.01) = .686*log(1.01) + .204*log(0.99) = 0.00478
>      ^^^             ^^^^             ^^^^    ^^^^^^^So the Kelly fraction
>							 of the bankroll 
>							 fraction which was 
>							 the Kelly fraction 
>							 of the bankroll unity 
>							 is now the bankroll 
>							 fraction of the 
>							 Kelly fraction, leading 
>							 us ineluctably to 
>							 the conclusion: 

If you bet 1% of your bankroll and the dealer deals you
A8 and deals him/herself a 6, the expected utility for doubling
is .00463 and the expected utility for standing is 0.00478.  You
get more utility from standing, so that is the correct decision.

If you cannot understand this reasoning, I doubt that there is
anyone in rec.gambling that can help you.  For the rest of us,
math is our friend, and it helps us to see the truth, and to
know who can back up their claims and who cannot.

>>So, standing will still give us more utility in this case, and
>>it is the better play.  
>
> NOW I UNDERSTAND!!! 
>
>>Note that it is only _slightly_ better,
>>but we knew it was somewhat borderline since the expectations
>>are so close for the two plays.  
>
> Gee, I wonder how close it would be if you didn't start off by doubling 
> our bankroll fraction/Kelly fraction/bet size/smoke and mirrors b in the 
> first place?

Does ANYBODY agree with Bill that I've used smoke and mirrors here?
Does ANYBODY doubt that Michael Hall would seize the opportunity to
kindly point out the error in my ways if I had done something suspicious
here?

If anybody agrees will Bill, I'd genuinely appreciate hearing about it
so that I can correct any mistakes I've made, or explain more carefully
these results.  Otherwise, I won't waste more time on Bill...

>>So, if you are a Kelly bettor, you need a
>>bankroll of more than 5000 units to ever make this play
>>profitable.
>>
> So, we can take a 500 unit bankroll, plug in an A8 v 6 as the hand, 
> fly through two multi-million hand simulations playing it out both 
> ways, and wind up with a higher ROI for not doubling?  Let's do it.

Go for it.  I'm sure you'll repeat your simulations until you find one
that supports your case, then claim that it _proves_ you are right.

>>I would encourage anyone who wishes to refute this argument to SHOW
>>where I have made a mistake in the numbers.  Replies of the form
>>"too much smoke, I'm right, please don't respond" just won't cut
>>it in a public forum.
>>
> I would encourage anyone who actually bought this analysis to seek 
> analysis.  

As usual, your entire argument has been mostly ad hominen attacks.
You certainly haven't supported your argument mathematically, and
any logic that has slipped in has been pretty weak.  This is the last
refuge of a desperate man.  Next, you'll attack my spelling and grammar.

>>Yes, you can learn from the net, but it helps to pay attention to what
>>is really being said.
>>
> Yes, indeedy.
>
> Oh, by the way, I LOVE double after splits, unlimited splitting, any 
> kind of unrestricted rules, just because it's a lot more fun to spread 
> out a whole bunch of bets on just one starting hand.  What's my optimal 
> strategy for THAT utility function?

Fine, double your little brains out.  Never mind, I see you already have...
--
Steve Jacobs  ({bellcore,hplabs,uunet}!utah-cs!jacobs, jacobs@cs.utah.edu)
"Never try to teach a pig to sing.  It wastes your time and annoys the pig."
Newsgroups: rec.gambling