p = 0.0 to 1.0 or the probability of winning.
q = 0.0 to 1.0 or the probability of loosing.

p + q = 1.0 or the probability of winning or loosing.

So, p = 1 - q and q = 1 -p.

there is nothing wrong with this that I can see.

On Jun 14, 8:54 pm, "Aaron S. Meurer" <[email protected]> wrote:
> First off,  p - q == p - (1 - p) == 2*p - 1. Second, b cancels in that 
> equation, giving you f == 2*p - 1, which should be a constant.  So maybe you 
> typed it wrong?
>
> To find the maximum, you should use derivatives.  
> Seehttp://en.wikipedia.org/wiki/Differential_calculus#Optimization.  The 
> maximum value of a differential function on an interval will occur either at 
> one of the end points of the interval or at a point where the derivative is 
> equal to 0.
>
> Aaron Meurer
> On Jun 14, 2010, at 4:35 PM, butch wrote:
>
> > Pot is $ in poker pot
>
> > minBet is minimum amount you must bet to play
>
> > pot odds are calculated by
> > b = Pot/minBet
>
> > p is the probability of winning a poker hand:
>
> > 0.0 <= p <= 1.0
>
> > q is the probability of loosing a poker hand:
>
> > q = 1.0 - p
>
> > f is the calculatedkellybet
>
> > f = ( b * (p-q)) / b
>
> > substituting b with Pot/minBet
>
> > f = ( (Pot/minBet) ( p - q )) / ( Pot/minBet)
>
> > Solve for max f such that
>
> > f >= minBet and,
> > f <= Pot
>
> > I did this with a loop incrementing the value for minBet until it was
> >> = (f + delta)
>
> > That calculated value of "f" is the max value meeting the constraints.
>
> > Anybody have a suggestion on how to solve this explicitly and not use
> > a loop?
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "sympy" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to 
> > [email protected].
> > For more options, visit this group 
> > athttp://groups.google.com/group/sympy?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to