Most earlier mathematical studies of baseball required particular mode
ls for advancing runners based on a small set of offensive possibiliti
es. Other efforts considered only teams viith players of identical abi
lity. We introduce a Markov chain method that considers teams made up
of players with different abilities and which is not restricted to a g
iven model for runner advancement. Our method is limited only by the a
vailable data and can use any reasonable deterministic model for runne
r advancement when sufficiently detailed data are not available. Furth
ermore, our approach may be adapted to include the effects of pitching
and defensive ability in a straightforward way. We apply our method t
o find optimal batting orders, run distributions per half inning and p
er game, and the expected number of games a team should win. We also d
escribe the application of our method to test whether a particular tra
de would benefit a team.