2016 Real-Time Election Predictions

Further to my original post on using physics to predict the outcome of the 2016 US Presidential elections, I have now written a cloud-based app using the powerful Wolfram Cloud to pull the most recent polling data on the web from The HuffPost Pollster, which “tracks thousands of public polls to give you the latest data on elections, political opinions and more”.  This app works in real-time and applies my PDE-solver / machine learning based algorithm to predict the probability of a candidate winning a state assuming the election is held tomorrow.

The app can be accessed by clicking the image below: (Note: If you obtain some type of server error, it means Wolfram’s server is busy, a refresh usually works. Also, results are only computed for states for which there exists reliable polling data. )

 

Will Donald Trump’s Proposed Immigration Policies Curb Terrorism in The US?

In recent days, Donald Trump proposed yet another iteration of his immigration policy which is focused on “Keeping America Safe” as part of his plan to “Make America Great Again!”. In this latest iteration, in addition to suspending visas from countries with terrorist ties, he is also proposing introducing an ideological test for those entering the US. As you can see in the BBC article, he is also fond of holding up bar graphs of showing the number of refugees entering the US over a period of time, and somehow relates that to terrorist activities in the US, or at least, insinuates it.

Let’s look at the facts behind these proposals using the available data from 2005-2014. Specifically, we analyzed:

  1. The number of terrorist incidents per year from 2005-2014 from here (The Global Terrorism Database maintained by The University of Maryland)
  2. The Department of Homeland Security Yearbook of Immigration Statistics, available here . Specifically, we looked at Persons Obtaining Lawful Permanent Resident Status by Region and Country of Birth (2005-2014) and Refugee Arrivals by Region and Country of Nationality (2005-2014).

Given these datasets, we focused on countries/regions labeled as terrorist safe havens and state sponsors of terror based on the criteria outlined here .

We found the following.

First, looking at naturalized citizens, these computations yielded:

Country

Correlations

Percent of Variance Explained 

Afghanistan

0.61169

0.37416

Egypt

0.26597

0.07074

Indonesia

-0.66011

0.43574

Iran

-0.31944

0.10204

Iraq

0.26692

0.07125

Lebanon

-0.35645

0.12706

Libya

0.59748

0.35698

Malaysia

0.39481

0.15587

Mali

0.20195

0.04079

Pakistan

0.00513

0.00003

Phillipines

-0.79093

0.62557

Somalia

-0.40675

0.16544

Syria

0.62556

0.39132

Yemen

-0.11707

0.01371

In graphical form:

The highest correlations are 0.62556 and 0.61669 from Syria and Afghanistan respectively. The highest anti-correlations were from Indonesia and The Phillipines at -0.66011 and -0.79093 respectively. Certainly, none of the correlations exceed 0.65, which indicates that there could be some relationship between the number of naturalized citizens from these particular countries and the number of terrorist incidents, but, it is nowhere near conclusive. Further, looking at Syria, we see that the percentage of variance explained / coefficient of determination is 0.39132, which means that only about 39% of the variation in the number of terrorist incidents can be predicted from the relationship between where a naturalized citizen is born and the number of terrorist incidents in The United States.

Second, looking at refugees, these computations yielded:

Country

Correlations

Percent of Variance Explained

Afghanistan

0.59836

0.35803

Egypt

0.66657

0.44432

Iran

-0.29401

0.08644

Iraq

0.49295

0.24300

Pakistan

0.60343

0.36413

Somalia

0.14914

0.02224

Syria

0.56384

0.31792

Yemen

-0.35438

0.12558

Other

0.54109

0.29278

In graphical form:

We see that the highest correlations are from Egypt (0.6657), Pakistan (0.60343), and Afghanistan (0.59836). This indicates there is some mild correlation between refugees from these countries and the number of terrorist incidents in The United States, but it is nowhere near conclusive. Further, the coefficients of determination from Egypt and Syria are 0.44432 and 0.31792 respectively. This means that in the case of Syrian refugees for example, only 31.792% of the variation in terrorist incidents in the United States can be predicted from the relationship between a refugee’s country of origin and the number of terrorist incidents in The United States.

In conclusion, it is therefore unlikely that Donald Trump’s proposals would do anything to significantly curb the number of terrorist incidents in The United States. Further, repeatedly showing pictures like this:

at his rallies is doing nothing to address the issue at hand and is perhaps only serving as yet another fear tactic as has become all too common in his campaign thus far.

(Thanks to Hargun Singh Kohli, Honours B.A., LL.B. for the initial data mining and processing of the various datasets listed above.)

Note, further to the results of this article, I was recently made aware of this excellent article from The WSJ, which I have summarized below:

Game 2 of CLE vs GSW Breakdown

As usual, here is the post-game breakdown of Game 2 of the NBA Finals between Cleveland and Golden State. Using my live-tracking app to track the relevant factors (as explained in previous posts) here are the live-captured time series:


Computing the correlations between each time series above and the Golden State Warriors point difference, we obtain:


One sees once again that the most relevant factors to GSW’s point difference in the game was CLE’s personal fouls during the game, GSW’s personal fouls during the game, and not far behind, GSW 3-point percentage during the game. What is interesting is that one can see the importance of these variables played out in real time matching the two graphs above.

In fact, looking at the personal fouls vs. GSW point difference in real time (essentially taking a subset of the time series graph above), we obtain:

graph_1gswgme2

Breakdown of Game 7 between OKC and GSW

Here is the collection of time series of relevant predictor variables captured live during Game 7 of the Western Conference Finals between The Oklahoma City Thunder and The Golden State Warriors:

Another video animation:

Many commentators are making a point to mention how many three point shots The Warriors made, suggesting that that was the main reason why the Warriors won the game. However, the time series above show otherwise. As can be seen above, OKC’s loss of the lead in the game directly corresponds to GSW’s increase in 2PT %. This can be further confirmed by computing the correlations between OKC’s point difference and all of the other predictor variables plotted above:


One can see from these calculations that OKC’s point difference is strongly negatively correlated with the amount of personal fouls they committed during the game, the amount of personal fouls GSW committed during the game, and GSW 2PT% during the game.

Basketball Paper Update

A few weeks ago, I published a paper that used data science / machine learning to detect commonalities between NBA playoff teams. I have now updated and extended it to detect commonalities between NBA championship teams using artificial neural networks, which is a field of deep learning. The paper can be accessed by clicking on the image below.

New Paper on Machine Learning and Basketball

A new and formal paper of mine describing how one can use machine learn methodologies to help determine which NBA teams will make the playoffs is now online: 

  1. arXiv link
  2. SSRN link

Have a look!