Open Side Menu Go to the Top
Register
The Official Math/Physics/Whatever Homework questions thread The Official Math/Physics/Whatever Homework questions thread

03-01-2012 , 11:00 AM
Not really HW question but some thoughts I was having that i posted in my PCG thread that I thought someone here might be able to add some input to:

I've actually wanted to try to find an approximate kelly BR for sometime now. Currently it only works for coin toss type games, where you make a 2 degree based on the odds then solve for optimal bets. I think if I get a decent idea of the skewed normal curve my results lie on and come up with a ~200 (1 degree per bb, per bb between -100 and 100) degree polynomial to approximate it then use that to solve for a kelly optimal bankroll. Each degree would correspond to a different outcome (win 89 bb, loss 77 bb, ect and the associated probablity). Will prolly run into converence and computational issues if I try.
The Official Math/Physics/Whatever Homework questions thread Quote
03-01-2012 , 04:10 PM
Comstizzle I'm pretty sure you can use kelly with more complex outcome distributions (Mathsmatics of Poker details a way of risk-adjusting the value of two games and finding the 'bankroll cutoff' iirc)

Also non-HW
I'm trying to follow the solvabillity of complex polynomials of degrees <5 using groups and I can't see character tables, I can't find an explanation I can understand.

The first example I stumbled across is 1.18 in this pdf I don't get how they come up with the character table. I can see from the cubic example that the entries all cube to 1 (and obv 1 and -1 square to 1) but there's obviously something else going on. It's not at all obvious to me what it is
The Official Math/Physics/Whatever Homework questions thread Quote
03-01-2012 , 04:22 PM
Yeh did some research and it turns out u need to solve the equation

0 = E((1-X)/(p(X-1)+1) where p is the faction of our bankroll that a big blind is and X is the distribution of big blind winning per hand.

Having a hard time figuring out a closed form solution tho.

So again, it seems this may run into numerical issue in computation, but I'm sure there has to be a closed form.

This assumes log is our utility function, which i think is pretty reasonable.
The Official Math/Physics/Whatever Homework questions thread Quote
03-01-2012 , 05:06 PM
afaik log is standard for full Kelly betting but I'm not an expert.
From MoP:
For each game we have a distribution of outcomes X (with outcomes x I guess)
Our change in Kelly utility (call it U)= <ln (B + x)> - ln B (the change in Kelly utility from playing is the expected value of the Kelly utility after playing the game minus the Kelly utility before playing it)
Factorise to U=<ln(1+x/B)>
Then they Taylor expand it, ditch all terms after the second and get to
U kindofequals <x/B - (x^2)/2B^2>

fwiw
The Official Math/Physics/Whatever Homework questions thread Quote
03-01-2012 , 07:57 PM
Comstizzle, a few years ago, Xhad posted something about Bankroll Requirements from a Kelly Criterion standpoint in the Micro LHE forums here if you're interested.

In any case, it's as you and sputum say (and from MoP):



where:

subscript one characters are higher limit standard deviation / expectations
subscript two characters are lower limit standard deviation / expectations
The Official Math/Physics/Whatever Homework questions thread Quote
03-02-2012 , 12:45 AM
^^this assumes a standard normal distribution of winrate i believe. from empirical evidence i notice a tri-modal type distribution and the tails affect BR alot

what are the steps involved in deriving the final answer?
The Official Math/Physics/Whatever Homework questions thread Quote
03-02-2012 , 06:19 AM
Yes they assume a normal distribution for the two games in question to derive the formula.
Nothing to stop you using any distributions you fancy though. Rack up the outcomes and their probabilities and throw bankrolls through them a few million times.
Hell, if I had a big enough HH database I'd experiment with pulling my outcomes directly from that rather than a distribution trying to mimic it
The Official Math/Physics/Whatever Homework questions thread Quote
03-02-2012 , 04:13 PM
This isn't homework but I didn't want to make a whole thread about it. Say a mob in an online game drops a specific item 2% of the time. I know that I would need to kill 35 of them to have at least a 50% chance of looting an item (1 - .98^35 = ~50.7%) but does that take into account the chances I could get 2 or more of them or is it the chance that I would get exactly 1?
The Official Math/Physics/Whatever Homework questions thread Quote
03-02-2012 , 04:28 PM
.98 ^ 35 is the odds that, having killed 35 of them, you still don't have the item. So 1 - .98^35 is the odds that, having killed 35 of them, you do have the item, regardless of how many you've collected.
The Official Math/Physics/Whatever Homework questions thread Quote
03-02-2012 , 05:01 PM
Is there an equation to figure out the chances I'd have EXACTLY 1, or 2, 3, etc. of the item after 35 kills?
The Official Math/Physics/Whatever Homework questions thread Quote
03-02-2012 , 05:39 PM
If you know the formula for 1 or more, can you figure out a formula for 2 or more?

Then it's a simple subtraction to find the probability of exactly 1.
The Official Math/Physics/Whatever Homework questions thread Quote
03-02-2012 , 05:39 PM
Quote:
Originally Posted by LondonBroil
Is there an equation to figure out the chances I'd have EXACTLY 1, or 2, 3, etc. of the item after 35 kills?
yeah sure:

The probability you'll have k items after N kills is:
C(N,k) * (0.98 ^ (N-k)) * (0.02 ^ k)

---------

The idea is, what's the odds that the first guy gives you an item, but the next 34 dont?
.02 * .98^34

What about the odds the 2nd guy but no others give you an item?
.98 * .02 * .98^33 (= .02 * .98^34, same odds as 1st guy but no others giving you one)

So in all, we add these to get 35 (ways to choose which 1 guy gives you the item) * .02 * .98^34

So for k items, we choose the k guys to give us the item (C(N,k)) and multiply by .02^k (the prob that those k guys give you the item) * (.98^(N-k)) [prob that those N-k guys dont give you the item]
The Official Math/Physics/Whatever Homework questions thread Quote
03-02-2012 , 05:42 PM
Duh, thanks. It's been a dozen years since my stat class.
The Official Math/Physics/Whatever Homework questions thread Quote
03-03-2012 , 03:44 PM
This isn't a HW question but a possible scenario in concrete design that I was curious on.



KNOWNS: Length A, Length B, Length C, angle of C = 45 degrees.

UNKNOWNS: Length D, Angle of D (which would give corresponding values for E, F)

Background: Rectangle A-B is a column on the edge of a slab. The crack takes the shortest possible distance (D), at offset C at an angle of 45 degrees from the edge of the column.

So basically the goal is to minimize D (it must touch 3 points: end of C, and the two edges) and then find the corresponding angle of the line D - just to determine lengths of lines (E, F).

Last edited by beansroast01; 03-03-2012 at 04:04 PM.
The Official Math/Physics/Whatever Homework questions thread Quote
03-03-2012 , 05:37 PM
whats the ratio of A:B?

And just to clarify we are pivoting line D on point C to minimize distance of line FDE, correct?
The Official Math/Physics/Whatever Homework questions thread Quote
03-03-2012 , 06:48 PM
Ratio of A:B does not matter. The point is that he wants the answer in terms of A,B,C, and the 45 degrees given. Which should definitely be possible given all that information. And yes about minimising D... it is obvious
The Official Math/Physics/Whatever Homework questions thread Quote
03-03-2012 , 08:13 PM
Okay so the point where C joins D (the end of C) depends on lengths A,B,C and the 45 degrees. This is the only point of interest.

Set the x and y coordinates so that the origin is the top-left corner of the rectangle, and x is positive upwards and y is positive right (in conjunction with your diagram). The point joining C and D has coordinate P = ( A + (1/sqrt(2))C, -B - (1/sqrt(2))C ) because sin45 and cos45 = 1/sqrt(2).

A line through the point P with varying gradient m has equation:

y - (-B - (1/sqrt(2))C) = m(x - (A + (1/sqrt(2))C)), or in terms of y,

y = m(x - (A + (1/sqrt(2))C)) - (B + (1/sqrt(2))C).

This line D crosses the x-axis when y=0, i.e. when x = (A + (1/sqrt(2))C) + (B + (1/sqrt(2))C)/m. This point is the end of E.

Similarly, the line D crosses the y-axis when x=0, i.e. when y = - (B + (1/sqrt(2))C) - m(A + (1/sqrt(2))C). This point is the end of F.

From now on let a = (A + (1/sqrt(2))C) and let b = (B + (1/sqrt(2))C) (both are constants).

The length of D is thus ((OE)^2 + (OF)^2)^1/2 = ((a + b/m)^2 + (b + ma)^2)^1/2 = (1/m^2)(b+ma)^2 + (b+ma)^2)^1/2 = [ (1+ 1/m^2)^1/2](b+ma) = g(m), where g is a function of m.

We need to minimise the function g w.r.t. the gradient m.

g'(m) = -(1/m^3)((1+1/m^2)^-1/2)(b+ma) + a(1+1/m^2)^1/2

This equals 0 only if m = (b/a)^1/3.

Check: if B = A then b = a and so m = 1 which makes sense because of symmetry. I'm convinced enough that this is right... so let's work out the length of D.

Recall that D crosses the x-axis when x = a + b/m, and D crosses the y-axis when y = -b -a/m.

We are interested in m = (b/a)^1/3 which gives an x-value of [a(a^2+b^2)]^1/3 where D crosses the x-axis. It gives a y-value of -[(b^-1)(b^4+a^4)]^1/3 where D crosses the y-axis. The minimum D in terms of a and b is thus

{[a(a^2+b^2)]^2/3 + [(b^-1)(b^4+a^4)]^2/3}^1/2 which I don't know if it can be simplified, but whatever.

Substituting in the equations for A and B, we get

D = {[(A + (1/sqrt(2))C)((A + (1/sqrt(2))C)^2+(B + (1/sqrt(2))C)^2)]^2/3 + [((B + (1/sqrt(2))C)^-1)((B + (1/sqrt(2))C)^4+(A + (1/sqrt(2))C)^4)]^2/3}^1/2

which I don't doubt can be simplified, but I cba.

The question is much easier to answer and more accurate (to measure OP etc) irl if you ignore the rectangle altogether.

You don't need the angle but the value of E is [(A + (1/sqrt(2))C)((A + (1/sqrt(2))C)^2+(B + (1/sqrt(2))C)^2)]^1/3 and the value of F is [((B + (1/sqrt(2))C)^-1)((B + (1/sqrt(2))C)^4+(A + (1/sqrt(2))C)^4)]^1/3

fml
The Official Math/Physics/Whatever Homework questions thread Quote
03-03-2012 , 08:30 PM
Holy ****. Hmm, so I was playing around in MS Word creating the lines and stuff earlier for A = 35, B = 15, C = 8.5. And when I was manually creating line D just by eyeballing it and was getting a value less than 100". The equation just gave me 147. Maybe I am transcribing it wrong, here is what I put in MATLAB.

X = (A+(1/sqrt(2))*C )*(A+(1/sqrt(2))*C)^2+(B+(1/sqrt(2))*C)^2)^(2/3)
Y = (((B + (1/sqrt(2))*C)^-1)*((B + (1/sqrt(2))*C)^4)+(A + (1/sqrt(2))*C)^4)^(2/3)
D = (X+Y)^.5

Last edited by beansroast01; 03-03-2012 at 08:51 PM.
The Official Math/Physics/Whatever Homework questions thread Quote
03-03-2012 , 09:01 PM
My equation at the end is probably wrong because I am amazing at screwing up long calculations.

For excel/word it is easier to use:

a = (A + (1/sqrt(2))C)

b = (B + (1/sqrt(2))C)

m = (b/a)^1/3

X = a + b/m

Y = b + ma
The Official Math/Physics/Whatever Homework questions thread Quote
03-03-2012 , 09:18 PM
A =35; B = 15; C = 8.5

a = (A + (1/sqrt(2))*C) = 41.0
b = (B + (1/sqrt(2))*C) = 21.0
m = (b/a)^(1/3) = 0.171
X = a + (b/m) = 164.0
Y = b + m*a = 28.0
D = (X+Y)^0.5 = 13.89 ??? :P
The Official Math/Physics/Whatever Homework questions thread Quote
03-03-2012 , 09:22 PM
Surely that should be X^2 + Y^2, not just X + Y ??

Edit: still to the power of 1/2

Edit: in which case my formula you tried the 1st time might be right. But still this way is easier
The Official Math/Physics/Whatever Homework questions thread Quote
03-03-2012 , 09:39 PM
I must be getting confused with what you gave me as X and Y then in the last post.

I read your long equation as {[X] + [Y]}^(1/2)

Where X = [(A + (1/sqrt(2))C)((A + (1/sqrt(2))C)^2+(B + (1/sqrt(2))C)^2)]^2/3

and Y = [((B + (1/sqrt(2))C)^-1)((B + (1/sqrt(2))C)^4+(A + (1/sqrt(2))C)^4)]^2/3
The Official Math/Physics/Whatever Homework questions thread Quote
03-03-2012 , 09:44 PM
no you don't want (X + Y)^1/2.

You want (X^2 + Y^2)^1/2

We're simply using Pythagoras' Theorem here on E,F, and D.

Edit: ah I see. I think those values you have for X and Y are for X^2 and Y^2 (but not certain). Anyway we can ignore my long equation from now on... it is not necessary to use.

It's simpler if we ignore the long equations and use the method you did in your last post. Once you have X and Y then D = (X^2 + Y^2)^1/2
The Official Math/Physics/Whatever Homework questions thread Quote
03-03-2012 , 09:48 PM
Quote:
Originally Posted by imjoshsizemore
A =35; B = 15; C = 8.5

a = (A + (1/sqrt(2))*C) = 41.0
b = (B + (1/sqrt(2))*C) = 21.0
m = (b/a)^(1/3) = 0.171
X = a + (b/m) = 164.0
Y = b + m*a = 28.0
D = (X+Y)^0.5 = 13.89 ??? :P
Is all correct apart from the D = ...

it should be

D = (X^2+Y^2)^0.5 = ...
The Official Math/Physics/Whatever Homework questions thread Quote
03-03-2012 , 10:21 PM
OH ok. I see now. I didn't realize that your equation for F was the pythagorean theorem, and that my X and Y were the true values for E and F. I'm slow but I get there.

Still however, the results doesn't make sense to me.

D = 164 and E is only 28?

Here is the representation of that result to scale in MS Word.


10 units = 1 inch.

It actually works out (the line crosses through the point at the tip of C and barely touches the top two edges). But that is definitely not the shortest possible line. I feel like the correct shortest line would be one such that area H = area J as defined in my new figure. This is just based on looking at the original figure in post 2589, which is also to scale.

So the equation is correctly solving the problem of making a line go through those 3 points (end of E, end of F, end of C). But it is not optimizing it for the shortest line.

I also feel like the slope of the line is going to be proportional to A + xC and B + yC where x and y are values I'm not sure on.

When I first looked at this problem I thought E would be something like A*2 + C and F would be like B*2 + C. It does come pretty close to that, but I don't think that is the right answer. In post 2589 I think E is ~ A*2 + 1.5C and F is ~ B*2 +1.5C

UPDATE: Through inspection, I think I may have figured it out!

E = 2A + sqrt(2)*C
F = 2B + sqrt(2)*C

Here is the resulting to-scale picture using those values.

A = 35;
B = 15;
C = 8.5
E = 82.02
F = 42.02
D = 92.16



This seems like a good result... just have no idea how to prove if it is the correct answer.

Last edited by beansroast01; 03-03-2012 at 10:33 PM.
The Official Math/Physics/Whatever Homework questions thread Quote

      
m