Looking for some help with my site

Home for all your discussion of basketball statistical analysis.
permaximum
Posts: 416
Joined: Tue Nov 27, 2012 7:04 pm

Re: Looking for some help with my site

Post by permaximum »

Calculating PER :

Code: Select all

uPER = (1 / MP) *
     [ 3P
     + (2/3) * AST
     + (2 - factor * (team_AST / team_FG)) * FG
     + (FT *0.5 * (1 + (1 - (team_AST / team_FG)) + (2/3) * (team_AST / team_FG)))
     - VOP * TOV
     - VOP * DRB% * (FGA - FG)
     - VOP * 0.44 * (0.44 + (0.56 * DRB%)) * (FTA - FT)
     + VOP * (1 - DRB%) * (TRB - ORB)
     + VOP * DRB% * ORB
     + VOP * STL
     + VOP * DRB% * BLK
     - PF * ((lg_FT / lg_PF) - 0.44 * (lg_FTA / lg_PF) * VOP) ]

factor = (2 / 3) - (0.5 * (lg_AST / lg_FG)) / (2 * (lg_FG / lg_FT))
VOP    = lg_PTS / (lg_FGA - lg_ORB + lg_TOV + 0.44 * lg_FTA)
DRB%   = (lg_TRB - lg_ORB) / lg_TRB

pace adjustment = lg_Pace / team_Pace

aPER = (pace adjustment) * uPER

PER = aPER * (15 (Legue Average) / lg_aPER)

You can calculate league average and change the  value "15" accordingly in the above formula.

To calculate Win Shares;

Code: Select all

First calculate Offensive Win Shares;

1.Calculate points produced for each player..
2.Calculate offensive possessions for each player. 
3.Calculate marginal offense for each player.  "(points produced) - 0.92 * (league points per possession) * (offensive possessions)"
4.Calculate marginal points per win. 0.32 * (league points per game) * ((team pace) / (league pace))..
5.Credit Offensive Win Shares to the players.  (marginal offense) / (marginal points per win). 

Then calculate Defensive Win Shares;
1. Calculate the Defensive Rating for each player
2. Calculate marginal defense for each player (player minutes played / team minutes played) * (team defensive possessions) * (1.08 * (league points per possession) - ((Defensive Rating) / 100)). 
3. Calculate marginal points per win. The same formula was used above. 0.32 * (league points per game) * ((team pace) / (league pace) .
4. Credit Defensive Win Shares to the players (marginal defense) / (marginal points per win)

Lastly:

Offensive Winshares + Defensive Winshares = Winshares
Don't be afraid. These formulas are simple in fact. You can calculate both of them easily (might take a few days at most for someone WHO knows nothing about these formulas AND Excel) with Excel. You can ask me for help when you're stuck.

As for your website, it's Wordpress. I think you can find a nice mod for what you need but still you need to take the PER and WS values from excel, csv, txt or whatever. You can do this manually or automatically with a PHP bot using "curl" or "file_get_contents", "preg_match_all" and probably a few more functions such as "implode" and "explode".

Good Luck.
permaximum
Posts: 416
Joined: Tue Nov 27, 2012 7:04 pm

Re: Looking for some help with my site

Post by permaximum »

Furthermore if you want an easier solution, I can give you some advice. PER and WS are not really better than linear box-score based metrics. So, if you don't want to spend time trying to calculate those you can develop or use a simple linear box-score metric.

But you should know that even the most advanced metric that's used atm doesn't come close to watching games. That's the mistake most people do when they get into advanced metric stuff and I did that too. Eventually, I found out that these metrics simply try to distribute team performance to players in the team. That's how they come with those formulas. So in my further experiments, I learned that for new teams or teams with lots of player in-outs these metrics suffered enormously. Also, most of them (except VORP, WAR) don't account for player's ability play for long minutes since they're possession or minute based. So you can't rely on them to judge players who you haven't seen play yet.

Let's take Kobe Bryant for example. This is all I would check as far as analytics goes.
25.0 PPG
4.7 AST
5.3 RB
1.4 STL
0.5 BLK
3.0 TOV
TS: 55% (True Shooting Percentage that combines FG%, FT%, 3P% )

I would also like to calculate League Average TS% of his time. But I guess it should be around 53.5% because in 1997-2005 it was more or less 51%, after 2005 it started to get closer to 55% thanks to rule changes and today's non-physical game with easier defenses. So, Kobe scored 25 PPG at +1.5% over league average TS% and added 4.7 APG, 5.3 RPG, 1.4 SPG, 0.5 BPG, 3.0 TPG.

That's all I need to know.

Edit: I missed something and that's "Pace". Pace is an another important factor. Those stats need to be adjusted for Pace. Otherwise we would unfairly punish players that played for low-paced teams and reward players that played for high-paced teams. Calculating Pace for player career averages can be tricky but it's definetely needed.
ermayduran
Posts: 20
Joined: Thu Mar 17, 2016 4:25 pm
Contact:

Re: Looking for some help with my site

Post by ermayduran »

permaximum great stuff here, thanks so much for your recommendations. I am looking into a mod that I can add to my wordpress site.

I will make use of your thoughts in any case...

Kind Regards,
ermayduran
Posts: 20
Joined: Thu Mar 17, 2016 4:25 pm
Contact:

Re: Looking for some help with my site

Post by ermayduran »

permaximum wrote:Furthermore if you want an easier solution, I can give you some advice. PER and WS are not really better than linear box-score based metrics. So, if you don't want to spend time trying to calculate those you can develop or use a simple linear box-score metric.

But you should know that even the most advanced metric that's used atm doesn't come close to watching games. That's the mistake most people do when they get into advanced metric stuff and I did that too. Eventually, I found out that these metrics simply try to distribute team performance to players in the team. That's how they come with those formulas. So in my further experiments, I learned that for new teams or teams with lots of player in-outs these metrics suffered enormously. Also, most of them (except VORP, WAR) don't account for player's ability play for long minutes since they're possession or minute based. So you can't rely on them to judge players who you haven't seen play yet.

Let's take Kobe Bryant for example. This is all I would check as far as analytics goes.
25.0 PPG
4.7 AST
5.3 RB
1.4 STL
0.5 BLK
3.0 TOV
TS: 55% (True Shooting Percentage that combines FG%, FT%, 3P% )

I would also like to calculate League Average TS% of his time. But I guess it should be around 53.5% because in 1997-2005 it was more or less 51%, after 2005 it started to get closer to 55% thanks to rule changes and today's non-physical game with easier defenses. So, Kobe scored 25 PPG at +1.5% over league average TS% and added 4.7 APG, 5.3 RPG, 1.4 SPG, 0.5 BPG, 3.0 TPG.

That's all I need to know.

Edit: I missed something and that's "Pace". Pace is an another important factor. Those stats need to be adjusted for Pace. Otherwise we would unfairly punish players that played for low-paced teams and reward players that played for high-paced teams. Calculating Pace for player career averages can be tricky but it's definetely needed.

Just curiously asking do you think it would be a doable idea to do a version of the CARMELO project for European basketball at all?

Would it be worth while pulling this off?
Crow
Posts: 10536
Joined: Thu Apr 14, 2011 11:10 pm

Re: Looking for some help with my site

Post by Crow »

A Euro Carmelo estimator system would be a ton of work. To me player similarity systems are better as a secondary background piece than the main player analysis. Carmelo may be a better gauge of rough overall remaining career value than a precise predictor of next season. On average it might do better at team win projection than specific player projection. It will likely miss alot of the change due to coaching impact, role division if there are significant changes and injuries.
Post Reply