First of all don't worry about this looking like homework. Homework is closed ended and well specified. Your problem is neither.

Your basic problem is a modelling issue. How detailed do your want your model to be of what goes into baseball, and how much data do you have to defend that model? After you have your model you have a completely separate analysis issue of figuring out the expected performance.

So what goes into a model? Well you can try to model everything, but I would say that you should go for simple. A person goes up to bat. One of several things happen. They get out. A hit advances people x bases (0, 1, 2, 3, homerun) and the top y people get out. Does your data look something like this? Ignore details like, "He runs really well" and assume it does.

Your next step is to fit the model to the people on the team. You have a number of outcomes when foo goes up to bat. Estimate the relative probabilities. The simpler your model, the fewer possibilities, the more data, the more comfortable you will be with your fit. But conversely the simpler, the less that is taken into account, the worse your model.

For the analysis I suggest Monte Carlo. You have your model. You have your numbers. Play Ball! There are only 87178291200 possible line-ups, a computer can crank through that in abou...

Oh shoot. That will take a while.

What you will need to do is take your players and rank them into a few roughly equal groups. Rather than try each lineup you want to try every way of scattering your fixed groups around the lineup. For instance if your groups are the star, 2 more good players, 6 more OK ones, and the 5 who demonstrate why it is little league, then you have about a half-million possible lineups to consider.

So now play ball. Play each of these lineups for 100 innings. (By play a lineup I mean randomly line up the players within the lineup, generate random numbers, and play.) That is about 50 million simulated innings, it will take a while. Drop 2/3 of them. Try that again. Keep on doing that until you get down to a hundred or so grouped lineups. Then take your groupings and split your groups in half. That will get you a lot more lineups again. Wash, rinse, and repeat until you have (by your numbers) the top few lineups.

If your kid brother doesn't move up in the batting numbers, don't tell anyone. If he does, then good luck convincing the coach...

Either way you will learn something about statistics, programming, and exactly how hard it is to come up with a decent model of anything in the real world.


In reply to Re (tilly) 1: Baseball line up (best rotation) by tilly
in thread Baseball line up (best rotation) by LeGo

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.