ezPM v.2.0: Incorporating Counterpart Defense or “The Biggie”


This is going to be epic, so pull up a comfy chair.

Anybody who knows anything about basketball metrics knows that there are two major areas of improvement sought: 1) defense; and 2) “the little things”. Unfortunately, play-by-play data doesn’t really tell us much about “the little things”, but it can tell us something about defense. Currently, ezPM distributes credit or blame equally among teammates when the defense denies a bucket or allows one, respectively. The formula looks like this:

DEF = 1.06*STL+OFT_PTS-0.2*(2-1.06)*OPP_2PTM-0.2*(3-1.06)*OPP_3PTM+1.06*0.74*0.2* OFG_MISS+0.2*1.06*TEAM_TAKE+1.06*0.74*BLK

All the terms with “0.2” represent distributed credit/blame (for opponent 2pt FG, 3pt FG, missed FG, and non-steal turnovers). Because credit/blame is distributed equally, some players won’t get the credit they deserve, and other players will get more credit than they deserve for defense.

To begin to address this, I modified “the code” to keep track of the counterpart data for shots and assists. Once the data are collected, we can then modify the formula for defense. Here’s one way to do it (perhaps, the most obvious way):

DEF' =1.06*STL+OFT_PTS-(2-1.06)*AFG2CP-(3-1.06)*AFG3CP-(2-1.06)*UFG2CP-(3-1.06)*UFG3CP+1.06*0.74*CPMISS+0.5*0.2*1.06*TEAM_TAKE+0.5*1.06*TOVCP+1.06*0.74*BLK

Here, I’ve made no distinction between assisted and unassisted field goals. The “CP” refers to “counterpart”. Note that now every term, except for “TEAM_TAKE” (50% weight to non-steal opponent turnovers), is attributed to an individual counterpart. In theory, this should enable more accurate player valuation.

An alternative to the above formula that is worth considering is to distinguish between assisted and unassisted field goals, just as we do for offense:

DEF''=1.06*STL+OFT_PTS-0.3*(2-1.06)*AST2CP-0.3*(3-1.06)*AST3CP-0.7*(2-1.06)*AFG2CP-0.7*(3-1.06)*AFG3CP-(2-1.06)*UFG2CP-(3-1.06)*UFG3CP+1.06*0.74*CPMISS+0.5*0.2*1.06* TEAM_TAKE+0.5*1.06*TOVCP+1.06*0.74*BLK

Here, just as for the offense, I’ve split blame between the defender who “gives up” the assist and the one who allows the made field goal.

Now, it’s time to look at some of the results. Here are the top defenders as defined by DEF' (greater than 1500 possessions):


1 Ronnie Brewer CHI 2.5 3.95
2 Dwight Howard ORL 5 3.70
3 Andrew Bogut MIL 5 3.43
4 Rajon Rondo BOS 1 3.24
5 Tim Duncan SAS 4.5 3.01
6 Anderson Varejao CLE 4.5 2.80
7 LeBron James MIA 3.5 2.74
8 Chris Paul NOH 1 2.67
9 Tony Parker SAS 1 2.65
10 Andre Miller POR 1.02 2.59
11 Kevin Garnett BOS 4 2.57
12 Eric Bledsoe LAC 1 2.55
13 Rudy Gay MEM 3 2.55
14 Jason Kidd DAL 1 2.46
15 Marc Gasol MEM 4.98 2.40
16 Jose Barea DAL 1.02 2.40
17 C.J. Miles UTA 4.5 2.15
18 Jodie Meeks PHI 1.98 2.11
19 George Hill SAS 1.01 2.06
20 Derrick Rose CHI 1 2.04
21 Luol Deng CHI 3 2.03
22 Taj Gibson CHI 4 2.00
23 Pau Gasol LAL 4.5 2.00
24 Andrei Kirilenko UTA 1.99 1.99
25 Tracy McGrady DET 2.51 1.89

Note that the average position for the top 25 above is 2.56 (between SG and SF). Here are the 10 players who improve the most with DEF' over the original defense formula:

1 Jose Barea DAL 1.02 2.61
2 Anderson Varejao CLE 4.5 2.43
3 Rodney Stuckey DET 1.5 2.24
4 Steve Nash PHX 1 2.05
5 Jodie Meeks PHI 1.98 1.91
6 Eric Bledsoe LAC 1 1.80
7 Tony Parker SAS 1 1.74
8 Ty Lawson DEN 1 1.51
9 Nenad Krstic OKC 5 1.51
10 Brandon Rush IND 2 1.51

I was not expecting Steve Nash to be helped by counterpart defense. I suspect my readers share my surprise. Moving on, here are the 10 players hurt the most by DEF':

178 Charlie Villanueva DET 4 -2.71
177 Steve Blake LAL 1.01 -2.44
176 DeJuan Blair SAS 4.02 -2.23
175 Joakim Noah CHI 4.99 -2.18
174 Nicolas Batum POR 3 -1.95
173 Brandon Jennings MIL 1 -1.88
172 Amare Stoudemire NYK 4 -1.69
171 Reggie Williams GSW 3.01 -1.64
170 Dirk Nowitzki DAL 4.02 -1.55
169 Paul Millsap UTA 4 -1.51

Noah? That was not expected.

Let’s look at what happens when we take into account assists. Here are the top 25 defenders according to DEF'':


1 Ronnie Brewer CHI 2.5 4.78
2 Dwight Howard ORL 5 4.51
3 Andrew Bogut MIL 5 3.59
4 LeBron James MIA 3.5 3.32
5 Tim Duncan SAS 4.5 3.24
6 Kevin Garnett BOS 4 2.97
7 Rudy Gay MEM 3 2.95
8 Anderson Varejao CLE 4.5 2.86
9 Taj Gibson CHI 4 2.79
10 Marc Gasol MEM 4.98 2.77
11 Josh Smith ATL 4 2.75
12 C.J. Miles UTA 4.5 2.65
13 Andrei Kirilenko UTA 1.99 2.47
14 Trevor Ariza NOH 3 2.40
15 Pau Gasol LAL 4.5 2.40
16 Elton Brand PHI 4.5 2.32
17 Luol Deng CHI 3 2.31
18 Ben Wallace DET 4.99 2.31
19 Lamar Odom LAL 4 2.25
20 Jodie Meeks PHI 1.98 2.24
21 Tracy McGrady DET 2.51 2.24
22 Gerald Wallace CHA 3.5 2.18
23 Andre Iguodala PHI 2.5 2.13
24 Corey Brewer MIN 2.5 2.10
25 Glen Davis BOS 3.99 2.04

The average position here is 3.7 (between SF and PF). Maybe I’m crazy, but this actually makes more sense to me than the first metric, as big guys do tend to have more impact on defense — at least, that’s the conventional wisdom, right?

Here are the 10 players who improve the most:

1 Anderson Varejao CLE 4.5 2.49
2 Jodie Meeks PHI 1.98 2.03
3 Nenad Krstic OKC 5 1.80
4 Kobe Bryant LAL 2 1.75
5 Landry Fields NYK 2.01 1.75
6 Joe Johnson ATL 2 1.65
7 Tayshaun Prince DET 3 1.58
8 Brandon Rush IND 2 1.58
9 Dwight Howard ORL 5 1.54
10 Lamar Odom LAL 4 1.40

And here are the players who lose the most with DEF'':

1 Steve Blake LAL 1.01 -4.29
2 John Wall WAS 1 -3.90
3 Brandon Jennings MIL 1 -3.87
4 Derek Fisher LAL 1 -3.67
5 Ramon Sessions CLE 1.01 -3.22
6 Raymond Felton NYK 1 -3.11
7 Devin Harris NJN 1 -2.98
8 Mike Conley MEM 1 -2.93
9 Mike Bibby ATL 1.01 -2.90
10 Chris Paul NOH 1 -2.81

All point guards on this list. Now, the interesting thing is that I’m not sure that’s bad. Why? Because ezPM appeared to have a preference for point guards before. Why? For the same reason that point guards appear on this list. They get a lot of credit for assists, but don’t get debited for “missing” assists (or potential assists, which aren’t recorded). It’s sort of a win-win situation for point guards. So, in a way, you can think of this as a defensive correction.

Anyway, there are some really interesting questions that can and should be raised. I’ll leave you with this particular question. We know, or at least, the conventional wisdom is that assisted field goals are “easier” to make. That’s why I give an assisted field goal 70% of the credit that an unassisted field goal would receive. This raises an important question: On the defensive side, should we give more or less credit for giving up an assisted or unassisted field goal? If the assisted field goal on offense was easier to make, it would seem to follow that the defender should be debited a little less, right? That would justify debiting the player guarding the passer as well as the one defending the shooter. On the other hand, one could make the argument that the defender enabled the counterpart to get open and in a position where he could be assisted. See where I’m going with this? These are not simple questions in my mind. But we’re getting somewhere now, I think. To be continued…obviously.


36 thoughts on “ezPM v.2.0: Incorporating Counterpart Defense or “The Biggie””

  1. Congrats on the implementation.

    Between equal credit/blame for shot defense to all defenders on the court and these 2 new versions were the bulk (except for the allowed assist share) or all the blame and all the credit goes to the counterpart defender, you could split the difference. There are two arguments for that: 1) because shot defense is influenced by both the counterpart shot defense and team help defense and 2) to perhaps gain broader support and usage because of folks who acknowledge 1) and might reject a 100% counterpart measure as some do right now with the 82 games data.

    I probably favor an equal split if only one version is supported but can also see value in the different splits. I was unable to gain much stated support all or 2/3rds or even 50/50 credit / blame to the counterpart in past APBRmetrics threads but maybe you’ll have better luck since you are sharing the completed metric instead of just the concept.

    Nash may get helped by 100% credit / blame to the counterpart defender because if he gets beat, someone will probably step up and try to help and then their man is open and may score. Similarly Noah is a step up help defender but he leaves his man and may get hit for counterpart scoring in the wake of that decision. 50/50 gives you a much bigger hit if your counterpart scores but compromises to recognize some shared responsibility in the complex task of shot defense.

    1. Crow,
      I know you’re not suggesting that Andrew Bogut and Dwight Howard are not “step up help” defenders. They are atop the charts of any defensive basketball metric, and they don’t take hits when counterpart scoring or assists modify the rating — in fact, they improve when blame for assists are entered into the equation.
      So why does Noah, who plays the same position and is considered by many a top defender, take such a hit?
      The simple answer is that Bogut and Howard are better on-ball defenders than Noah, and they’ve got higher defensive rebounding rates as well.
      Bogut and Howard give help, but they’re more experienced and smarter about giving help (Not “overhelping”); they’re certainly blocking more shots, cutting off weak-side rebounding; and, in general, they’re not losing track of their man on the offensive glass.
      To the eye, Noah looks good and very active, but he gets beat often in the post, and roams and overcommits to help. He does look like he’s working harder than Howard and Bogut, and plays with a lot energy, but a lot of that is wasted activity. 4th year pro, still learning.

      1. I agree that your comments. Noah is not at the same level as Bogut as a 1 on 1 shot defender this season and Howard is even better. Noah isn’t as good this season 1 on 1 as Thomas or Asik either. He is a better rebounder than Thomas. Help defense impact of the Bulls centers might be hard to call accurately. Asik has a very strong team defensive efficiency while on. Regular Adjusted +/- also calls Asik the best of the 3 as a defender by a significant margin. I agree that Noah’s reputation is better than what he did this season, coming off injury. But he was probably better before, or at least a lot better than his old teammates under the old coach.

        1. Agreed, I’ve been very impressed with Asik this season, and Kurt Thomas is very solid. Noah is overrated as a defender. The hand is no excuse — Bogut played with one arm all season and was still a force defensively.

          I’m a Bucks blogger, and, as such, because we are one of the few teams where our center is the franchise, I pay close attention to center play. This season, Bogut blocked more shtos than Howard, but that’s because he’s challenged more often than Dwight. Both players stay at home defensively, and Bogut has learned — and has said — that he doesn’t leave the floor until the opponent leaves his feet. It’s a subtle thing – the ball fakes don’t work on those guys — they are waiting until offensive players actually leave their feet and shoot before they go up for the block. And they wait to give help until the last instant. It’s an expericnce thing, I believe.

          That’s just one aspect of it. On the ball, they don’t even look like they’re working hard in the post — they stay down, use their physical size to maintain position. And they don’t lose contact with their man. Bogut’s thing is to hit the player he’s guarding in the chest all game long. He’s constantly tapping the opposing center with his hand to keep track of him, to know where he is. It’s a great way to play off-the ball defense.

          The metrics agree across the board — Howard and Bogut aren’t just a little better than the big men of the league, they’re a lot better — in a league of their own.

          The question here is — how the heck does Ronnie Brewer outscore their impact? I know he leads the Bulls in steals, but one would think it impossible for a wing player to outscore Dwight and Bogues as far as defensive impact. Can’t wait for the next Bulls playoff game to see what he’s doing out there.

          1. Ronnie Brewer is an interesting case. In fact, it is not just ezpm that his defense rated highly. 1-yr defensive RAPM is +3.1, which would be one of the league leaders. In addition to steals, his counterpart on the opposing team likely racks up fewer assists and shoots with lower efficiency. If it were purely a function of team defense, one would expect Bogans to rate similarly. Having said that, I certainly don’t believe that Brewer has greater defensive impact than Bogut or Howard (or Garnett or Duncan, etc), so it is an interesting case. I tend to think the numbers are meaningful in the sense that they give us an idea that he’s a better than average defender at his position, but you can only get so much out of looking at counterpart data. There are always going to be statistical outliers, and maybe Brewer is an example of that.

  2. in above post should be…

    50/50 gives you a much bigger hit if your counterpart scores
    “than in an equal blame to all 5 guys on the court system”…

  3. Thanks, Crow. I can compare these data to RAPM (if I add in the defensive rebounding component). I can also look at y-t-y correlation, maybe for players that switch teams, and see which performs best.

    1. Yes, once you have a complete metric with shot defense divided “fairly” (in the sense of being based on only those minutes a player is actually on the court and not team level shot defense for all minutes) , then you have a much better “statistical” measure to compare to player Adjusted +/- and the other things you mention.

      1. The shot defense was also previously based on “those minutes a player is actually on the court”. It sounds like maybe you weren’t aware of that?

        1. Sorry, the criticism of ‘team level shot defense for all minutes, not when actually on the court’ was in reference to some other metrics, not yours. I thought that would be clear, but I guess I should have specified further. And of course many metrics have had no shot defense at all.

  4. You explained the global rationale for the assist allowed charge appropriately and I support its use.

    Bledsoe is the only rookie in either top 25, though Fields also makes is a big positive move up in the version with the assist allowed charge.

  5. I did a tiny video charting exercise years ago were I found that about 2/3rds of the time the shot defense at the time of the shot involved the counterpart. 1/3 of the time there was a switch or shared shot defense. But it was a tiny test of a game or two.

      1. I haven’t tracked that. My first guess that it would be more due to small / big pick n’ rolls, baseline screens, rotating out to a 3 point shooter, etc. and because 2s & 3s and 4s & 5s tend to be on opposite sides of the court.

        1. A drive that beats a perimeter man ends up with a help defense response (a kind of switch) often from a big.

          I’d guess that the average defender position number change in a switch of any kind is closer to 2 than 1 . Probably higher when the position rank goes up (on more drives inside), probably lower when it goes down (more likely perimeter shots).

          Maybe you could model switching and estimate the shares of credit and blame to other positions a bit better than even shares but it would probably be worth another video test before committing to it.

  6. Nice work, EvanZ! This is going to really be interesting as you see how well it works.

    A few questions: would it perhaps be possible to “tune” the counterpart data by looking at defensive RAPM or APM? I, perhaps, wouldn’t take ALL of the defense and apply it to the counterpart–perhaps half “team” and half “counterpart”, or some other mix as defensive RAPM or APM would suggest. Just another idea. I’d like to see some “validation” of the model somehow.

    1. Thanks, Daniel. Yeah, the “tuning” is how I’d like to proceed.

      Do you think it would be crazy to do this tuning at the team level? Each team has different defensive schemes, and it might not be right to have one function across the whole league. Just a thought. It would be a ton of work obviously, so maybe not a first pass kind of thing.

      1. I don’t know about that… you could try it, but I suspect it would be subject to a bunch of random error and would have to be regressed a bunch.

        One way to attack it would be to assign credit based on position–e.g. post defenders get more of the credit for a PG scoring against them than does the 2G.

        Much exploration on this would be required.

        p.s. You ever going to release your parsing code? 🙂

  7. Nice work.

    As for validation, in addition to fitting to adj. +/-, I’d be interested in how good ezpm is in retrodicting the result of games, or better yet quarters (to get more variation in subbing). Both in sample and out of sample (stats from before a certain date to predict later games).

    Also, it would be nice to compare to something simpler, like oncourt +/-, win score, alternate win score, etc. to see if counterpart data makes a difference. You could even try to fit parameters of ezpm this way.

  8. Just an idea – (maybe this is what DSMok was saying), perhaps we could find the appropriate distribution that should be credited for counterparts.

    That is, against defensive RAPM (or something), somehow optimize how much defensive player @ position X is responsible for players on the court, according to a curve that sums to 100%.

    Not sure of how you would do this, though…

    Like this: (for each position, here is a player at the 3): http://dl.dropbox.com/u/241759/counterpart.JPG

  9. Here’s my issue. Say a player is set up in an isolation defense. His opponent has the ball and drives to try and get penetration. The defender stays in front of him, stopping him and forces the pass.

    Meanwhile his teammate gets left behind when his player cuts. The stopped ball handler spots him and passes the ball where the cutting player catches it and stops and pops.

    In scenarios like that, where the player on the initial defense actually does what he was supposed to do, but someone else didn’t, the initial defender gets penalized for what his teammate didn’t do in yielding the “assist.”

    In another case a player gets set up in iso defense, the ball handler penetrates getting past him, the center comes up to be his help defense but the ball handler sees that and dishes the ball underneath the rim for a dunk.

    It seems to me that assists are sometimes a matter of good defense and sometimes a matter of bad defense. There’s nothing to indicate which is which.

    1. We can all come up with scenarios where something looks good or bad depending on the context. It seems clear to me that, on average, a poorer defender will more often give up easier shots or allow cleaner (less harried/hurried) passes to be made by his counterpart, while a better defender will generally prevent those shots/passes.

      Perhaps, I should do a quick post simply looking at counterpart assist ratios, to see if the rankings match what I might expect, or whether it is more random or even inversely correlated, which I suspect is what you would expect.

  10. EvanZ,
    I couldn’t help but notice that it looks as though a player who blocks his counterpart’s shot is getting credit under ezPM 2.0 for both the blocked shot and the missed counterpart shot, which would give him about a 1.5 score for the play — even though the block (like many of Howard’s often do) might go out of bounds and the shooting team retain possession.

    Is there a way to parse the blocks against out of missed shots and apply them to the counterparts blocks when that happens?

    Also, the .74 average defensive rebounding rate applied to blocked shots might needs some tweaking. I’d be curious to arrive at what the league average for the blocking team gaining possession after the block is, keeping in mind that some players (like Bogut) retain possession on most of their blocks while Dwight likes to knock them into the seats for intimidation purposes.

    1. Hi, J.D.

      I actually don’t double count the missed shot and the block. In an earlier version I did, but I quickly realized it and modified the code.

      To your second point, 82 games did a study a while back on rebounds on blocked shots. I believe the average is around 57%. Here’s the link:


  11. That’s good news for the centers! And thanks for the link.

    The study results show a league 2003 average of 57% ball retention of the block, but that the teams of the top 10 big men retained possession on a block anywhere from 63-69%. It’d be great to see a Howard vs. Bogut block retention study. Bogut and the Bucks are retaining his blocks at a high percentage, perhaps the full ezPM 74% rate, while, Howard, I’m not so sure. It may be closer to 60%?
    If Bogut’s DEF” remains the same (3.59) Howard’s might drop .34 to 4.17, still #2 in the league behind Brewer. Still, since neither player is getting credit for alters, maybe it’s OK to just leave it as is.

    One last issue: Charges taken. I know it’s difficult to even find this missing stat, but players who take charges are not only sharing the credit with their teammates in ezPM 2.0, but they’re Team Take is being halved. I can understand why it is being halved, given that the purpose is to draw out individual defensive performance from team performance, and realize the data hasn’t been available, but is there a way to get at “charges taken” and separate them from Team Take to get a sharper DEF picture?

    1. The problem is that who draws the charge is not listed in the PBP data. Without that, I have no way to credit anyone, unfortunately.

  12. That is unfortunate, as its defensive value is better than a block, and some pretty good defenders are falling out of these rankings as a result. It doesn’t seem fair to slice the team turnover rate in half along with the counterpart turnovers. For example, if the player Serge Ibaka is guarding travels twice and Nick Collison takes three chages, the metric will reward Ibaka’s defense more than it will reward Collison’s, even though Ibaka’s D may have had little or nothing to do with his counterpart’s traveling.

    1. J.D., in the current version of the metric counterpart turnovers are split 50/50 between a player and his teammates. In other words, Ibaka would get half the credit for his counterpart turnovers, while the other half gets split among his teammates.

      As for charges, from the few stats that I have seen, the league leader in drawing charges is usually around 1 per game, sometime less. It would be really nice to give that guy credit. Unfortunately, like I said, there’s nothing I can do about it without the data.

Leave a Reply