Analyzing Stephen Curry’s Play

As a long-time Golden State Warriors fan (go Tim Hardaway and Chris Mullin!), I have been watching the Warriors this season with great interest. 

Stephen Curry has been getting a lot of attention. It is somewhat of a foregone conclusion that he will be the MVP this season, but, I am not completely convinced, in the sense that watching his play, he gets many open looks throughout the process of a game.

I was therefore interested in analyzing his FG% has a function of his shot distance from the basket and the distance of the closest defender on the court.

The NBA has made completing such an analysis somewhat easy with all of its new analytics tools like Shot Tracking but analyzing this question has proven difficult, because the trackers have not measured FG% as a function of two variables, rather, they have produced this statistic as function of each individual variable. One therefore ends up with a table of data as follows:

 

FG%

Distance from Basket (> 10 ft)

Closest Defender Distance

1

56.5

10

NA

2

39.0

15

NA

3

46.9

20

NA

4

46.0

25

NA

5

60.0

30

NA

6

50.0

35

NA

7

36.4

40

NA

8

32.5

NA

0

9

42.4

NA

2

10

50.6

NA

4

11

47.8

NA

6

The “NA” values are the missing values as a result of not having the complete 3D set of data available.

The only way I could see to alleviate this problem was to perform some type of interpolation .

This way, I was able to perform the following surface regression:

stephregress

This regression to the interpolated data points had an R^2 value of: 0.99, so the fit actually was very good.

The actual function for this surface was found to be:

formulasc

where d denotes the closest defender distance, and y denotes the distance from the basket for shots greater than 10 feet.

Using this function and tools from multivariable calculus, we are able to conclude that:

Min FG% = 38.164% at d = 1, y = 15

 

That is, Stephen Curry is expected to have his lowest field goal percentage with the closest defender within 1 foot of him while being within 15 feet of the basket. Certainly, looking at the plot above, we see that his FG% increases as defenders are further and further away. 

This can be also seen from the following contour plot obtained from computing the gradient of FG(d,y) above:

contourplotsteph

What about trends? Well, computing the gradient of FG(d,y), we find that:

\nabla FG = (-6.813-0.6808d+1.0284d^2 + 0.9175 y - 0.3068 d y)\hat{d} + (-0.6783 + 0.9175d - 0.1534d^2)\hat{y}

 The charm of this is that we can now use methods of dynamical systems theory to obtain information about the trends! The vector field \nabla FG is defined on the manifold \mathbb{R}^2 in the sense that it is a mapping: \mathbb{R}^2 \to T\mathbb{R}^2 that assigns to each point m \in \mathbb{R}^2 a vector in T_{m} \mathbb{R}^2. We can also interpret this vector field as the right-hand side of a system of first-order autonomous differential equations.

Motivated by this, we see that the fixed points are thus found to be:

(d_1,y_1) = (0.864142, 10.1679) and (d_2,y_2) = (5.11695,25.4915)

Evaluating the Jacobian matrix in a neigbourhood of (d_1,y_1) we find that the eigenvalues corresponding to this point are: \lambda_1 = -2.21508, \lambda_{2} = 0.192138. That is, the first point is a saddle point. Similarly, the eigenvalues of the second point are found to be: \lambda_1 = 2.21509, \lambda_{2} = -0.192137, which implies that this point is also another saddle point.

So, in terms of trends, there certainly exist orbits where Stephen Curry tends to shoot away from defenders while also keeping a distance of more than 25 feet from the basket. There also exists orbits where he does the opposite. However, the following vector field plot is very illuminating in terms of displaying Steph Curry’s flow during the game:

vecfieldsteph

One sees that there is a tendency for his shots to converge where the defender is at least three feet away at a minimum distance of 25 feet away from the basket. The saddle point behaviour is very evident in the lower left and upper right corners of the vector field plot.

Advertisements

2016 Michigan Primary Predictions

Using the Monte Carlo techniques I have described in earlier posts, I ran several simulations today to try to predict who will win the 2016 Michigan primaries. Here is what I found:

For the Republican primaries, I predict:

Trump: 89.64% chance of winning

Cruz: 5.01% chance of winning

Kasich: 3.29% chance of winning

Rubio: 2.06% chance of winning

The following plot is a histogram of the simulations:

trumpRepubs