Help with calculating WARP (from basketball-prospectus)

Home for all your discussion of basketball statistical analysis.
jkeen39
Posts: 21
Joined: Mon Feb 03, 2014 10:04 pm

Re: Help with calculating WARP (from basketball-prospectus)

Post by jkeen39 »

Kevin Pelton wrote:
jkeen39 wrote:Our first discrepancy was LgPOS - I was using Player Turnovers, not Team Turnovers. It would seem to make more sense to use Team Turnovers in this instance as you did, so I changed my formula and got your number of 209,653.
No, should always be player turnovers. So I have lower possession totals than you do -- 5,041 for LeBron as opposed to 5,086.

The other thing that stands out ... not sure if it's labeling, but I'm pretty sure .477 is opponent *e*FG%, not FG%.

Ok, interesting. So are you saying in ALL cases, we should be using Player Turnovers? Is there any good place to find Opponent Player Turnovers? That seems to be the hardest to find online. I guess I'll have to go back through several formulas to see where this impacts.

Across the Court came up with Opponent Player Turnovers (against the 11-12 Heat) of 1,043. If I plug that in, I get 5,040 possessions for LeBron, basically the same calculation as you.

And yes, I think the .477 is for eFG% - on your WARP explanation page near the end, it is titled OppFG% but I think you intended to be Opp eFG%. At least we have the same number.
Kevin Pelton
Site Admin
Posts: 104
Joined: Thu Apr 14, 2011 10:05 pm

Re: Help with calculating WARP (from basketball-prospectus)

Post by Kevin Pelton »

Yeah, I think we're getting close.

I have .4611 for OppRebOpp.
jkeen39
Posts: 21
Joined: Mon Feb 03, 2014 10:04 pm

Re: Help with calculating WARP (from basketball-prospectus)

Post by jkeen39 »

AcrossTheCourt wrote:
That changes the OppRebOpp% to 0.4573. Is that close? Thanks.
I have 0.4573 as well if I take out TmBLK%. Close to Kevin's calculation but still slightly off. Will probably have to dig in a little more to identify the discrepancy, but since we're close, let's see if we can at least get to the defensive rating Major.

Kevin, you previously mentioned we were close on the defensive side for Lebron through the Minor defensive rating (TmDefRatMinor). Right now I have 89.74 for LeBron and that is using player turnovers in every calculation.

The next couple of formulas are:

TmDReb% = .7465
Opp eFG% = .4770
OppRebOpp% = .4573 (you have .4611 - doesn't move the needle too much I don't think for this exercise)
TmDefRatMajor = 105.36

According to Across the Court, your guide has 104.3 for LeBron, so something is still relatively significantly off and I'm not sure what it is. The only other inputs to the Major defensive rating are RebFactor1 (.878) and RebFactor2 (1.121) which I think we had previously agreed on.

Let me know if any of those inputs starting with DefRatMinor look off. If not, then perhaps I have a bad formula for TmDefRatMajor.
AcrossTheCourt
Posts: 237
Joined: Sat Feb 16, 2013 11:56 am

Re: Help with calculating WARP (from basketball-prospectus)

Post by AcrossTheCourt »

Kevin Pelton wrote:Yeah, I think we're getting close.

I have .4611 for OppRebOpp.
OppReb Opp%
=(1-.4770)*(1-.08743-0.1298-0.06051)+0.56*((44,472-27,620)/208,413)+61,001/5040+0.8*10,086/208,413

TmDefRat
=(89.74+100*((1-0.7465)*0.4573*0.8775*1.121))/0.96
=105.36

Where am I off?

jkeen39 wrote:
Kevin Pelton wrote:
jkeen39 wrote:Our first discrepancy was LgPOS - I was using Player Turnovers, not Team Turnovers. It would seem to make more sense to use Team Turnovers in this instance as you did, so I changed my formula and got your number of 209,653.
No, should always be player turnovers. So I have lower possession totals than you do -- 5,041 for LeBron as opposed to 5,086.

The other thing that stands out ... not sure if it's labeling, but I'm pretty sure .477 is opponent *e*FG%, not FG%.

Ok, interesting. So are you saying in ALL cases, we should be using Player Turnovers? Is there any good place to find Opponent Player Turnovers? That seems to be the hardest to find online. I guess I'll have to go back through several formulas to see where this impacts.
I went to basketball-reference, then to the team's page, then to gamelogs, and summed all the turnovers from the opposing team there game by game there. (It's just one big copy/paste.)
Kevin Pelton
Site Admin
Posts: 104
Joined: Thu Apr 14, 2011 10:05 pm

Re: Help with calculating WARP (from basketball-prospectus)

Post by Kevin Pelton »

AcrossTheCourt wrote: OppReb Opp%
=(1-.4770)*(1-.08743-0.1298-0.06051)+0.56*((44,472-27,620)/208,413)+61,001/5040+0.8*10,086/208,413
The first factor should be FG%, not eFG%, so I have it as .447.

I also have FTScore as .847 rather than .874.[/quote]
AcrossTheCourt wrote:TmDefRat
=(89.74+100*((1-0.7465)*0.4573*0.8775*1.121))/0.96
=105.36
Besides the rebound opportunity aspect, I have .886 for rebound factor 1. Rebound factor 2 is correct.
jkeen39
Posts: 21
Joined: Mon Feb 03, 2014 10:04 pm

Re: Help with calculating WARP (from basketball-prospectus)

Post by jkeen39 »

Kevin Pelton wrote:
AcrossTheCourt wrote: OppReb Opp%
=(1-.4770)*(1-.08743-0.1298-0.06051)+0.56*((44,472-27,620)/208,413)+61,001/5040+0.8*10,086/208,413
The first factor should be FG%, not eFG%, so I have it as .447.

I also have FTScore as .847 rather than .874.
Hmm, now I'm a little confused. Your site has a formula for OppFG% (which I believe is actually eFG%) and only used in the OppRebOpp%. But perhaps that is the value you are referring to? I assume you don't just mean straight FG% of the opponent, as that was .434 for the Heat in 11-12.

When you refer to FG%, are you referring to this formula from your site?

OppFG% = (Teammate TmFGRat/2) / (Lg eFG%/LgFG%)

I also came up with .4770 for that input as follows: (1.0379/2)/(.4873/.4479). Which of those numbers is wrong?
jkeen39
Posts: 21
Joined: Mon Feb 03, 2014 10:04 pm

Re: Help with calculating WARP (from basketball-prospectus)

Post by jkeen39 »

AcrossTheCourt wrote:TmDefRat
=(89.74+100*((1-0.7465)*0.4573*0.8775*1.121))/0.96
=105.36
Besides the rebound opportunity aspect, I have .886 for rebound factor 1. Rebound factor 2 is correct.[/quote]

Not sure how RebFactor1 could be off since that one seems pretty simple:

RebFactor1 = LgReb / ((LgFGA - LgFGM) + .56*(LgFTA-LgFTM))

= 83,513/((161,225-72,218) + .56*(44,472-33,465)) = .8775

Let me know where this went wrong. Thanks.
Kevin Pelton
Site Admin
Posts: 104
Joined: Thu Apr 14, 2011 10:05 pm

Re: Help with calculating WARP (from basketball-prospectus)

Post by Kevin Pelton »

jkeen39 wrote:When you refer to FG%, are you referring to this formula from your site?

OppFG% = (Teammate TmFGRat/2) / (Lg eFG%/LgFG%)

I also came up with .4770 for that input as follows: (1.0379/2)/(.4873/.4479). Which of those numbers is wrong?
I see what it is now. The Lg eFG% is actually on *unblocked* shots, since blocks are already assumed to provide a rebound opportunity.

On the rebound factor, you're right that's the correct calculation. It looks like I actually used a different factor on defense:

Reb/TmMinorPossessions / ((1 - LgNoScore [Blk% + Stl% + non-steal TO%] - LgFTScore) * (1-LgFG%) + Blk% + LgFTScore * .56 * (1-LgFT%))
jkeen39
Posts: 21
Joined: Mon Feb 03, 2014 10:04 pm

Re: Help with calculating WARP (from basketball-prospectus)

Post by jkeen39 »

Kevin Pelton wrote:
jkeen39 wrote:When you refer to FG%, are you referring to this formula from your site?

OppFG% = (Teammate TmFGRat/2) / (Lg eFG%/LgFG%)

I also came up with .4770 for that input as follows: (1.0379/2)/(.4873/.4479). Which of those numbers is wrong?
I see what it is now. The Lg eFG% is actually on *unblocked* shots, since blocks are already assumed to provide a rebound opportunity.
Ok so is it just normal eFG% (less blocked shots)? i.e., (FGM + (.5*3FGM))/(FGA-BLK) = (72,218+(12,693*.5))/(161,225-10,086) = .5198.

Then if I plug that in to OppFG%, I get (1.0379/2)/(.5198/.4479) = .4472 - I believe that is the number you had?

However, I'm still off on OppRebOpp%. You said you have .4611. Here is my formula so far (using correct inputs at beginning of OppFG% and TmFTAPos which you had noted errors in previous posts):

OppReb Opp% =(1-.4472)*(1-.0847-0.1298-0.06051)+0.56*((44,472-33,465)/208,413)+50/5040+0.8*10,086/208,413 = .4790

Let me know if you can see which input is wrong. Thanks.
Kevin Pelton
Site Admin
Posts: 104
Joined: Thu Apr 14, 2011 10:05 pm

Re: Help with calculating WARP (from basketball-prospectus)

Post by Kevin Pelton »

We're good on opponent FG%.

Looks like the issue with OppRebOpp is that it should be TmFTAPos * .56 * (1 - LgFT%) instead of that factor involving league-wide FTA%. Basically, it's lower for LeBron because his "team" fouls so rarely.
jkeen39
Posts: 21
Joined: Mon Feb 03, 2014 10:04 pm

Re: Help with calculating WARP (from basketball-prospectus)

Post by jkeen39 »

Kevin Pelton wrote:We're good on opponent FG%.

Looks like the issue with OppRebOpp is that it should be TmFTAPos * .56 * (1 - LgFT%) instead of that factor involving league-wide FTA%. Basically, it's lower for LeBron because his "team" fouls so rarely.
Looks like that did the trick. I now have as follows for OppRebOpp%:

(1-.4472)*(1-.0847-0.1298-0.06051)+(0.56*.0847*(1-.752))+50/5040+0.8*10,086/208,413 = .4611

So looks like we are on the same page there. Thanks for the help.

Now jumping to LeBron's DefRatMajor, I have it as follows, which I think is still higher than your number (I do need to figure out your RebFactor on the defensive side but I think our numbers are close enough so as to not make a significant difference in this case (i.e., explain the full magnitude of why our numbers differ).

I have: (89.737+(((1-.7465)*.4611*.878*1.121)*100)/.96 = 105.46

(I believe you have 104.3). Can you let me know where we differ besides the RebFactor1.
Kevin Pelton
Site Admin
Posts: 104
Joined: Thu Apr 14, 2011 10:05 pm

Re: Help with calculating WARP (from basketball-prospectus)

Post by Kevin Pelton »

Besides the rebound factor, the other thing I left out of the explanation is that whole mess is multiplied by DRtgMinor, not 100. Making those two changes matches everything up, I think.
jkeen39
Posts: 21
Joined: Mon Feb 03, 2014 10:04 pm

Re: Help with calculating WARP (from basketball-prospectus)

Post by jkeen39 »

Kevin Pelton wrote:Besides the rebound factor, the other thing I left out of the explanation is that whole mess is multiplied by DRtgMinor, not 100. Making those two changes matches everything up, I think.
That was it, thanks Kevin! If I use your Reb Factor, I get 104.33 for LeBron, which I think agrees to your calculations. Still have to circle back to that Reb Factor and calculate on my own.

Can you let me know if the following guys match up from the 11-12 Heat (trying to make sure I have the right calculations and not just dumb luck):

Haslem: 106.75
Wade: 105.45
Chalmers: 107.52
Battier: 107.39
jkeen39
Posts: 21
Joined: Mon Feb 03, 2014 10:04 pm

Re: Help with calculating WARP (from basketball-prospectus)

Post by jkeen39 »

Kevin Pelton wrote:
Reb/TmMinorPossessions / ((1 - LgNoScore [Blk% + Stl% + non-steal TO%] - LgFTScore) * (1-LgFG%) + Blk% + LgFTScore * .56 * (1-LgFT%))
I have a few questions on this equation for the RebFactor1 to be used on the defensive side. Let me know if I have the right inputs here

Reb = 492 (total player rebounds?)

TmMinorPossessions - is this the # of defensive possessions of the player (i.e., 5,040 in the case of LeBron?)

Blk% = LgBlk/Lg Pos = 10,086/208,413 = .0484

Stl% = LgStl/LgPos = 15,200/208,413 = .0729

non-steal TO% = (LgPlayerTO - LgSTL)/LgPos = (27,620 - 15,200)/208,413 = .0596

LgFTScore - can you explain what this is? Lg FTM /LG Pos? or something to that effect?
Kevin Pelton
Site Admin
Posts: 104
Joined: Thu Apr 14, 2011 10:05 pm

Re: Help with calculating WARP (from basketball-prospectus)

Post by Kevin Pelton »

Still not quite matching the others ...
jkeen39 wrote: Haslem: 106.75 [106.37]
Wade: 105.45 [104.97]
Chalmers: 107.52 [107.06]
Battier: 107.39 [106.90]
On RebFactor3 ...

Reb and TmMinorPossessions are both at the league level.

The rest should be right.

LgFTScore is a bit of a mystery. It's .117 in my spreadsheet. Not sure if I accidentally pasted the value over the formula at some point. But using that will match things up.
Post Reply