Wednesday, May 29, 2013

The OBP/SLG regression puzzle -- Part III











Even better: we're down to 2.43!



Now, the ratio is all the way down to 2.1.

What's going on?


-- batting talent, and
-- a high run environment for the league and park.



Comparing 1968 to 2001:

1968: OBP .299, SLG .340
2001: OBP .332, SLG .427

OBP increased 11 percent, but SLG increased 26 percent.







That's a ratio of 2.33.



I'm checking that out for a future post.

Labels: , , ,

Monday, May 27, 2013

The OBP/SLG regression puzzle -- Part II

A point of OBP seems to be worth 2+ times as much as a point of SLG, when you run a regression on team performance.  But, when you look at the marginal effects on an average team, you get 1.7.  Why the difference?

Last post, I suggested two reasons:

1.  Different rates of increasing returns on OBP and SLG;

2.  Different values of OBP and SLG depending on ratio of singles/walks/power.

My argument then was mostly about #1.  But, now, I realize the answer is probably almost all #2.  The evidence was there all along.

When Tango did the analysis that got him the 1.7 factor, he showed the OBP and SLG run equivalents for the various events.  Here they are: 

 1B:  actual 0.474,  estimate 0.485 
 2B:  actual 0.764,  estimate 0.786 
 3B:  actual 1.063,  estimate 1.087 
 HR:  actual 1.409,  estimate 1.389 
 BB:  actual 0.336,  estimate 0.313 
out:  actual -.302,  estimate -.286

("Actual" refers to the known, accepted values from other methods; "Estimate" refers to the approximation from the OBP/SLG method.)

The values are reasonably close, but not exact.  The differences are:

 1B: -0.014
 2B: -0.022
 3B: -0.025
 HR: +0.020
 BB: +0.023
out: -0.016

The discrepancies are actually pretty large.  Why?  And, why are there discrepancies at all?  

Because: there just isn't a way to get an OBP/OPS linear relationship to be as accurate as one where you look at the underlying events.  

It's like ... suppose I create two stats for money. "Bigness" (BGN) reflects whether the bill is $50 or higher.  "One-ness" (ONE) reflects whether the value contains a "1" ($1, $10, $100).  When I use those instead of the real values, I'm obviously losing accuracy, because I'm eliminating valuable information.  (For one thing, a $1 and a $10 look exactly the same to those two stats.)

You can get equal points of BGN and ONE in different ways: For example, "$1 and $50", has the same effect on BGN/ONE as "$100 and $5."  If you increase your stats with $100s and $5s, you're going to have more money than your BGN+ONE suggests.  If you do it with $1s and $50s, you're going to have less than your BGN+ONE suggests. 

It's the same for OBP and SLG.  You can get a high OBP and SLG in two separate ways: walks, or hits.  If you do it with walks, you're going to score more runs than your OBP/SLG suggests.  If you do it with hits, you're going to score fewer runs (unless you hit more home runs than any other type of hit, which is unlikely).  

Now, that wouldn't be a problem, if all teams had the same walk/hit tendencies.  In that case, the regression would just smooth everything out, and the discrepancies would all cancel.  

Suppose it's true that teams don't have different tendencies.  Then, the 1.7 holds everywhere, and a team's success is linear on (OBP*1.7 + SLG).  That means if you have two teams, one of which is the league average .333 and .430 (for a 1.7-weighted total of .996), but the other team is (say) .350 and .401 (for the same .996), you'd expect the two teams to have the same BB/hit ratio.  

That doesn't seem right, does it?  It seems like the .350/.401 team should be hitting more singles and fewer home runs.  I mean, not necessarily ... I guess you could come up with a scenario where it hits .200 with lots of walks and power.  But that seems unlikely.  It seems like the higher the contribution of slugging percentage, the more hits relative to walks.

And, yes, that's how it is.  I ran a regression to predict the walk ratio (BB/(BB+H)) from 1.7-weighted OPS, and SLG.  The results:

Walk ratio = (0.9295*weighted OPS) - (1.5234*SLG) - 0.267

See?  The higher the SLG, the fewer the walks.  Therefore, high-SLG teams will underperform their regression estimate, and high-OBP teams will overperform.

And that's why, when you look at all teams, the regression "notices" that OBP teams are underestimated relative to SLG teams.  And so, it moves the OBP coefficient higher, and the SLG coefficient lower.  

And that's the answer to why the ratio is higher than the 1.7 we'd otherwise expect.   

Labels: , , ,

Thursday, May 23, 2013

The OBP/SLG regression puzzle







To see why: consider a relationship that's actually cubic:



y = 34x - 39































1000 divided by (.999 minus SLG)


The increase in runs is, therefore,







How many singles do we need to add?  Same formula: 

[1000 / (.999 - OBP)]



That is, we need to subtract


Combining the the two steps, gives a batting line change of 







That means, in terms of increasing returns, we have:

Increase SLG by bases -- roughly linear
Increase SLG by hits  -- increasing in SLG
Increase OBP by walks -- increasing in OBP
Increase OBP by hits  -- increasing in OBP and SLG










0 points: 2.6 low, 3.7 high
1 point : 2.0 low, 4.6 high
2 points: 1.6 low, 2.5 high
3 points: 0.8 low, 1.5 high
4 points: 7.1 low, 3.6 high








Labels: , , ,

Thursday, May 16, 2013

Two regression puzzles



The first one comes from Brian Burke.


So far so good.


How is that possible?











What's going on?



Labels: ,

Monday, May 06, 2013

How extreme are simulation game results?

Last post, I tried to figure out the theoretical breakdown of luck in team records.  In standard errors, I got:

31.9 runs from career years batting
31.9 runs from career years pitching
23.9 runs from event clustering
23.9 runs from opposing team's event clustering 
39.1 runs from Pythagoras

A couple of posts before that, I had done the same thing, but for my "luck" study.  There, the "career year" luck estimates were higher.  (The clustering and Pythagoras estimates were roughly the same, but that's because I used pretty much the same method).

42.7 runs from career years batting
48.5 runs from career years pitching
23.8 runs from event clustering
25.8 runs from opposing team's event clustering 
39.1 runs from Pythagoras

There are good reasons for my "career year" estimates being farther off -- mostly, because I had to interpret changes in talent (aging, injuries, learning to hit a breaking ball) as luck.  (There are also selective sampling issues.)

Anyway, part of the reason I did all this was because of a comment from Ted Turocy in my post on simulation games:

"Do you also assume that the player "cards" have been suitably regressed to the mean? If not -- which is the case with all standard season sets/disks -- then the simulation will tend to have more extreme totals on the player leaderboards."

I hadn't thought of that.  Ted is right ... most simulations don't regress to the mean.  If Mark McGwire hit 70 home runs, the game will be calibrated so that McGwire's expectation is 70.  Which means, around half the time, he'll actually hit *more* than 70.  In fact, the binomial SD for McGwire's 1998 is around 8 homers, so that, a good proportion of simulated seasons, he might hit 80 or more!

The *team* totals will be more extreme too, then, and so will the team standings.  So I wondered: how much more extreme?  I seem to recall, some time ago, APBA putting out a promotional flyer with the results of a full simulated season (sent in by a customer), and showing how similar it was to the actual standings.  You'd think, though, without regressing to the mean, you'd have too much of a spread, though.

Well, now we can figure it out.

From 1973 to 2001 (omitting strike seasons), the SD of team records (normalized to 162 games) was almost exactly 11 wins.  The theoretical SD of luck is 6.36 wins, which means the SD from talent is almost exactly 9 wins.  (9 squared plus 6.36 squared equals 11 squared.)  

So, that's 90 runs.

But, now, the simulation is increasing that, by taking the "career years" luck, and making it part of the player's "talent" (which is what the card represents).  For the team as a whole, it works out to 31.9 runs pitching, and 31.9 runs hitting.

So the SD of talent is now 101 runs -- the square root of (90 squared plus 31.9 squared plus 31.9 squared).

Which means the SD of observed W-L records is now 119 runs, or 11.9 wins -- the square root of (101 squared + 63.6 squared).

11.0 wins -- real life
11.9 wins -- APBA

Not much difference -- around a single win.   

So, if you figure the most extreme team in a year is maybe 2 SD from the mean ... the top and bottom teams should be two wins more extreme than real life.  (They won't necessarily be the *same* teams.)

That's not a big deal ... you probably wouldn't even notice.  Real life often bumps the extremes well beyond that.

The real-life SD of wins is 11.0, but it varies quite a bit by season.   Here are the 26 season SDs:

10.3,  9.9, 11.7, 11.8, 14.4, 12.3, 12.9, 11.6, 10.5, 9.8, 8.9, 12.6, 10.3, 9.8, 12.0, 10.0, 9.1, 9.7, 10.2, 12.2, 10.0, 9.6, 13.5, 12.5, 10.0, 13.0, 14.8, 13.4, 13.5, 10.8, 10.1, 9.3, 11.1, 11.4, 11.0, 11.4

11.9 fits right in.  The extremes are much higher than that.  In 1984, the SD of wins was less than 9.  In 2002, it was 14.75.  I've never seen anyone mention either, that there was so much parity in 1984 but so little in 2002.  It seems that we don't even notice *big* changes.

The overall SD of the SDs was more than 1.5 ... so a change from 11.0 to 11.9 is only 0.6 SDs from the previous mean.  For statistical significance, you'd need to more triple that ... which means you'd need roughly ten times as many seasons.  It would take 360 years of Major League Baseball to get a 50 percent chance of statistical significance for a single unregressed APBA season.

It's a smaller effect than I had been thinking it would be.


In any case, that just applies to team records.  You'll be able to notice the spread more easily in individual results.

For a season of 600 AB, the binomial standard deviation of batting average is 18.7 points.  

In 2012, Buster Posey led the majors in batting average, at .336.  In a simulation, he'd have a 50% chance of beating that.

Miguel Cabrera, who hit .330, would have probably a 40% chance.  Andrew McCutchen, half an SD behind, would have a 30% chance.  Mike Trout, also around 30%.  Adrian Beltre (.321), 20%.  So far, that adds up to 170%, or an average of 1.7 simulated hitters beating .336.  And that's only after looking at five players!

So, it's virtually assured that the simulated leader will outhit the actual leader.  That's probably true in any of the major statistics where players get similar numbers of opportunities.


Bottom line: in an APBA season, you'll notice players are more extreme than real life -- but you probably won't notice that teams are.

Labels: , , , ,