non-linear optimization payout matrix for pitcher vs batter

Discussion in 'Chit Chat' started by zedDoubleNaught, Jul 19, 2011.

  1. My wife has recently taken up watching baseball. I enjoy a good game, but every night, gets kind of repetitive. So I tried to liven it up by considering how to apply a lecture I saw on non-linear optimization for the pitcher vs the batter.
    (google search for "non-linear optimization video", chose the one that says lecture and Gilbert Strang, or link if it's ok to post: http://videolectures.net/mit18085f07_strang_lec32/)
    The lecture comes down to game theory, where 2 players can make 2 choices at once, and where their 2 choices match is the payout. It works out to a 2x2 matrix (hope this lines up):
    player A
    left..............right
    ......4......|......2.......up player B (this should be on the left, but on the right cuz easier to line up)
    ......1......|......7......down

    Ex, so, if A chooses "left", and B chooses "down", B has to pay out 1. If B thinks A will choose "right", B should choose "up", only pays out 2. Or if A thinks B will choose "up", A should choose "left", to get 4.
    Then, the game is, A and B choose randomly with a percentage split; A might choose "left" 20% of the time, and "right" 80% of the time, and B might choose "up" 65% of the time, and "down" 35% of the time. The expected payout becomes:
    [vector of A percentages]^-T * [payout matrix] * [vector of B percentages]
    (-T to transpose A's vector so the vectors and matrices can multiply together)

    I was trying to present this to my wife to help her understand the strategy between the pitcher and the batter: the pitcher can choose to throw the ball inside or outside the box, and the batter can choose to swing or not. The pitcher's strategy is to trick the batter -- throw a few balls in a row, so the batter is not expecting the good pitch and so does not swing and misses it; or, throw a good one, then an outside ball to get the batter to swing with a higher probability of missing it. The batter's strategy is not to swing at outside balls, so the pitcher has to get it closer inside, or to get a walk, or show he's not tricked; or swing to try to hit a good pitch.
    (In all truth, I don't know if this model is true, the most I ever played was in high school PE, on the nerd team)

    I was wondering what the payout matrix in this case would be. I suppose it would be "hit" vs "strike", or "base" vs "out". Is it possible to reduce the batter vs pitcher to a 2x2 matrix, or is it too simplified, requiring a couple more matrices?

    This is what I was thinking so far, but looks like it needs some work:

    pitcher
    throw in..........................throw out
    strike (-1) or hit (1)....|....strike (-1)....swing batter
    strike (-1).................|........ball (1)....hold

    I've used 1 and -1, they seemed useful to eventually get a numerical value for the payout. Must be wrong for "throw in" - "swing" -- surely a cell should not have 2 possibilities. Also, "throw out" - "swing" would have 2 possibilities, probably a strike but sometimes could be a hit.

    Any suggestions how this payout matrix should look? thanks
     
  2. MGJ

    MGJ

    Ted Williams ("the last man who ever hit .400") divided the strike zone into 77 regions (a 10 x 7 matrix) and assigned a different batting average to each region. See the images at

    http://blog.thebaseballzone.ca/Portals/18567/images/ted_williams_strike_zone-resized-600.jpg

    http://www.flickr.com/photos/marty/5285404941/

    You could generalize this by going OUTSIDE the strike zone as well, and assigning batting averages to various regions there, too. Batters do swing at balls outsize the zone (sometimes) and they do make hits (sometimes). Yogi Berra was called "The best bad ball hitter who ever lived" because he got so many base hits swinging at bad balls (non strikes). Here's an example http://www.baseball-fever.com/showthread.php?77341-Yogi-Berra-bad-ball-homer

    You would also want to build a probability matrix to account for the fact that pitchers don't have perfect control. (Proof: unintentional walks). Perhaps a conditional probability: P(ball ends up in region A | given that pitcher was trying to pitch to region B).

    You'd probably want to create all of the above, four or five times, once for each type of pitch the pitcher might throw: (1) fastball, (2) curveball, (3) change-up, (4) slider, (5) forkball, (6) cutter, etc.
     
  3. Thanks MGJ, that picture looks like what I was looking for !!

    So I suppose the payout ratio could be the batting average, ranging from .4 to .25. (These figures would probably change by batter). Those figures are the probability for the outcomes of strike out vs hit. In that case, I think outside the box should go towards .25. One bad pitch would be one ball, and it takes 4 balls to get to the comparable outcome of the batter going forward and not getting out.

    In this way, they range from 0 (no hit) to 1 (which would be a hypothetical spot that got hit 100%, or the squares over the batter in case he gets hit which is an automatic walk). And the numbers generated represent the payout as the pitcher pays out, and the batter collects. The pitcher wants the outcome to be as small as possible, the batter wants the payout to be as high as possible.

    For the pitcher, who might not be able to perfectly control where the pitch ends up -- the pitcher's choice would comprise 2 or 3 ball widths, and the batter's choice would comprise single ball widths. Or, make the pitcher's choices 3x3 squares of ball widths. Not perfect, but that's ok for now, the point is to develop a starting model.

    This is great, maybe this will help me explain the game better. If this model works out, next step will be figuring out how to apply it to trading.