tag:blogger.com,1999:blog-67749914472413522532017-05-31T23:47:42.790-07:00GaryBooneGary Boonenoreply@blogger.comBlogger3125tag:blogger.com,1999:blog-6774991447241352253.post-79781331991866983302016-11-07T15:30:00.002-08:002016-11-07T15:37:54.281-08:00<br /><span style="font-family: inherit;">The US Presidential election is tomorrow. Here's the final run of my Monte Carlo Presidential Election Simulator (code <a href="https://github.com/GaryBoone/PresidentialMonteCarlo" target="_blank">here</a>):</span><br /><blockquote class="tr_bq"><br /><span style="font-family: "courier new" , "courier" , monospace;">Election 2016 Monte Carlo Simulation<br />Run date: Monday Nov 7 2016 14:59:07<br />There are 1 days until the election. </span></blockquote><blockquote class="tr_bq"><span style="font-family: "courier new" , "courier" , monospace;">Collecting survey data for the great states of NE, ND, MS, ID, SD, IN, MA, KY, LA, AR, RI, MT, OR, GA, AL, OH, MI, IA, HI, DC, PA, WI, MD, CT, FL, NM, WV, UT, KS, CO, TX, NJ, DE, OK, MO, SC, NV, AZ, NY, VT, ME, IL, TN, WY, VA, WA, AK, MN, NH, CA, NC. </span></blockquote><blockquote class="tr_bq"><span style="font-family: "courier new" , "courier" , monospace;">Swing States:<br />Probability of Clinton winning OH: 10.44%<br />Probability of Clinton winning IA: 0.02%<br />Probability of Clinton winning PA: 99.72%<br />Probability of Clinton winning WI: 97.13%<br />Probability of Clinton winning FL: 88.54%<br />Probability of Clinton winning CO: 99.84%<br />Probability of Clinton winning NV: 69.71%<br />Probability of Clinton winning VA: 100.00%<br />Probability of Clinton winning NH: 100.00%<br />Probability of Clinton winning NC: 99.94%<br />12 states have no polls, so were assigned 2012 outcomes </span></blockquote><blockquote class="tr_bq"><span style="font-family: "courier new" , "courier" , monospace;">Clinton election probability: 99.97%<br />Trump election probability: 0.03%<br />Average electoral votes for Clinton: 323<br />Average electoral votes for Trump: 215</span></blockquote><br /><span style="font-family: inherit;">The results have been consistent throughout the election season. At no point did Trump have any probability of winning. Florida has moved back and forth; as of today, it is strongly predicted to go to Clinton.</span><br /><span style="font-family: inherit;"><br /></span><span style="font-family: inherit;">One note: t<span style="font-family: "times" , "times new roman" , serif;">his simulation has consistently predicted greater certainty of a Clinton win (99.97%)</span> than other electoral college simulators such as the one at <a href="http://projects.fivethirtyeight.com/2016-election-forecast/" target="_blank">FiveThirtyEight's Election Forecast</a> (69.2%), <a href="http://elections.dailykos.com/app/elections/2016" target="_blank">Daily Kos Election 2016</a> (88%). It turns out that there's a reason for that: some of these sites put their finger on the scale!</span><br /><span style="font-family: inherit;"><br /></span><span style="font-family: inherit;">From this article, <a href="http://www.dailykos.com/story/2016/10/11/1580911/-How-bad-is-it-for-Donald-Trump-Let-s-do-the-math">How bad is it for Donald Trump? Let's do the math</a>:</span><br /><br /><blockquote class="tr_bq">These histograms—and the chances of Clinton winning—are different from what each model is <a href="http://www.nytimes.com/interactive/2016/upshot/presidential-polls-forecast.html#other-forecasts" target="_blank">actually reporting</a> as their national-level forecast because, like us, none of the other forecasters assume that state election outcomes are independent. If the polls are wrong, or if there’s a national swing in voter preferences toward Trump, then his odds should increase in many states at once: Nevada, Ohio, Florida, and so forth.</blockquote><br /><span style="font-family: inherit;">This is saying that the data and modeling are providing a clear result, but the forecasters are modifying the results because, they say, the separate state models shouldn't be treated as independent. So they modify the results to include other states' results.</span><br /><span style="font-family: inherit;"><br /></span><span style="font-family: inherit;">That's a nonsensical thing to do for a couple of reasons. First, all it does is regress results to the mean. But of course, there's no precise way to guess how much one state's vote should influence another, so this isn't modeling; it's guessing, straying away from the data and the science to influence the result in an unprincipled way.</span><br /><span style="font-family: inherit;"><br /></span><span style="font-family: inherit;">Worse, though, such adjustments forget that the data <i>already contains the non-independent data.</i> When voters answer pollsters' questions, they already know about national polls, national news, candidates' news, and as much statewide and nearby state news as they're interested to know. Of course they factor all of this available information into their answers to pollsters about their candidate choice. There's no need to try to add it in later. </span><br /><span style="font-family: inherit;"><br /></span><span style="font-family: inherit;">The <a href="http://elections.huffingtonpost.com/2016/forecast/president" target="_blank">Huffington Post's 2016 President Forecast</a>, which provides the polling data for my simulation, is closer at 98.2%. That could be because we're using the same data, but also likely means they aren't including national polls or other non-state data in their state probability estimates. Both Huffington Post and my simulation predict 323 Electoral College votes for Clinton.</span><br /><div><br /></div><span style="background-color: white; box-sizing: border-box; color: #3c3736; font-family: "open sans"; font-size: 16px; letter-spacing: 0.125px;"><br /></span>Gary Boonehttps://plus.google.com/110164642453700713590noreply@blogger.com0tag:blogger.com,1999:blog-6774991447241352253.post-48804522428483430962016-06-20T14:41:00.000-07:002016-06-20T15:12:52.916-07:00Hillary Clinton will be the next president<div style="font-family: 'Helvetica Neue'; font-size: 14px;">On November 8, 2016, Hillary Clinton will be elected the 45th president of the United States. As sure as the sun will rise tomorrow, you can be certain of it. This fact isn’t something you’ll read about in the media for the simple reason that there’s no news in the sun rising tomorrow. The media reports contests and races, not the ordinary and obvious. So how can we be sure that Clinton winning is so obvious, given the daily barrage of head-to-head polling and pundit analysis? Simple: history and math. </div><div style="font-family: 'Helvetica Neue'; font-size: 14px;"><br /></div><div style="font-family: 'Helvetica Neue'; font-size: 14px;">To understand why, you just need to understand a few facts about US elections and how to interpret polls. </div><div style="font-family: 'Helvetica Neue'; font-size: 14px;"><br /></div><h2 style="font-family: 'Helvetica Neue'; font-size: 14px;">1. Electoral College</h2><div style="font-family: 'Helvetica Neue'; font-size: 14px;">First, remember that presidential elections in the US are decided by the electoral college, not by popular vote. This means that there are 51 winner-take-all contests. That is, there are 50 states plus the DC in which the winner of the most votes receives all of the electoral college votes. So, for example, whoever wins the most votes in Hawaii wins all of Hawaii’s 4 votes. </div><div style="font-family: 'Helvetica Neue'; font-size: 14px;"><br />What’s interesting about the electoral college system is that it means that presidential elections are decided by how the electoral college votes combine to create a winner. There are only a finite number of ways that electoral college votes can combine to exceed 270, the winning number of votes, for one candidate.<br /><br /></div><h2 style="font-family: 'Helvetica Neue'; font-size: 14px;">2. Swing states</h2><div style="font-family: 'Helvetica Neue'; font-size: 14px;">But we don’t have to consider every possible way that <i>50</i> states & DC can combine. It’s much simpler because most we already know how most of the states will vote. </div><div style="font-family: 'Helvetica Neue'; font-size: 14px;"><br /></div><div style="font-family: 'Helvetica Neue'; font-size: 14px;">Hawaii always votes for the democratic candidate and will this year, too. Of course it’s possible that it could switch and vote republican this year. But we have no history to suggest such an outcome and no polling or news to believe it will switch this year. Similarly, California will give its 55 votes to Clinton. Texas will give its 38 votes to the Republican candidate, which is, at the moment, Trump. That just leaves a few states in which there are contests to watch because their outcomes are less certain. We call these “swing” or “toss-up” states. </div><div style="font-family: 'Helvetica Neue'; font-size: 14px;"><br /></div><div style="font-family: 'Helvetica Neue'; font-size: 14px;">As a result, when we study how the electoral college votes can combine to exceed 270, we actually only have to consider the ways the swing state votes can combine. That fact makes the problem much simpler to analyze. It also means that there’s much more known already about the outcome than just knowing that there are 51 separate elections on November 8. </div><div style="font-family: 'Helvetica Neue'; font-size: 14px;"><br /></div><h2 style="font-family: 'Helvetica Neue'; font-size: 14px;">3. State Relative Sizes</h2><div style="font-family: 'Helvetica Neue'; font-size: 14px;">New Hampshire is considered a swing state, but only has 4 electoral college votes. Florida has 29. This means that there are many electoral college combinations in which New Hampshire or other small swing states go Republican or Democratic. But it just doesn’t matter because Florida (29), Pennsylvania (20), and Ohio (18) are so comparatively dominant. </div><div style="font-family: 'Helvetica Neue'; font-size: 14px;"><br /></div><div style="font-family: 'Helvetica Neue'; font-size: 14px;">The small relative sizes of some of the swing states again further simplifies the problem. We can’t ignore them completely because small states could combine to outweigh a large state. But it means that there is less variation and more known in advance of the election about how it will turn out. </div><div style="font-family: 'Helvetica Neue'; font-size: 14px;"><br /></div><h2 style="font-family: 'Helvetica Neue'; font-size: 14px;">4. Cumulative Probabilities</h2><div style="font-family: 'Helvetica Neue'; font-size: 14px;"><div>Now this is where it really gets interesting. The media loves to report the close polls, but here’s some news: they’re not actually close. </div><div><br /></div></div><div style="font-family: 'Helvetica Neue'; font-size: 14px;">Again, there’s much more known about the outcomes than you would think from seeing the horse-race media reports and reading close polls. It turns out that their outcomes, even with close polling, aren’t actually very uncertain. Here’s why. </div><div style="font-family: 'Helvetica Neue'; font-size: 14px;"><br /></div><div style="font-family: 'Helvetica Neue'; font-size: 14px;">A poll captures an estimate of a random variable. That is, we think there’s some true value of how a state prefers a candidate, say 52% for Clinton, but we don’t know the exact value. The poll includes an estimate of how sure we are of the result, usually loosely called the “margin of error.” Statistically, it looks like this curve, centered on 52%: </div><div style="font-family: 'Helvetica Neue'; font-size: 14px;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://2.bp.blogspot.com/-iMTb4-_Tttw/V2hhd8oa9eI/AAAAAAAAfO4/gZ4ZdJvIwzI1adSSm8b1sAErNuZwazMUQCLcB/s1600/normal_curve.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="192" src="https://2.bp.blogspot.com/-iMTb4-_Tttw/V2hhd8oa9eI/AAAAAAAAfO4/gZ4ZdJvIwzI1adSSm8b1sAErNuZwazMUQCLcB/s320/normal_curve.png" width="320" /></a></div><div style="font-family: "Helvetica Neue"; font-size: 14px; text-align: center;">A normal distribution centered on 52%, with probabilities above 50% shaded. [Diagram <a href="http://toulemon.de/index.php/2016/04/25/brexit-how-tight-is-it-really/" rel="nofollow" target="_blank">source</a>]</div><div><br /></div><div style="font-family: 'Helvetica Neue'; font-size: 14px;">The error is shown by the width of the curve. If we were certain the value was 52%, this curve would so thin that it would contain only 52%. But with our uncertainty, the true value could be 53% or 48%, or, with less likelihood, 44% or 60%. </div><div style="font-family: 'Helvetica Neue'; font-size: 14px;"><br /></div><div style="font-family: 'Helvetica Neue'; font-size: 14px;">Given the poll, we want to estimate the probability of one candidate winning. It’s not the same as the poll result. If the polling is 52% Clinton and 48% Trump, it doesn’t mean that Clinton has a 52% probability of winning. Instead, we use the curve above. It captures are our certainty about various outcomes; we include that information to calculate the probability. For example, the most likely outcome is that the vote is 52% Clinton. With a little less likelihood, it could be 56% Clinton, so we should increase our probability to include that outcome. Similarly, it could be 48% Clinton, in which case she loses, so that should reduce the probability of her winning. There’s a tiny probability that we’re really off and Clinton wins with 60% of the vote; that possibility should increase our estimate a little. </div><div style="font-family: 'Helvetica Neue'; font-size: 14px;"><br /></div><div style="font-family: 'Helvetica Neue'; font-size: 14px;">Mathematically, the correct way to estimate the probability of a candidate winning is to calculate the area under the normal curve above the required value. For our election simulation, we’ll assume two candidates, so the winning value is 50%. How likely is the candidate to exceed 50% is answered by the adding all of the probabilities above 50%. The diagram above shades in grey all of the values above 50% for a candidate who is estimated by polling to win 52% of the vote. The probability of that candidate winning is the percentage of area of the shaded part compared to all of the area under the curve. In this case, the shaded areas occupies 69% of the total area. The candidate has a 69% probability of winning the election. </div><div style="font-family: 'Helvetica Neue'; font-size: 14px;"><br /></div><div style="font-family: 'Helvetica Neue'; font-size: 14px;">That’s amazing! A poll showing Clinton 52% and Trump 48% doesn’t mean she’s barely likely to win the election with a 52% probability. It means she’s very likely to win with about 70% probability. </div><div style="font-family: 'Helvetica Neue'; font-size: 14px;"><br /></div><div style="font-family: 'Helvetica Neue'; font-size: 14px;">Now you might argue that this increase in probability is a mathematical or modeling effect. No, the math is accurately capturing that while there’s uncertainty about the exact outcome, that uncertainty is still leaning toward the positive side. There may be different outcomes, but they’re more likely positive for our 52% candidate. Including all of them in the probability estimate means the positive outcome is much more probable. Intuitively, it’s like balancing: You don’t have to lean very far to move a lot of weight to one side. </div><div style="font-family: 'Helvetica Neue'; font-size: 14px;"><br /></div><div style="font-family: 'Helvetica Neue'; font-size: 14px;">So again, close polling isn’t close; we know more about the outcome than the polls would seem to indicate. </div><div style="font-family: 'Helvetica Neue'; font-size: 14px;"><br /></div><h2 style="font-family: 'Helvetica Neue'; font-size: 14px;">5. Polling Accuracy</h2><div style="font-family: 'Helvetica Neue'; font-size: 14px;">Fourth, while any given poll may have a margin of error of say 4%, we can combine polls and reduce the error. Polling is expensive, so polling companies only call people until they have a representative sample with the desired margin of error. But we can increase certainty for our simulations by aggregating polls. With a few thousand samples, the errors go to near zero. Aggregating across pollsters reduces their systemic bias. </div><div style="font-family: 'Helvetica Neue'; font-size: 14px;"><br /></div><div style="font-family: 'Helvetica Neue'; font-size: 14px;">Now at some point, reducing the margin of error to near zero does become a modeling over-reach because we can never be sure our sample is truly representative of everyone who will actually get off their sofas and vote. And of course, every poll lacks the final and complete information that voters will take into voting booths on November 8th. So aggregating the polling data helps make the best predictions <i>today</i>, or more precisely, given the information we have at the times of the polls. </div><div style="font-family: 'Helvetica Neue'; font-size: 14px;"><br /></div><h2 style="font-family: 'Helvetica Neue'; font-size: 14px;">Summarizing What We Know</h2><div style="font-family: 'Helvetica Neue'; font-size: 14px;">The media reports margins of errors in polls that make them look uncertain. But polls are easily combined to increase certainty. Close polls appear closer than they really are; even a small shift in polling indicates a large increase in the probability that one side will win. We really only have to care about polls in a few states, the swing states. Many of them are small so their polling and outcomes matter less. Most states will vote the way they did last election. There are only a few ways to combine the swing states to reach an electoral college winning total of 270. All of this means that far more is known about the outcome of the election well in advance. </div><div style="font-family: 'Helvetica Neue'; font-size: 14px;"><br /></div><h2 style="font-family: 'Helvetica Neue'; font-size: 14px;">Monte Carlo Simulation</h2><div style="font-family: 'Helvetica Neue'; font-size: 14px;">Finally, we can combine all the available data into a Monte Carlo Simulation to calculate the actual probability of a Clinton or Trump victory. </div><div style="font-family: 'Helvetica Neue'; font-size: 14px;"><br /></div><div style="font-family: 'Helvetica Neue'; font-size: 14px;">Monte Carlo analysis is a method for calculating probabilities when no simpler, closed-form, formula is known. It allows us to calculate probabilities for complex systems such as presidential elections. It works by simulating the system under study enough times that the percentages of outcomes can be considered estimates of the true probabilities. The name Monte Carlo comes from the town with famous casino because the simulations are like repeated throwing dice to see what happens.</div><div style="font-family: 'Helvetica Neue'; font-size: 14px;"><br /></div><div style="font-family: 'Helvetica Neue'; font-size: 14px;">Specifically, the process is:</div><div style="font-family: 'Helvetica Neue'; font-size: 14px;">• Read polling data from the Huffington Post API for each state. </div><div style="font-family: 'Helvetica Neue'; font-size: 14px;">• Transform the polling data into probabilities. Assume that where there's no polling data, the state will vote as it did in 2012.</div><div style="font-family: 'Helvetica Neue'; font-size: 14px;">• Use the probabilities to simulate an election for a state, repeating for all 50 states and DC to create a trial election. The electoral college votes are counted to determine the winning candidate. </div><div style="font-family: 'Helvetica Neue'; font-size: 14px;">• Run 25,000 or more simulated elections, counting how many times each candidate wins. </div><div style="font-family: 'Helvetica Neue'; font-size: 14px;"><br /></div><div style="font-family: 'Helvetica Neue'; font-size: 14px;">The percentage of these wins is then the final probability of the candidate winning. So if Clinton wins 92% of 50,000 trial elections, we conclude she has a 92% chance of winning in November. </div><div style="font-family: 'Helvetica Neue'; font-size: 14px;"><br /></div><div style="font-family: 'Helvetica Neue'; font-size: 14px;">What Monte Carlo simulation does is allow you to find certainty from many uncertain components, such as close state polls. It could be that the overall simulation of combining uncertain components also leads to uncertain outcomes. But what's so interesting in the case of the presidential election is that the simulation shows that the outcome of the 2016 Presidential is certain. Hillary Clinton will win. </div><div style="font-family: 'Helvetica Neue'; font-size: 14px;"><br /></div><div style="font-family: 'Helvetica Neue'; font-size: 14px;">I wrote a 2016 election Monte Carlo Simulation. The code is available <a href="https://github.com/GaryBoone/PresidentialMonteCarlo" target="_blank">here</a>. Here’s an example run:</div><div style="font-family: 'Helvetica Neue'; font-size: 14px;"><br /></div><blockquote class="tr_bq" style="font-size: 14px;"><span style="font-family: "courier new" , "courier" , monospace;">Election 2016 Monte Carlo Simulation<br /></span><span style="font-family: "courier new" , "courier" , monospace;">Run date: Monday Jun 20 2016 11:07:02<br /></span><span style="font-family: "courier new" , "courier" , monospace;">There are 141 days until the election.<br /></span><span style="font-family: "courier new" , "courier" , monospace;"><br /></span><span style="font-family: "courier new" , "courier" , monospace;">Collecting survey data for the great states of IL, WY, IN, WA, NJ, SD, TX, NV, VT, UT, HI, CO, KS, ND, MS, MA, ID, MT, AR, AK, OR, NE, LA, ME, TN, SC, DC, NM, WV, OK, CT, RI, AZ, KY, DE, AL, MN, NY, GA, MI, MD, CA, MO, NC, IA, WI, FL, VA, OH, NH, PA.<br /></span><span style="font-family: "courier new" , "courier" , monospace;"><br /></span><span style="font-family: "courier new" , "courier" , monospace;">Swing States:<br /></span><span style="font-family: "courier new" , "courier" , monospace;">NV has no polls yet, so it is assigned to Clinton based on 2012 outcome.<br /></span><span style="font-family: "courier new" , "courier" , monospace;">CO has no polls yet, so it is assigned to Clinton based on 2012 outcome.<br /></span><span style="font-family: "courier new" , "courier" , monospace;">Probability of Clinton winning NC: 75.69%<br /></span><span style="font-family: "courier new" , "courier" , monospace;">Probability of Clinton winning IA: 99.86%<br /></span><span style="font-family: "courier new" , "courier" , monospace;">Probability of Clinton winning WI: 100.00%<br /></span><span style="font-family: "courier new" , "courier" , monospace;">Probability of Clinton winning FL: 97.44%<br /></span><span style="font-family: "courier new" , "courier" , monospace;">Probability of Clinton winning VA: 98.13%<br /></span><span style="font-family: "courier new" , "courier" , monospace;">Probability of Clinton winning OH: 84.77%<br /></span><span style="font-family: "courier new" , "courier" , monospace;">Probability of Clinton winning NH: 99.78%<br /></span><span style="font-family: "courier new" , "courier" , monospace;">Probability of Clinton winning PA: 100.00%<br /></span><span style="font-family: "courier new" , "courier" , monospace;">35 states have no polls, so were assigned 2012 outcomes<br /></span><span style="font-family: "courier new" , "courier" , monospace;"><br /></span><span style="font-family: "courier new" , "courier" , monospace;">Clinton election probability: 100.00%<br /></span><span style="font-family: "courier new" , "courier" , monospace;">Trump election probability: 0.00%<br /></span><span style="font-family: "courier new" , "courier" , monospace;">Average electoral votes for Clinton: 346<br /></span><span style="font-family: "courier new" , "courier" , monospace;">Average electoral votes for Trump: 192 </span></blockquote><div style="font-size: 14px;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div><div style="font-family: 'Helvetica Neue'; font-size: 14px;">We see that there’s a lot of polling already happening in the swing states. So given the information we have today, 141 days before the election, the data is showing that the swing states aren’t actually in play. Even this early in the election, before the candidates are officially nominated, we can already figure out how the states and DC will vote, how their electoral college votes will combine to create 270 votes for a winner, and therefore who will be the next president. Further, with statistics we can determine not only the outcome, but how sure we are of it. Answer: President Clinton. Certainty: same as sun rising tomorrow. </div><div style="font-family: 'Helvetica Neue'; font-size: 14px;"><br /></div><div style="font-family: 'Helvetica Neue'; font-size: 14px;">Now suppose we inject uncertainty into the system. We can hold the polls at some minimum margin of error, just to see how much it matters on who will win if the polls vary. Here’s a run with a 7% margin of error: </div><div style="font-family: 'Helvetica Neue'; font-size: 14px;"><br /></div><blockquote class="tr_bq" style="font-size: 14px;"><span style="font-family: "courier new" , "courier" , monospace;">Election 2016 Monte Carlo Simulation<br />Run date: Monday Jun 20 2016 11:13:45<br />There are 141 days until the election.<br /><br />Collecting survey data for the great states of CT, RI, VT, MA, SC, NV, TX, IN, AR, AZ, CO, IL, AL, HI, ND, MT, WV, SD, KY, DE, MS, NM, WY, OR, LA, WA, KS, NE, TN, DC, NJ, UT, AK, CA, MN, MO, GA, MI, MD, NY, FL, NH, PA, OH, NC, IA, VA, WI, ME, ID, OK.<br /><br />Swing States:<br />NV has no polls yet, so it is assigned to Clinton based on 2012 outcome.<br />CO has no polls yet, so it is assigned to Clinton based on 2012 outcome.<br />Probability of Clinton winning FL: 59.45%<br />Probability of Clinton winning NH: 65.03%<br />Probability of Clinton winning PA: 75.68%<br />Probability of Clinton winning OH: 56.14%<br />Probability of Clinton winning NC: 53.89%<br />Probability of Clinton winning IA: 64.88%<br />Probability of Clinton winning VA: 62.09%<br />Probability of Clinton winning WI: 82.44%<br />35 states have no polls, so were assigned 2012 outcomes<br /><br />Clinton election probability: 92.62%<br />Trump election probability: 7.38%<br />Average electoral votes for Clinton: 311<br />Average electoral votes for Trump: 227 </span></blockquote><div style="font-family: 'Helvetica Neue'; font-size: 14px;"><br /></div><div style="font-family: 'Helvetica Neue'; font-size: 14px;">Ok, now we’re only 93% sure Clinton will win. More of the larger swing states have flipped sides in more of the elections. Nevertheless, in 25,000 elections simulated with the above probabilities, Clinton won 93% of them. Still pretty certain...</div><div style="font-family: 'Helvetica Neue'; font-size: 14px;"><br /></div><h2 style="font-family: 'Helvetica Neue'; font-size: 14px;">Onward to November 8, 2016</h2><div style="font-family: 'Helvetica Neue'; font-size: 14px;">Given the information we have today, we can be certain that Clinton will become the next President. As the election approaches, I’ll keep running the simulation as more polls fill in. At this point, before the candidates have been officially nominated, this simulation assumes a Clinton/Trump contest. But that may change. Maybe Trump doesn’t receive the nomination. Or maybe a 3rd party candidate appears who earns enough votes that the simulation will have to be updated to include their impact. </div><div style="font-family: 'Helvetica Neue'; font-size: 14px;"><br /></div><!--?xml version="1.0" encoding="UTF-8" standalone="no"?--> <br /><div style="font-family: 'Helvetica Neue'; font-size: 14px;">Finally, the certainty demonstrated by this simulation is predicated on people actually voting. The one variable that could undermine it is voter complacency. Vote. </div><div style="font-family: 'Helvetica Neue'; font-size: 14px;"><br /></div><div style="font-family: 'Helvetica Neue'; font-size: 14px;"><br /></div><div style="font-family: 'Helvetica Neue'; font-size: 14px;">Monte Carlo Simulation code: <a href="https://github.com/GaryBoone/PresidentialMonteCarlo" target="_blank">github.com/GaryBoone/PresidentialMonteCarlo</a></div>Gary Boonehttps://plus.google.com/110164642453700713590noreply@blogger.com1tag:blogger.com,1999:blog-6774991447241352253.post-32143442647044726012016-05-15T10:11:00.003-07:002016-05-15T10:11:51.154-07:00<span style="font-family: Trebuchet MS, sans-serif;"><br /></span><span style="font-family: Trebuchet MS, sans-serif;">Here's my latest project, <a href="https://github.com/GaryBoone/pirNet" target="_blank">pirNet</a>. It's a set of devices you put around the house that detect and displays motion. So you can tell where people are in the house or, if you mount them low, watch the pets wander from room to room. The display is abstract so it looks cool, but if you know which squares of LEDs correspond to which rooms, you can read it like a map.</span><br /><span style="font-family: Trebuchet MS, sans-serif;"><br /></span><span style="font-family: Trebuchet MS, sans-serif;"><img alt="pirNet in action" src="https://github.com/GaryBoone/pirNet/raw/master/imgs/action_200h_192c.gif" style="max-width: 100%;" /></span><br /><span style="font-family: Trebuchet MS, sans-serif;"><br /></span><span style="font-family: Trebuchet MS, sans-serif;">Put devices in different rooms. When motion is detected in one room, it's displayed in all of the rooms.</span><br /><span style="font-family: Trebuchet MS, sans-serif;"><br /></span><span style="font-family: Trebuchet MS, sans-serif;">Directions and source code is here: <a href="https://github.com/GaryBoone/pirNet" target="_blank">github.com/GaryBoone/pirNet</a></span><br /><span style="font-family: Trebuchet MS, sans-serif;"><br /></span><br />Gary Boonehttps://plus.google.com/110164642453700713590noreply@blogger.com0