Attached (

sim.mpl) is a simple game simulation with data from last years World Series champion Red Sox. Bump up infolevel to see what's going on during a game (as shown below). Obviously, as Joe Riel mentioned, the rule of thumb, 3-hits = 1 run is poor at best.
In the last post I just wanted to see if the number of runs our team was scoring was appropriate. What I really want to find out is if there is a way to improve our scoring chances. The standard baseball batting-order uses the following heuristic:
- lead off with someone with a high on-base percentage (and who can maybe steal a base)
- next 2 are good contact hitters
- batter 4 is your "clean-up" hitter; someone with power
- etc.
In 1957 the Pirates' manager Bobby Bragan claimed that lineups were being ordered foolishly. Bragan endorsed batting his best hitter first, second-best second, and so on. This idea was dubbed as "Bragan's Brainstorm". Pitcher Dick Hall even attempted to prove mathematically how many runs this scheme could add to the offence. The Pirates went 16-24 during the experiment, which was slightly better than their 14-26 record in the forty games before. The idea was dropped because of the controversy it generated.
The results of 10x162 games using the Red Sox standard batting order look like this:

. The standard-deviation of this run was 3.725, mean = 5.93, mode = 6, total runs = 9608. Note that the Red Sox actually scored 949 runs in 162 games, so the simulation is actually pretty close.
Repeating the experiment with a batting order based on best-average yielded these results:

. The standard-deviation was 3.767, mean = 5.817, mode = 5, and total runs = 9423.
These numbers are really close, so I am hesitant about drawing conclusions from them, even though, repeated experiments seem to give the edge to the traditional ordering.
The next step is to find the optimal batting order for any given set of players??
score: "------------ inning 1 (runs=0) -----------"
score: J Damon "outs=0,runs=0,bases=[false, false, false]" "walk"

score: M Bellhorn "outs=0,runs=0,bases=[true, false, false]" "out"

score: M Ramirez "outs=2,runs=0,bases=[false, false, false]" "strikeout"

score: "------------ inning 2 (runs=0) -----------"

score: D Ortiz "outs=0,runs=0,bases=[false, false, false]" "walk"

score: J Varitek "outs=0,runs=0,bases=[true, false, false]" "out"

score: T Nixon "outs=1,runs=0,bases=[true, false, false]" "strikeout"

score: K Millar "outs=2,runs=0,bases=[true, false, false]" "double"

score: B Mueller "outs=2,runs=1,bases=[false, true, false]" "out"

score: "------------ inning 3 (runs=1) -----------"

score: O Cabrera "outs=0,runs=1,bases=[false, false, false]" "double"

score: J Damon "outs=0,runs=1,bases=[false, true, false]" "strikeout"

score: M Bellhorn "outs=1,runs=1,bases=[false, true, false]" "walk"

score: M Ramirez "outs=1,runs=1,bases=[true, true, false]" "double"

score: D Ortiz "outs=1,runs=3,bases=[false, true, false]" "out"

score: J Varitek "outs=2,runs=3,bases=[false, true, false]" "out"

score: "------------ inning 4 (runs=3) -----------"

score: T Nixon "outs=0,runs=3,bases=[false, false, false]" "single"

score: K Millar "outs=0,runs=3,bases=[true, false, false]" "out"

score: B Mueller "outs=1,runs=3,bases=[true, false, false]" "single"

score: O Cabrera "outs=1,runs=3,bases=[true, false, true]" "out"

score: J Damon "outs=2,runs=3,bases=[true, false, true]" "out"

score: "------------ inning 5 (runs=3) -----------"

score: M Bellhorn "outs=0,runs=3,bases=[false, false, false]" "strikeout"

score: M Ramirez "outs=1,runs=3,bases=[false, false, false]" "strikeout"

score: D Ortiz "outs=2,runs=3,bases=[false, false, false]" "double"

score: J Varitek "outs=2,runs=3,bases=[false, true, false]" "single"

score: T Nixon "outs=2,runs=4,bases=[true, false, false]" "out"

score: "------------ inning 6 (runs=4) -----------"

score: K Millar "outs=0,runs=4,bases=[false, false, false]" "out"

score: B Mueller "outs=1,runs=4,bases=[false, false, false]" "out"

score: O Cabrera "outs=2,runs=4,bases=[false, false, false]" "out"

score: "------------ inning 7 (runs=4) -----------"

score: J Damon "outs=0,runs=4,bases=[false, false, false]" "double"

score: M Bellhorn "outs=0,runs=4,bases=[false, true, false]" "out"

score: M Ramirez "outs=1,runs=4,bases=[false, true, false]" "walk"

score: D Ortiz "outs=1,runs=4,bases=[true, true, false]" "strikeout"

score: J Varitek "outs=2,runs=4,bases=[true, true, false]" "walk"

score: T Nixon "outs=2,runs=4,bases=[true, true, true]" "out"

score: "------------ inning 8 (runs=4) -----------"

score: K Millar "outs=0,runs=4,bases=[false, false, false]" "walk"

score: B Mueller "outs=0,runs=4,bases=[true, false, false]" "walk"

score: O Cabrera "outs=0,runs=4,bases=[true, true, false]" "out"

score: J Damon "outs=1,runs=4,bases=[true, true, false]" "out"

score: M Bellhorn "outs=2,runs=4,bases=[true, true, false]" "out"

score: "------------ inning 9 (runs=4) -----------"

score: M Ramirez "outs=0,runs=4,bases=[false, false, false]" "homer"

score: D Ortiz "outs=0,runs=5,bases=[false, false, false]" "strikeout"

score: J Varitek "outs=1,runs=5,bases=[false, false, false]" "strikeout"

score: T Nixon "outs=2,runs=5,bases=[false, false, false]" "out"