Revision: 2016-11-17

URL: http://bbinsomnia.info/

Date: 2016-11-1

*Miha Peče*

If you’re coming from NBA background, it’s probably normal that you perceive enormous gap between starter and bench player. Demarcation line is quite material, visible in earnings of particular players, and is also often primary reason behind the disappointments and frustrations, which from time to time show up in locker room or even reflect in the game.

In Europe situation is not so polarised (with inevitable exceptions). On the “rich” side of EU basketball, absence of cap limit probably facilitate ills of bench status, and everywhere else quality difference among players is probably smaller and starter status consequently less rigid or influential on distribution of available minutes to share between players.

This observations are just part of broad context from which I derived my curiosity for distribution of playing minutes amongst players. In this exploration my focus is on average playing time for starters and bench players. I will do calculations on 2015-16 season ABA League dataset. For this occasion I will leave out overtimes, as I hope, they will not distort results too much. Maybe I will do follow up latter, which will check this (somehow brave) prediction.

First let’s calculate starters' average minutes per game. Let’s do this in *old* way, purely with SQL.

In [2]:

```
import sqlite3, sys
import pandas as pd
import numpy as np
import texttable as tt
%matplotlib inline
import matplotlib.pyplot as plt
```

In [3]:

```
plt.style.use('ggplot')
conn = sqlite3.connect('../sql/aba_liga2015.sqlite')
```

In [4]:

```
sql_players_lg = "SELECT AVG(MP) FROM scr_game_players WHERE STARTER=1 AND ROUND='regular' AND MP<>0"
c = conn.execute(sql_players_lg)
lg_avg_st_min = c.fetchone()
lg_avg_st_min = lg_avg_st_min[0]
# Converting percentages into seconds and rounding on 2 decimals
lg_avg_st_min = (int(lg_avg_st_min) + (lg_avg_st_min-int(lg_avg_st_min)) * 0.6)
round(lg_avg_st_min, 2)
```

Out[4]:

In ABA League 2015-16 season starter got on average **24:40** min of playing time. If we compare this number with total game minutes for one player (40 min), that is **61,6%** of available time.

Now let's check starter minutes distribution amongst all teams.

In [5]:

```
sql_starters_lg = "SELECT AVG(MP) AS AMP, TM FROM scr_game_players WHERE STARTER=1 \
AND ROUND='regular' AND MP<>0 GROUP BY TM ORDER BY AMP DESC"
c = conn.execute(sql_starters_lg)
lg_start_result = c.fetchall()
# Converting percentages into seconds
lg_avg_st_team_min = []
for amp, tm in lg_start_result:
lg_avg_st_team_min.append([round((int(amp) + (amp-int(amp)) * 0.6), 2), tm])
```

Let's draw result in table first ...

In [6]:

```
tb_teams = tt.Texttable()
tb_teams.header(["Avg. min.", "Team"])
[tb_teams.add_row(x) for x in lg_avg_st_team_min]
print(tb_teams.draw())
```

... and also in bar chart.

In [7]:

```
t1 = [(round(x[0], 2)) for x in lg_avg_st_team_min]
t2 = [x[1] for x in lg_avg_st_team_min]
pos = np.arange(len(t2))
bar_width = 0.85
plt.bar(pos, t1, bar_width, color="blue", align="center")
plt.xticks(pos, t2, rotation=90)
plt.show()
```

Let's also check bench minutes ...

In [8]:

```
sql_bench_lg = "SELECT AVG(MP) AS AMP, TM FROM scr_game_players WHERE STARTER=0 \
AND ROUND='regular' AND MP<>0 GROUP BY TM ORDER BY AMP DESC"
c = conn.execute(sql_bench_lg)
lg_bench_result = c.fetchall()
# Converting percentages into seconds
lg_avg_bnc_team_min = []
for amp, tm in lg_bench_result:
lg_avg_bnc_team_min.append([round((int(amp) + (amp-int(amp)) * 0.6), 2), tm])
```

In [9]:

```
tb_teams_bnc = tt.Texttable()
tb_teams_bnc.header(["Avg. min.", "Team"])
[tb_teams_bnc.add_row(x) for x in lg_avg_bnc_team_min]
print(tb_teams_bnc.draw())
```

In [13]:

```
#Averagge playing time for bench player
avg_lg_bench_min = np.mean([x[0] for x in lg_bench_result])
# Converting percentages into seconds and rounding on 2 decimals
avg_lg_bench_min = (int(avg_lg_bench_min) + (avg_lg_bench_min-int(avg_lg_bench_min)) * 0.6)
round(avg_lg_bench_min, 2)
```

Out[13]:

Bench players got, on average, **15:04** min of playing time per game. Of course, average is dependent on how many players divided the reminder of minutes starters left — it's probably more indicative of how many players is coach using per game.

To complement average team bench minutes we can check total "bench" appearances per team.

In [14]:

```
sql_bench_tot = "SELECT COUNT(*) AS COUNT, TM FROM scr_game_players WHERE STARTER=0 AND ROUND='regular' \
AND MP<>0 GROUP BY TM ORDER by COUNT DESC"
c = conn.execute(sql_bench_tot)
lg_tot_bnc_team_min = c.fetchall()
```

In [15]:

```
tb_teams_tot = tt.Texttable()
tb_teams_tot.header(["# of bench players app.", "Team"])
[tb_teams_tot.add_row(x) for x in lg_tot_bnc_team_min]
print(tb_teams_tot.draw())
```

... or maybe more usable for analysis, how many players per game is coach using.

In [16]:

```
sql_play_per_game = "SELECT COUNT(*) AS COUNT, TM FROM scr_game_players WHERE ROUND='regular' AND MP<>0 \
GROUP BY NumG, TM"
sql_num_play_game = pd.read_sql(sql_play_per_game, conn)
df_num_play_game = sql_num_play_game.groupby(sql_num_play_game['TM']).mean().sort_values('COUNT', ascending=False)
df_num_play_game['COUNT'] = df_num_play_game['COUNT'].apply(lambda x: int(x) + (x-int(x)) * 0.6).round(2)
df_num_play_game
```

Out[16]:

Now, let's calculate standard deviation amongst starters of different teams to see the amount of variation in minutes distribution. Population is small, but hopefully this could serve as kind of auxiliary metric.

I will use Pandas for calculation.

In [17]:

```
sql_pd = "SELECT NAME, MP, TM, STARTER, POSITION FROM scr_game_players WHERE ROUND='regular' "
df_main = pd.read_sql(sql_pd, conn)
teams = ('Union Olimpija', 'Cibona', 'Zadar', 'Budućnost', 'Cedevita', 'Crvena Zvezda', 'Igokea', 'Krka',
'Mega Leks', 'Sutjeska', 'MZT Skopje', 'Partizan', 'Tajfun', 'Metalac')
df_teams = pd.DataFrame()
for team in teams:
df_tmp = df_main[(df_main["TM"] == team) & (df_main["STARTER"]==1) &(df_main["MP"]!=0)]
ser = df_tmp["MP"].describe().round(2)
df_teams[team] = ser
# Axis change and sort by standard deviation
df_teams.transpose().sort_values("std")
```

Out[17]:

How was distribution of minutes in playoff?

In [18]:

```
sql_playoff = "SELECT NAME, MP, TM, STARTER, POSITION FROM scr_game_players WHERE ROUND='playoff' "
df_main = pd.read_sql(sql_playoff, conn)
tm_playoff = ('Budućnost', 'Cedevita', 'Crvena Zvezda', 'Mega Leks')
df_playoff = pd.DataFrame()
for team in tm_playoff:
df_tmp = df_main[(df_main["TM"] == team) & (df_main["STARTER"]==1) &(df_main["MP"]!=0)]
ser = df_tmp["MP"].describe().round(2)
df_playoff[team] = ser
# Axis change and sort by standard deviation
df_playoff = df_playoff.transpose().sort_values("mean")[["mean", "50%"]]
df_playoff['mean'] = df_playoff['mean'].apply(lambda x: int(x) + (x-int(x)) * 0.6).round(2)
df_playoff['50%'] = df_playoff['50%'].apply(lambda x: int(x) + (x-int(x)) * 0.6).round(2)
df_playoff
```

Out[18]:

Let's combine acquired numbers with some personal game impressions and observations.

My first inquiry of minutes distribution last season was motivated with Union Olimpija case, where I had difficulties to follow logic in lineups and player changes during game. Data certainly show more even distribution between starters and bench with comparatively big variability from game to game. Of course, I can't claim that 8.44 standard deviation and 23 minutes per game for starters are numbers, which *per se* reveal this fact. Assessing more comparatively, Olimpija had deep bench with 142 appearances of bench players, and it also had 2nd highest average of bench playing minutes.

Was this dispersion of available minutes harmful for Olimpija's overall standing? I would more agree than disagree with this hypothesis, but I can accept some objective reasons that probably convinced coach Potočnik for this kind of strategy. For instance, he got only two exceptional starters, followed by rather average or in-experienced players. Maybe even more important, he followed also broader team strategy to develop young talents.

You can also make some conclusions for cluster of first three leading teams, which usually have big ambitions in euro-level competitions (Euroleague, Eurocup). Crvena Zvezda and Cedevita had the most balanced distribution of minutes, you could presume that they were resting starters or - with different words - their bench players were good enough for quality level other teams had. Playoff numbers confirm this view, as Cedevita raised average starter minutes considerably and Budućnost stayed on their "max" level (more latter). Mega Leks numbers are skewed a little because of injuries in playoff, and consequently also numbers of Crvena Zvezda, who easily walked through playoff with some blow-out wins. They obviously didn't need a lot of help from starters.

Budućnost is special case. It seems they are more focused on regional ABA League, not so much on Europe level competition, and for sure they don't develop young guys. Consequently, they dominate in regular rounds and disappoint in playoffs. They were also not successful in Eurocup, where they were eliminated in the first round.

Numbers above also detect some teams, which have few or none above-average or average players in roster, and "deep" bench of rarely used players. I remember, for instance, when Zadar played in Ljubljana, their point guard, Cosey Glenn, played the whole game. (They are still using the same strategy in this season, as they played a player for 40 min again already four times.) If combining average starter minutes with standard deviation, I would include in this class also MZT and Metalac, but probably more teams could be positioned here.

Just one remark for the end. To really get more holistic overview of roster minutes distribution, you would have to check also some others metrics. For instance, you would have to get distributions inside particular teams, which I will try next time.

- 2017-11-17. Added conversion from percentages into seconds and calculation for average number of players per team used in one game.