Category Archives: Uncategorized
NFL Picks – Week 12
Arizona at Atlanta
Prediction: Falcons 24-23 (50.9%)
Pick: Falcons +4
Total: Under 50.5
Cincinnati at Baltimore
Prediction: Ravens 22-21 (50.4%)
Pick: Bengals +4.5
Total: Over 40.5
Jacksonville at Buffalo
Prediction: Bills 24-18 (65.6%)
Pick: Jaguars +7.5
Total: Under 45.5
Tennessee at Chicago
Prediction: Bears 23-20 (57.9%)
Pick: Bears +3.5
Total: Over 43
NY Giants at Cleveland
Prediction: Giants 23-22 (52.7%)
Pick: Browns +7
Total: Over 44.5
Washington at Dallas
Prediction: Dallas 26-22 (60.4%)
Pick: Washington Football Team +7
Total: Under 51
Kansas City at Denver
Prediction: Broncos 23-19 (59.6%)
Pick: Broncos -3.5
Total: Over 39.5
Minnesota at Detroit
Prediction: Lions 22-20 (55.4%)
Pick: Vikings +2.5
Total:Under 43
San Diego at Houston
Prediction: Texans 23-21 (54.2%)
Pick: Texans EVEN
Total: Under 45.5
Pittsburgh at Indianapolis
Prediction: Steelers 24-23 (51.0%)
Pick: Colts +3.5
Total: Under 49.5
San Francisco at Miami
Prediction: Dolphins 23-19 (59.0%)
Pick: 49ers +7.5
Total: Under 45.5
Los Angeles at New Orleans
Prediction: Saints 26-21 (63.0%)
Pick: Rams +7
Total: Over 45.5
New England at NY Jets
Prediction: Patriots 24-22 (56.9%)
Pick: Jets +8
Total: Under 47
Carolina at Oakland
Prediction: Panthers 23-21 (55.1%)
Pick: Panthers +4
Total: Under 50
Green Bay at Philadelphia
Prediction: Packers 24-23 (50.2%)
Pick: Packers +3.5
Total: Under 47.5
Seattle at Tampa Bay
Prediction: Seahawks 24-19 (62.3%)
Pick: Buccaneers +5.5
Total: Under 45
Fun with Benford’s law: Election 2016 edition: What’s up with Iowa and Mississippi
Update 11-11-2020: I’ve had a lot of comments on this post since Biden beat Trump in the 2020 election. And I’ll probably mess around with the data when the final totals are certified. Until then, @standupmaths, posted an excellent video explaining Benford’s Law in relation to the 2020 election. He explains when Benford’s Law can be applied and when it can’t, and he gives a great example of data from Chicago (the best city in America). In the video, he also mentions a paper, which I have downloaded and posted here for everyone to read because academic work shouldn’t sit behind paywalls: benfords_law_and_the_detection_of_election_fraud. Once again, as I said in the original post, there is no evidence of election fraud in either 2016 or 2020. The only fraud in these election is Donald Trump who never won the popular vote. #sickburn Fuck Trump.
Original post:
Before I begin this post, I need to make it clear to the conspiracy lunatics out there that this is not evidence that the 2016 election was rigged. As of right now, there is basically no evidence that this election was anything other than a massive, but fair, fuck up by the American people. Could the election have been rigged? Sure. Anything, no matter how unlikely is possible in the world we live in now. (I mean Donald Trump a racist, xenophobic, misogynist, was elected president of the United States of America, which was basically an impossibility like 3 weeks ago.) But let me again say there is no evidence that the election was rigged. And that includes this post.
Ok, now that we have that out of the way, let’s talk about Benford’s Law (tip of the hat to @mulderc for this idea). Benford’s law states that in a list of numbers the leading digits does not appear uniformly. The digit 1 is expected to be first about 30% of the time, while the digit 9 is expected to be first only about 4.5% of the time. Specifically, for a digit d between 1 and 9, the probability that number appears first is given by the following formula:
So let’s apply this to the 2016 election. I downloaded data on the 2016 election at the county level from here. Using all of the data for each of the candidates I get the following two plots. The height of the bar is what is actually observed and the red dots are what is to be expected by Benford’s law. It really is amazing how well this distribution fits the data.


And if we go back to 2012, we see exactly the same thing. Amazing. Benford’s Law seems so counterintuitive, but it’s observed in so many different places.


Next I wanted to look at individual states. This is problematic for at least a few reasons. Most notably, there are a some states that have very few counties in them (e.g. Massachusetts, Alaska, etc.). So I went ahead and tested each state with at least 30 counties individually to see if their votes followed Benford’s Law. I also went a step further, as Benford’s law can be extended to the first two digits, three digits, etc. Below are the results of individual state goodness-of-fit tests for Benford’s law for 1-4 digits using a Bonferroni correction to control the family-wise error rate (FWER). States where the null hypothesis is rejected for Trump and Clinton are colored red and blue, respectively. States where the null is rejected for both Clinton and Trump are colored purple. I’m pretty sure I shouldn’t even be doing a Benford’s goodness of fit on the first 3 or 4 digits when I only have 30 observations. But I did it anyway. I’d pay more attention to the plots for the digits 1 and 2. On those plots we see that the null hypothesis for Trump’s totals in Iowa and Mississippi was rejected for 1 digit and for 2 digits the null was rejected in Mississippi only. Let’s go look at Iowa and Mississippi in more detail.

If we look at Trump’s and Clinton’s vote totals in Iowa, we get the plot below. This is significantly different than Benford’s Law with a p-value of 0.0205.

Next I looked at each candidates vote totals individually. The departure from Benford’s Law is entirely driven by Trump’s vote totals. Trump has way less 1’s than expected and more than expected for 2 through 5.


Before you go flipping out about how this is evidence of election fraud, you should look at Iowa from 2012. Basically we see the same thing with the Republican candidate. Too few 1’s and more 2’s and 4’s than we expect. My guess as to what is happening here is that the types of counties that Republicans are winning in Iowa are not expected to follow Benford’s law? Is that plausible? But I’d love to hear other ideas as to what is happening in Iowa.


Now let’s look at Mississippi. When we look at Clinton and Trump together, there is nothing significant. Though we do see far fewer 1’s than expected, just like in Iowa.

When we look at Trump and Clinton individually, we see that Clinton’s vote totals are not significantly different than Benford’s Law expects, but Trump’s are very different again with far too few 1’s and way too many 4’s.


Finally, here are the plots for test for 2012 using a Bonferroni correction to control the FWER. Iowa shows up again when d=1, but Oregon shows up when d=2.

In conclusion, Benford’s law is fun and there’s something weird about Iowa and Mississippi.
Cheers.
2016 Presidential Election Maps
Well, the 2016 presidential election is over and Donald Trump is going to be the president of the United States. (How do I feel about that? Here are my open letters to Donald J Trump and the American people.)
You’ve probably seen a map that looks like this a bunch of times showing which candidate won each state. It tells an interesting story about the United States in 2016 in that it is a nice summary of the idea that there are two America’s. One exists largely on the east and west coasts and the other exists basically in the middle of the United States.

What I dislike about this plot is that it is far too simplistic. A better way to look it would be to shade in the state on a scale of red to blue. That would look like this. America isn’t really red and blue, it’s very purple. One problem with this plot is that we don’t get any idea of the population in each of these states.

I added in the population by using the opaqueness and that plot looks like this. Again, America isn’t really red and blue, it’s purple.

These plots are nice, but I’d like to drill down further. So I downloaded data from Kaggle’s Data sets for the 2016 election at the county level to make this plot. I much prefer this plot with a color scale for percentage of votes in each county, rather than giving each county to one candidate or the other. The percentages here are computed by only considering votes cast for the two major party candidates and then calculating what percentage each of those two candidates received. You’ll notice that the west coast and east coast are not surprisingly mostly blue and the middle of the country is red. Some interesting exceptions are New Mexico, Arizona, and Colorado are much bluer than the other states that surround them. There is also an interesting band of blue in the south that runs from North Carolina west through South Carolina, Georgia, Alabama, and Mississippi. I can’t explain that, but I’d love to hear theories about that. It’s also interesting to see just how purple the upper midwest is in states like Wisconsin, Iowa, and Minnesota.

However, there are problems with this map too as it’s difficult to see the population of these counties as they are all presented as the same. So in the next plot, I’ve used the opaqueness to show more populated counties and less populated counties are more translucent. That plot looks like this below. You can see from this plot not only the percentage of votes in each county, but also the population in those counties. The most notable aspect of this plot is how much less red there is in this plot. That’s a result of the red counties having much smaller populations than other counties. I really, really like this plot. 
Next I wanted to look at third party candidates by county and you get this. You’ll see that Utah was the predominant state that voted for a third party candidate (Evan McMullin) as well as New Mexico (Gary Johnson) and parts of Idaho (McMullin).

Drilling down into individual third parties you can wee who was voting for Gary Johnson. This was primarily centered in New Mexico, where Johnson is a former governor. Johnson had very little support in the south.

Jill Stein did well in a few places in the United states, however, she failed to make it on the ballot in all 50 states. The big pockets of Stein support are the northern coast of California and parts of Colorado. I really like the juxtaposition of Vermont and New Hampshire next to each other.

Finally, here is a plot of McMullin support that was primarily in Utah and southern Idaho, which are heavily Mormon areas of the country. There also seems to be moderate support for McMullin in Minnesota.

If you are interested in the code, you can find it here. And the data is from here.
Cheers.
Mad about Trump winning the electoral college, but losing the popular vote? Check out John Quincy Adams and Rutherford B. Hayes.
I’m still nauseous from the giant screw up America just made electing an entitled, unqualified man baby to be the leader of the free world. The only thing that settles my stomach is looking at data. (Or should I say daTUMS. Pun very much intended.)
So what I wanted to look at today was the relationship between the popular vote and the electoral vote. So I got data from the most reputable source on the internet, Wikipedia. The plot below shows the popular vote percentage margin of victory for the winner on the x-axis (negative numbers if they lost the popular vote) against the percentage of the electoral college that they received. Kind of a confusing relationship. In the past, some ten point victories have garnered only about 60% of the electoral college votes whereas more recently with Reagan a 10 point victory got him about 90% of the electoral votes. Next, notice Trump on the left of the plot. Trump got nearly 60% of the electoral college votes and lost by 1.7% (and still growing….). What’s really alarming about this is that two other presidents have actually lost the popular vote WORSE than Trump and still been elected. John Quincy Adams actually lost both the popular vote AND got less electoral votes, but since no one got a majority of electoral college votes the decision of who would be president went to the Congress and they chose Adams even though Jackson got about 11% more of the popular vote and 11 more electoral votes than Adams. How angry would Twitter be if that happened today (Answer: very angry). In 1876, Hayes lost the popular vote by about 3 percentage points, but squeaked out a 185 to 184 win in the electoral college (with turnout at 81.8%!). Next in line on the list of presidents who lost the popular vote is none other than Donald Trump, who lost by almost 2% but got a greater percentage of the electoral votes than George W. Bush did in either of his victories. So we actually have seen presidents who lost the popular vote by more than Trump, but not since the late 1800s. 
Next I looked at vote margin against the percentage of the electoral college. No one has ever lost the popular vote my more votes that Trump and it’s not even close. Of course, it’s not really a fair comparison to compare Trump to Hayes, but when Bush lost the popular vote to Gore, it was at least relatively close. Trump is going to end up losing the popular vote by possible 2 million votes. That’s a lot of people.

Here is what that plot looks like if you zoom in on the origin. There is Donald Trump way out to the left by himself nearly 2 million votes behind Clinton. 
Cheers.
NFL Picks – Week 11
New Orleans at Carolina
Prediction: Panthers 27-23 (59.7%)
Pick: Panthers -3.5
Total: Under 51.5
Buffalo at Cincinnati
Prediction: Bengals 23-20 (59.2%)
Pick: Bengals -3
Total: Under 47
Pittsburgh at Cleveland
Prediction: Steelers 25-21 (60.0%)
Pick: Browns +9
Total: Under 49
Baltimore at Dallas
Prediction: Cowboys 23-21 (55.7%)
Pick: Ravens +7
Total: Under 45
Jacksonville at Detroit
Prediction: Lions 25-20 (59.7%)
Pick: Jaguars +6.5
Total: Under 47
Tennessee at Indianapolis
Prediction: Colts 25-21 (59.7%)
Pick: Colts -3
Total: Under 52.5
Tampa Bay at Kansas City
Prediction: Chiefs 24-19 (63.1%)
Pick: Buccaneers +7.5
Total: Under 44
Arizona at Minnesota
Prediction: Cardinals 21-20 (50.1%)
Pick: Cardinals EVEN
Total: Over 41
Chicago at NY Giants
Prediction: Giants 24-21 (58.2%)
Pick: Bears +7
Total: Under 47.5
Houston at Oakland
Prediction: Raiders 21-20 (51.3%)
Pick: Texans +6
Total: Under 46
Philadelphia at Seattle
Prediction: Seahawks 24-19 (64.4%)
Pick: Eagles +6.5
Total: Under 44.5
New England at San Francisco
Prediction: Patriots 25-21 (60.0%)
Pick: 49ers +13.5
Total: Under 51
Miami at Los Angeles
Prediction: Rams 21-20 (53.2%)
Pick: Rams -1
Total: Over 40.5
Green Bay at Washington
Prediction: Packers 25-23 (56.0%)
Pick: Packers +2.5
Total: Under 50.5
NFL Playoff Probabilities – Week 10
|
NFL Rankings – Week 10
I have two rankings systems “Prosp” and “Retro”. “Prosp” is based on 5 years of data with a very steep weighting curve. “Retro” is based entirely on the current season and strength of schedule.
|
Let’s all agree to blame Florida
How close was Clinton to winning this election? If 59,886 people in Florida switched from Trump to Clinton, Clinton would be president right now. If that sounds like a lot of people, remember that over 9 million people in Florida voted for either Trump or Clinton. And nationally 121,410,869 people voted for either Trump or Clinton. So those 59,886 people in Florida represent 0.04932507% of the people who voted nationally. Also, if 59,886 people sounds like a lot, also remember that Clinton got almost ONE MILLION more votes than Trump nationally. The electoral college is stupid and it needs to be thrown out. EVEN TRUMP THINKS THIS!!!
NFL Picks – Week 10
San Francisco at Arizona
Prediction: Cardinals 24-18 (66.5%)
Pick: 49ers +13.5
Total: Under 47
Cleveland at Baltimore
Prediction: Ravens 24-19 (64.9%)
Pick: Browns +10
Total: Under 45
Kansas City at Carolina
Prediction: Panthers 22-20 (57.5%)
Pick: Chiefs +3
Total: Under 44
Houston at Jacksonville
Prediction: Texans 22-20 (54.9%)
Pick: Jaguars +3
Total: Under 42.5
Seattle at New England
Prediction: Patriots 23-22 (52.9%)
Pick: Seahawks +7.5
Total: Under 49.5
Denver at New Orleans
Prediction: Broncos 25-24 (50.6%)
Pick: Broncos +3
Total: Under 50
Cincinnati at NY Giants
Prediction: Bengals 24-23 (51.9%)
Pick: Bengals -1
Total: Under 47.5
Los Angeles at NY Jets
Prediction: Jets 21-18 (58.3%)
Pick: Jets +1
Total: Over 38.5
Atlanta at Philadelphia
Prediction: Eagles 25-24 (53.7%)
Pick: Falcons +2
Total: Under 49.5
Dallas at Pittsburgh
Prediction: Steelers 25-22 (57.5%)
Pick: Steelers -2.5
Total: Under 50.5
Miami at San Diego
Prediction: Chargers 24-21 (57.0%)
Pick: Dolphins +4.5
Total: Under 49
Chicago at Tampa Bay
Prediction: Buccaneers 23-22 (53.5%)
Pick: Buccaneers +3
Total: Under 45.5
Green Bay at Tennessee
Prediction: Packers 24-20 (60.4%)
Pick: Packers -3
Total: Under 49
Minnesota at Washington
Prediction: Vikings 22-21 (50.2%)
Pick: Vikings +2.5
Total: Over 42