Actually let's put in the American League average for 2014.
So I've got at bat's here, and if I go through here,
that's the American League average.
And that's scoring what, Runs in 2014.
Okay, so I can just put those in here.
So, your inputs would be, let's put that in red,
a team's stats which you can easily get.
So, 2014 American League.
Okay, the outs are just simply computed as the number of hit bats minus the singles,
minus the doubles, minus the triples, minus the home runs.
Okay, so now, we have to talk about how we model what event happens, and this
is like that football example where we had first, second, third, and fourth down.
We'll use the VLOOKUP to model things with to model things with given probability.
See, this is how many walks,
or what's the odd that somebody gets a walk or hit by pitcher?
You would take, probability, you take walks plus hit by pitcher, divided by,
you would up at bats plus walks plus hit by pitcher.
So that's basically the probability they'd walk.
The probability, for instance, they hit a home run, pretty small here.
Take the number of home runs divided by at bats plus walks plus hit by pitchers.
And then outs is going to be just everything that's not a walk, single,
double, triple or home run.
So how can we assign random numbers from 0 to 1 to each event.
Well, let's start with the Outs.
So to 0 to 0.68, is an out.
And then we'll add, I think what did I do next, I did a single.
I have a code breach event.
0 is an out, 1's a single, 2's a double, 3's a triple,
4's a home run, f5 is a whopper hit by pitcher.
So if I add that 0.15 to the 0.68, get 0.83.
So anything between 0.68 and 0.83 gives us singles that gives the right probability.
Then I add in the chance of a double, that gives me .88, the chance of a triple and
the chance of a home run.
And then everything that's left over becomes walk.