I've got a big doubt about the calculation of possessions and distribution of them. I mean, I've got two formulas to calculate the total possesions of a team.
In these formulas, "t2p_int" means "2 points attempts", "t3p_int" means "3 points attempts", "tl_int" means "ft attempts", "reb_of" means "offensive rebounds", "reb_def" means "defensive rebounds"
Formula 1:
Code: Select all
hss: home_standard_stats
ass: away_standard_stats"""
teamFGA = int(hss["t2p_int"]) + int(hss["t3p_int"])
teamFG = int(hss["t2p_conv"]) + int(hss["t3p_conv"])
oppFGA = int(ass["t2p_int"]) + int(ass["t3p_int"])
oppFG = int(ass["t2p_conv"]) + int(ass["t3p_conv"])
try:
x = int(hss["reb_of"]) + int(ass["reb_def"])
y = int(hss["reb_of"])/x
z = teamFGA - teamFG
a = 1.07 * y * z
b = 1.07 * (int(ass["reb_of"])/(int(ass["reb_of"]) + int(hss["reb_def"]))) * (oppFGA - oppFG)
return round(0.5 * ((teamFGA + (0.4 * int(hss["tl_int"])) - a + int(hss["turnovers"])) +
(oppFGA + (0.4 * int(ass["tl_int"])) - b + int(ass["turnovers"]))), 2)
except ZeroDivisionError:
print(BCOLORS.FAIL + "Error: División por cero" + BCOLORS.ENDC)
Code: Select all
poss = team_ss["tl_int"]*0.44 + team_ss["t2p_int"] + team_ss["t3p_int"] + team_ss["turnovers"]
If I try to know how I have used these possessions in attack, knowing the % of free throws, two point shots thrown, three point shots thrown or turnovers made it in attack I used the easy formulas to get these values:
%FT = FTA/Total possessions * 100
%2P= 2PA/Total possessions * 100
%3P = 3PA/Total possesions * 100
%TOV = TOV/Total possessions * 100
But after making these calculus, doing the sum of each result always gives me more than 100%, it doesn't matter which formula I use to calculate Total possessions.
Therefore, which one of the two formulas is better to calculate the total of possessions?. How can I calculate the distribution of possessions with the sum of each result gives me 100%?
Right now, I'm calculating %2P, %3P and %TOV and %FT = 100 - %2P - %3P - %TOV