View Full Version : Calculating BaseRuns Custom LWTS
skyking162
11-06-2007, 11:07 AM
Any tips from the database pros about calculating a bunch of sets of BaseRuns custom linear weights all at once? Not sure what sorts of queries/calculations would automate the process. Thanks.
Tango Tiger
11-06-2007, 11:16 AM
Patriot has it all laid out on his site.
Patriot
11-06-2007, 06:48 PM
Any tips from the database pros about calculating a bunch of sets of BaseRuns custom linear weights all at once? Not sure what sorts of queries/calculations would automate the process. Thanks.
Can't help you with database queries, but the LW of any event is equal to:
LW = ((B + C)(Ab + Ba) - AB(b + c))/(B + C)^2 + d
Where A, B, C, and D are the total A, B, C, and D factors for the entity in question. So if you are doing the 1990 NL and there were 1800 home runs hit in that league, D = 1800.
a, b, c, and d are the coefficient for the event in question in the A, B, C, or D factor. For example, a home run has a = 0, b = ~2 (or whatever coefficient the HR has in your B factor), c = 0, and d = 1.
skyking162
11-07-2007, 06:02 AM
Can't help you with database queries, but the LW of any event is equal to:
LW = ((B + C)(Ab + Ba) - AB(b + c))/(B + C)^2 + d
Where A, B, C, and D are the total A, B, C, and D factors for the entity in question. So if you are doing the 1990 NL and there were 1800 home runs hit in that league, D = 1800.
a, b, c, and d are the coefficient for the event in question in the A, B, C, or D factor. For example, a home run has a = 0, b = ~2 (or whatever coefficient the HR has in your B factor), c = 0, and d = 1.
That's exactly the sort of trick I was looking for. Thanks, Patriot!
Your equation contains no big D -- is that correct?
Patriot
11-07-2007, 08:25 AM
Yeah, no big D, since Base Runs sets aside the run-scoring home run as one run. The advancement portion of the home run is incorporated in the B factor and that is where home runs have the opportunity to interact with the other events and change their values. I probably shouldn't have used a big D example.
BTW, that formula is the precise Linear Weight value...the "+1" approach will come very close to it though. The formula is really doing the +"infinitesimal value" approach that the defines the derivative in calculus.
skyking162
11-07-2007, 09:48 AM
The formula is really doing the +"infinitesimal value" approach that the defines the derivative in calculus.
When I go back to teaching, this will be example number one of why calculus is cool and useful.
Tango Tiger
11-07-2007, 10:27 AM
Here's Patriot work on the matter (go to near the bottom):
http://gosu02.tripod.com/id108.html
And he points to some of the Calculus work here:
http://members.cox.net/~harlowk22/br1.html
digglahhh
11-07-2007, 11:21 AM
When I go back to teaching, this will be example number one of why calculus is cool and useful.
The coolest thing I ever saw a teacher do involving math (when I was in high school) was come up with an equation off the top of his head that would graph the Nike swoosh on a graphing calculator. His first try was pretty close, and then he tweaked it and got it pretty good, I must say.
Of course sabermetrics is much cooler on a practical level.