NBA Analytics Dashboard

Here is an embedded dashboard that shows a number of statistical insights for NBA teams, their opponents, and individual players as well. You can compare multiple teams and players. Navigate through  the different pages by clicking through the scrolling arrow below. (The data is based on the most recent season “per-game” numbers.)

(If you cannot see the dashboard embedded below for whatever reason, click here to be taken directly to the dashboard in a separate page.)


The Probability of An Illegal Immigrant Committing a Crime In The United States

Trump has once again put The U.S. on the world stage this time at the expense of innocent children whose families are seeking asylum. The Trump administration’s justification is that:


“They want to have illegal immigrants pouring into our country, bringing with them crime, tremendous amounts of crime.”


I decided to try to analyze this statement quantitatively. Indeed, one can calculate the probability that an illegal immigrant will commit a crime within The United States as follows. Let us denote crime (or criminal) by C, while denoting illegal immigrant by ii. Then, by Bayes’ theorem, we have:

\boxed{P(C | ii) = \frac{P(ii | C) P(c)}{P(ii)}}

It is quite easy to find data associated with the various factors in this formula. For example, one finds that

  1. P(ii |c) = 0.21
  2. P(c) = 0.02
  3. P(ii) = 0.037

Putting all of this together, we find that:

P(C|ii) = 0.1135 = 11.35 \%

That is, the probability that an illegal immigrant will commit a crime (of any type) while in The United States is a very low 11.35%.


Therefore, Trump’s claim of “tremendous amounts of crime” being brought to The United States by illegal immigrants is incorrect.


Note that, the numerical factors used above were obtained from:





The Risk of The 3-Point Shot

As more and more teams are increasing the number of threes they attempt based on some misplaced logical fallacy that this somehow leads to an efficient offense, we show below that it is in fact in a team’s opponent’s interest for a team to attempt as many three point shots as possible.

Looking at this season’s data, let us examine two things. The first thing is the number of points a team’s opponent is expected to score for every three-point shot the other team attempts. We discovered that remarkably, the number of points obeys a lognormal distribution:

\boxed{P(X) = \frac{2.86089 e^{-25.713 (\log (X)-1.3119)^2}}{X}}

This means that for every three point shot your team attempts, the opposing team is expected to score

\boxed{\int X P(X) dX = 1.87475\, -1.87475 \text{erf}(6.75099\, -5.0708 \log (X))}

which comes out to about 3.7495 points. So, for every 3PA by a team, the opponent is expected to score more than 3 points based on the most recent NBA data. Keeping that in mind, we see also by integrating P(x) above that there is a 99.99% probability that the opponent will score more than 2 points for every 3PA by a team, and a 93.693% probability that the opponent will score more than 3 points for every single 3PA by the other team.

This would suggest a significant breakdown of defensive emphasis in the “modern-day” NBA where evidently teams are just interested in playing shot-for-shot basketball, but in a very risky way that is not optimal.

The work so far covered just three-point attempts, but, what are the effects of missing a three-point shot? The number of opponent points per a three-point miss also remarkably obeys a lognormal distribution:

\boxed{P(X) = \frac{2.81227 e^{-24.8464 (\log (X)-1.7605)^2}}{X}}

Therefore, for every three-point shot your team misses, the opposing team is expected to score:

\boxed{\int X P(X) dX = 2.93707\, -2.93707 \text{erf}(8.87571\, -4.98461 \log (X))}

which comes out to about 5.87345 points. This identifies a remarkable risk to a team missing a three-point shot. This computation shows that one three-point shot miss corresponds to about 6 points for the opposing team! Looking at probabilities by integrating the density function above, one can show that there is a 99.9999% probability that the opposing team would score more than two points for every three-point miss, a 99.998% probability that the opposing team would score more than three points for every three-point miss, a 99.583% probability that the opposing team would score more than four points for every three-point miss, and so on.

What these calculations demonstrate is that gearing a team’s offense to focus on attempting three-point shots is remarkably risky, especially if a team misses a three-point shot. Given that the average number of three-point attempts is increasing over the last number of years, but the average number of makes has relatively stayed the same (See this older article here:, teams are exposing themselves to greater and greater risk of losing games by adopting this style of play.




New Article Published in Journal of Geometry and Physics

Our new article was recently published in The Journal of Geometry and Physics. It is shown that under certain conditions, The Einstein Field Equations have the same form as a fold bifurcation seen in Dynamical Systems theory, showing even a deeper connection between General Relativity and Dynamical Systems theory! (You can click the image below to be taken to the article):

An Equation to Predict NBA Playoff Probabilities

Based on a previous paper I wrote that used machine learning to determine the most relevant factors for teams making the NBA playoffs, I did some further analysis in an attempt to come up with an equation that outputs the probability of an NBA team making the playoffs in a given season.

From the aforementioned paper, one concludes that the two most important factors in determining whether a team makes the playoffs or not is its opponent assists per game and opponent two-point shots made per game. Based on that, I came up with the following equation:

\boxed{P(playoffs) = 0.49 \left[ \frac{1}{1 + \exp\left(-7.6683 +0.2489 o2P   \right)   }   \right] + 0.51 \left[ \frac{1}{1 + \exp\left(-9.1835 +0.4211 oAST   \right)   }   \right]}

A plot of this equation is as follows:


A contour plot is perhaps more illuminating:


One can see from this contour plot that teams have the highest probabilities of making the playoffs when their opponent 2-point shots and opponent assists are both around 20. In general, we also see that while a team can allow more opponent 2-point shots, having a low number of opponent assists per game is evidently the most important factor.


Using this equation, I was able to classify 71% of playoff teams correctly from the last 16 years of NBA data. Even though the playoff classifier developed in the paper mentioned above is more accurate in general, those methods are non-parametric, so, it is difficult to obtain an equation. To get an equation as we have done here, can be extremely useful for modelling purposes and understanding the nature of probabilities in deciding whether a certain team will make the playoffs in a given season. (Also: note that we are using the convention of using 0.50 as the threshold probability, so a probability output of >0.5, is classified as a team making the playoffs.)

When is it optimal to shoot a 3-Point Shot

A very interesting result: computing payoffs of players, the following is a diagram that shows when it is optimal for a player to shoot a 2 point or a 3-point shot. One sees that it is hardly ever optimal for a player to shoot a 3-point shot, since the region corresponding to 3-point optimality is quite narrow. This can be interpreted as saying that for a 3-point attempt to be optimal, a player’s 2PT% must be roughly equal to his/her 3PT%, which is certainly not the case for the vast majority of even designated 3-point shooters in the NBA!

The grey region is where shooting a 3-point shot is optimal, the blue region is where shooting a 2-point shot is optimal, and the red line that separates these boundaries is where the payoff is equivalent in both approaches.

Lectures on Nonlinear Dynamical Systems 

Here is a link to my lectures on nonlinear dynamical systems given at York University during the Winter semester of 2017. 

These lectures start off with manifold theory, and end with examples in biology, game theory, and general relativity/cosmology.