Tuesday, December 9, 2014

Catch & Shoot vs Pull Up and the risk of binning

Hi everyone,
a short note as I observed several articles making use of data binning. I am not saying that binning is automatically wrong, but it has at least one important potential flaw.

Let's use the catch & shoot vs pull up shooting percentage as an example. It is shown that catch and shoots are generally more open than pull ups. Furthermore, let us say that we define an uncontested shot as any shot where no defender is in a distance of 6 feet (that is binning).
Now, a study might find that uncontested catch and shoot attempts have a higher FG% than uncontested pull ups. But, if we now compare hypothetical distributions for both shot types
we can clearly see that the mean weight is not the same for catch & shoot and pull ups. 
Both for contested and uncontested shots, hypothetical pull up shots are clearly more contested.

That's it for right now. Don't say I didn't warn you.
Hannes

Update: I only mentioned the problem, but didn't offer any solution. I never had to work with a problem like this myself, but @neuteufel mentioned Propensity score. I guess there are probably a few more standard procedures, but the most important is that you are aware that open is not necessarily open (that sounds weird...)

Tuesday, December 2, 2014

Looking for soulmates (even though I don't believe in them...)

Hi everyone,

I was using hierarchical clustering quite a bit over the last month.
And two days ago I found this nice R-script, so I combined the data with my clustering.
Short info before it gets self-explanatory:
- Used all players that had at least 10 games and 12 minutes per game
- as the list is too long to show all the names, I will use subclusters where you can find the names
- tried to use minute normalized data (per 36)
- the effective field goal column is not used for clustering. I did not include any FG percentages in the end (for no real reason...)
- If a value is green, that means that there was a division by zero (mostly because the player never drove)
- If you have other interesting data, feel free to send it to me and I'll send you the figures back. Or if you have Matlab I can give you the code as well (probably should clean it beforehand...)

Without further ado (click on the figures to enlarge):

Monday, October 27, 2014

The 42 of the NBA lottery

Hello everybody,

I think I just found the perfect (albeit crazy) solution how we can fix several things that are wrong about the NBA: Let us support the mediocre teams instead of the incompetent!

Before I explain my idea, first the status quo:

  • The goal of every team is to win a title. Therefore, you need to get good players, small markets are the most likely to get good players at the draft. Therefore it is good to be bad.
  • The problem with one good player is, that he is usually not good enough to give you a title. Unless his name is LeBron or Tim Duncan, your typical number one pick does not necessarily lead to being a title contender. Therefore, you need to be bad for several years. Which is not easy if you just drafted a good player
  • Let's face it: A general number one pick cannot make you a title contender. It makes you at best an eighth seed, aka 'the place where you do not want to be'
  • For an eighth seed on the other hand, a number one pick could be exactly what the team needs to make it a title contender
  • Over the last years, I have heard several times that a team is dumb for trying to be a number 8 seed. Examples are the Bucks of the last years, or the Hawks every year. Or the Pacers this year. 'This is a lost year, the team should just give up!' and the likes
  • Last year I heard several times 'these scrappy Suns should deserve the number one pick for trying so hard!'
  • I think that every smart basketball organization can become mediocre in 3 years. Even if the team would play in the depth of hell or any other place in North Dakota (hell actually might give you a huge home court advantage)
  • Furthermore, the lottery system leads to 30% of teams waving the white flag after less than half of the season. Hell, 30% of teams probably even wave the white flag before the season
  • This does not happen in European leagues, du to relegation. The last teams are even the one that fight the hardest to win. I know, this is not possible in the US system that in general likes to have neither poor nor rich people - sorry, I'll stop my bad jokes now...

Wednesday, October 22, 2014

why you do not want to be stuck in the middle

Hi everybody,
just a quickie. Hope it speaks for itself.
Seth Partnow (I'm never sure if that's a spelling mistake), collected some data https://t.co/3hrprry8vR
It's pretty awesome, because it means that I can make interesting plots without an hour-long copy and paste job. Just ask if you feel like looking at a certain aspect of the data.
Back to Morey ball: Morey ball tells us that it makes sense to shot only from the rim or from behind the three point line if possible (sounds intuitive? Ask Byron Scott).
Short side note: I'll try to post something longer about this topic, as it is not as simple as it sounds to get open shots at the rim or from three point land (duh)
Interestingly, there is even a positive correlation for the Morey Ball shots (more shots from 3 or rim means higher effective field goal percentage from there) and a negative correlation for midrange shots (more shots from midrange means lower effective field goal percentage from there). Both with a small but existent correlation of around 0.4 (or -0.4).
Click on me
Cheers,
Hannes

Wednesday, October 8, 2014

Good cops - bad cops in the NBA

Hi everybody,

just a quicky as I stumbled over plus minus data. There are a lot of adjusted Plus Minus (PM) stats, but the idea is always similar: A players PM is obviously related to a teams point differential. So I took all players that had during the season a PM of more than 100 or less than -100 and plotted their PM per minute against the Team +/- per game. I leave the analysis to you.
Enjoy,
Hannes
All Cops

Thursday, October 2, 2014

Why shooting only one free throw would not increase the average value - but slightly change the game

Hi,

just a short one regarding an idea that was first mentioned here:
http://espn.go.com/blog/truehoop/post/_/id/70581/hoopidea-is-one-trip-to-the-free-throw-line-enough
The idea is to change the free throw concept to speed things up. Instead of two free throws that are worth two points, we could as well shoot one free throw worth one point. Or three points, if it's for a three-point foul and so on...
The always amazing Nylon Calculus crew spun it a little further
http://nyloncalculus.com/2014/10/02/shooting-one-free-throw-offense/
calculating that the expected points per free throw attempt would not change (so basically the mean), but the variance would increase (due to less attempts).
My first reaction was to say 'but what about offensive rebounds!? You cannot rebound the first shot!'
This is true, but it doesn't change the math (too bad, I love to be a nitpicker...)

FT% - Free throw percentage of a player
OR% - Offensive rebound percentage
POR - Points we expect after an offensive rebound
Expected points two free throw situation (resulting points multiplied with their probability):
1       *(1-FT%)*FT% +
1       *FT%*(1-FT%)*(1-OR%) +
2       *FT%*FT% +
(1+POR) *FT%*(1-FT%)*OR% +
POR     *(1-FT%)*(1-FT%)*OR%
0       *(1-FT%)*(1-FT%)*(1-OR%)
=2*FT%+OR%*POR-FT%*OR%*POR

Expected points one free throw situation (resulting points multiplied with their probability):
2       *FT% +
POR     *(1-FT%)*OR% +
0       *(1-FT%)*(1-OR%)
=2*FT%+OR%*POR-FT%*OR%*POR

So, even this doesn't change.
The aspect of the game that it would really influence is the 'it is late in the game and we lead by three points' situation.
Because the opponent would not be able to make the first shot and intentionally miss the second shot - as there would be no second shot...

Monday, July 14, 2014

(Part of) How the world cup was won

Hello World,
I haven't written anything in a while (there is this thing called thesis looming...). But today for some reason I do not feel like working (I feel more like drinking Krombacher or something like that). After seeing everybody on the German team running his ass off yesterday (either that or getting punched in the face), I wanted to show a plot related to this. It shows all field players that played in at least 5 games (so you needed to at least reach the quarter finals). The x-axis is minutes per game and the  y-axis kilometer per 90 minutes (as always, click on the image to enlarge).
 
As you can see, there is a clear negative correlation between minutes per game and average speed. But if you focus on those players that played more than 80 minutes per game, you can see that all of Germany's offensive players and full-backs are running a lot. And Boateng and Hummels are also running quite much for centre-backs. (Note: In German full-back and centre-back is simply outside and inside defender - makes way more sense in my opinion...)
Now, I do not want to imply that this is the best way to play. After all, the Finals were super close and Argentina could have won as well. And if your strategy is to defend deep and then try to strike quickly, your offense doesn't need to run that much (so, if you want to bash Messi or brazilian one syllable strikers do it somewhere else please).
BUT, I wanted to show that a big part of the German game style is to run as much as possible as a team.
So, thanks to Schweinsteiger, Müller, Lahm and everybody else for playing great football the last 10 years (Klose since 2002!). I appreciate that you are running your asses off.

Cheers,
Hannes