## 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:

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:

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:

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:

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.

## 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:

## Stephen Curry and Mahmoud Abdul-Rauf?

As usual, Phil Jackson made another interesting tweet today:

And, as usual received many criticisms from “Experts”, who just looked at the raw numbers from each players, and saw that there is just no way such a statement is justified, but it is not that simple!

When you compare two players (or two objects) who have very different data feature values, it is not that they can’t be compared, you must effectively normalize the data somehow to make the sets comparable.

In this case, I used the data from Basketball-Reference.com to compare Chris Jackson’s 6 seasons in Denver to Stephen Curry’s last 6 seasons (including this one) and took into account 45 different statistical measures, and came up with the following correlation matrix/similarity matrix plot:

Dark blue circles indicate a strong correlation, while dark red circles indicate a weak correlation between two sets of features.

What would be of interest in an analysis like this is to examine the diagonal of this matrix, which offers a direct comparison between the two players:

One can see that there are many features that have strong correlation coefficients.

Therefore, it is true that Stephen Curry and Chris Jackson do in fact share many strong similarities!

## The Effect of Individual State Election Results on The National Election

A short post by me today. I wanted to look at the which states are important in winning the national election. Looking at the last 14 presidential elections, I generated the following correlation plot:

For those not familiar with how correlation plots work, the number bar on the right-hand-side of the graph indicates the correlation between a state on the left side with a state at the top, with the last row and column respectively indicating the national presidential election winner. Dark blue circles representing a correlation close to 1, indicate a strong relationship between the two variables, while orange-to-red circles representing a correlation close to -1 indicate a strong anti-correlation between the two variables, while almost white circles indicate no correlation between the two variables.

For example, one can see there is a very strong correlation between who wins Nevada and the winner of the national election. Indeed, Nevada has picked the last 13 of 14 U.S. Presidents. Darker blue circles indicate a strong correlation, while lighter orange-red circles indicate a weak correlation. This also shows the correlation between winning states. For example, from the plot above, candidates who win Alabama have a good chance of winning Mississippi or Wyoming, but virtually no chance of winning California.

This could serve as a potential guide in determining which states are extremely important to win during the election season!

## A Series of Lectures on Fine-Tuning in Biology

A recent lecture and a series of interviews has been posted online where cosmologist George F.R. Ellis discusses the issue of fine-tuning in biology at considerable length and in considerable detail. Of course, the larger theme here is that to discuss and understand things like Darwinian evolution properly, one needs to have an understanding of the underlying physics, as it is laws of physics that allow life to emerge and for Darwinian evolution to occur in the first place. Here are the lectures:

## Notes on Dynamical Systems

A big part of my research involves dynamical systems theory. A lot of people don’t know what this is, at least, they don’t have a very good idea. It has not helped that the vast majority of Canadian university physics programs have deemphasized classical mechanics and differential equations, but that is an another story!

Anyways, here are some notes describing what they are and how they work.