Monthly Archives: October 2016

The Electoral College Map One Week Out: Clinton Victory Likely But Not Assured

A couple of weeks ago, it was impossible to find a pundit or poll maven who saw a Trump victory as a possibility. I made the audacious claim at the time that this was incorrect, and I’ve been taking heat from it since then. Much of this widespread misunderstanding is ironically caused by the good work of the folks at FiveThirtyEight and their imitators such as the New York Times, who have been publishing probability statements about the outcome.

If I know for near certain that Mary is going to beat Joe in an election, then I can say something like this:

Probability of winning

Mary: 97%
Joe: 3%

But, it is quite possible that I can say that with the following as my estimate for the vote distribution in in this race:

Mary: 50%
Joe: 50%

(Rounded off to the nearest percent. Not rounded, the values are Mary: 50.1%, Joe: 49.9%.)

So, statements like “Clinton has a 75.6% chance of winning, Trump has a 24.2% chance” can go along with an estimate of the popular vote of 49:44.5, and electoral vote estimate of 310.2:226.4 (those numbers are taken right off the FiveThirtyEight site at the moment I’m writing this, Monday AM).

This, in combination with a lot of happy arm waving during a period of about five days, when many very strong Clinton numbers were coming out of Poll Land, has resulted in widespread incredulity over any suggestion that Trump may win.

Let’s have a look at some sobering facts. The following are major source projections of the outcome of the race, giving only Clinton and Trump’s certain numbers. These are the states that those making the projections are putting in the strong Blue or the strong Red column.

Source Clinton Trump
CNN 200 157
NBC 182 71
NPR 190 98
538 187 154
AP 213 106
ABC 197 157

Here is a map I produced, using my model, providing my estimate of these numbers:


You will notice that my numbers are higher than the major outlets for both candidates. I guess I have more certainty in my model than they do. But, I imagine you do as well, dear reader, because those of you who have kindly commented here or on Facebook have generally been saying that you think certain states will a certain wahy, for sure. States like Colorado, Nevada, New Mexico, Wisconsin, even Minnesota are given less certainly in those mainstream models than most of us seem to think.

In all cases, of course, neither candidate has the requisite minimum of 270 electoral votes, so in theory, either candidate can lose. “No, wait, that’s not true,” you say. “Clinton has way more votes to start with than Trump, so that’s just not true.”

And you may be right, but not for any good reason. It is totally possible for one candidate to have a base set of states, states that can not be lost, that totals to more electoral votes than another candidate, but for the remaining states to lean towards the second, smaller-base candidate. This is especially true in a heterogenous environment, like this one.

However, in this case, it does happen to be true that the remaining states tend to fall out in a way that favors Clinton on average, but not in all cases.

I’ve descried my model many times. It is calibrated with polling data that is most recent and from the highest quality sources. The presumed outcome in some states, based on that polling data, is the dependent variable in a multi-variable regression analysis where the independent variables are the ethnic breakdown of each state, and the relative Romney vote for each state in that election, to indicate Republican vs. Democratic trend. For the first time, because of a LOT of recent polling, and in a few cases using FiveThityEight’s estimate to stand in for some mediocre polling, I have used most of the states rather than fewer than half. One would think that this would simply spit back out the same polling numbers others have used, but it does not, because of the ethnic and Republicanosity factors, and some of the results are a bit surprising. For example, my model is not that happy about North Carolina voting for Clinton, and it is not that happy about Iowa voting for Trump.

Nor does my model have to be happy. The whole point of doing this model is to include a perspective that, while linked to polling, glosses over low quality or old polls (by not using them) and is not slave to a state-by-state analysis of polls, but rather, heeds lager scale and more general trends that we know are reasonable. The fact that my model puts the same states near the 50%-50% line as the polls do suggests (unsurprisingly) that we are all on the same page, but the fact that some details are different … well, that’s why they invented popcorn.

Anyway, having said that, I have a projection for the entire country based on my model, which I offer in competition (but subject to change before election day) against all the other models. Here it is:


There are a few things to notice here. First, as discussed elsewhere, there is no Clinton Landslide. This is mainly because Democrats can’t have landslides, because there are so many Yahoo states like Kansas and Oklahoma, and much of the deep south. Another thing to note is that I’ve left off three states. Much to my surprise, New Hampshire is not predictable. I thought it was going to fall out blue this year. Many people will complain about North Carolina not being blue, but face it: nobody had North Carolina as certain. Only one of the above cited (in the table) predictions has North Carolina leaning blue, the others all say nothing. Notice that Ohio is uncertain.

These three states leave a mere 37 electoral votes off the table, and give Clinton a resounding win with 310 Electoral votes.

But what if the Democrats end up putting into effect the greatest ever Get Out The Vote scheme, besting even those done by Obama? “Not likely,” you say? “Because people were more excited about Obama than Clinton,” you say?

You may be wrong. First, people are excited about Clinton. But people have more ways to comfortably be openly opposed to a woman than they have ways to comfortably be openly opposed to a black man. That, and the GOP hate machine has been running longer on Clinton than on Obama. So, yes, this will effect overall feelings but it does not effect the ground game, which is being run, on the ground, by people who don’t really care about those messages. They are busy being excited Democrats.

Another reason you might be wrong for thinking that is that the Clinton GOTV effort will be better than the Obama GOTV effort, all else being equal, because it is not based on excitement, but rather, methodology, data, and professional strategy. And, these things get better every election. So, it is quite possible that the Democrats will outperform the the Republicans in relation to the polls.

After consulting my advisors, I decided that a two point advantage could be given to the Democrats if they do the best they can do on the ground to trounce the Republicans. When we re-calculate on this basis, we get this map:


Sorry, Democrats, you don’t get Texas. But you do get Georgia and all the swing states! And a respectable win. Almost, but not quite, an arguable mandate. What you’ve got here, really, is a map of future wildlife refuge takeovers. And, a respectable Electoral College win.

But what if it goes the other way, the same amount? What if the monster under the bed (more accusations about email?) comes out. And at the same time, what if there is a real turnout among angry white males, energized by a victory in Idaho? What if men who are really worried about someone taking away their guns and locker room talk make their move?

There’s a map for that:


Ruh roh.

In this case, Trump wins. Trump wins by taking the swing states, all of them.

Notice that if all this happens, BUT Clinton takes Pennsylvania, OR, North Carolina OR Ohio, OR Florida, Trump loses. The chance of the map shown here being realized is very small. But possible.

Also, remember, that somewhere between this Trump win map and the smallest possible victory for Clinton (270) is that one odd combination where each candidate gets 269 votes, and the Electoral College ends the day having selected no one as president. In that case, the House of Representatives decides, and the way that is done, in combination with the way the numbers are (even if the Democrats actually take the House) is such that a Republican majority will prevail in that decision.

That would be the Republican Party’s last chance to stop Trump. But, will they allow a woman to be president as the only alternative that will be open to them?

Of course not. They’ll select the nuclear option, elect trump, and anyone who is still guessing at their motivations will know what the Republican Party is really all about. Ending civilization, because civilization can not exist without taxes and regulation.

Tracking Polls Show Clinton Disaster Looms, But Electoral College Holds

The relationship between the popular vote, roughly reflected in national polls, and the Electoral College vote, is where the rubber meets the road.

When you look at states that are very solid for each candidate, neither candidate has a lock on the race, but Clinton has way more electoral votes, currently. These numbers hover around 200-something to 100-something.

Then there are the strongly leaning states, which when added to the other states, put Clinton almost exactly at the required 270 electoral votes. Maybe a little more, maybe a little less, depending on which states you think you can count on. For example, until this weekend, many put Florida in this second category, but Florida is now looking more like a Trump state.

All of these in between states, including the strongly leaning ones and the real tossups, have the candidates within just a few percentage points of each other. If a strong swing toward or away from either candidate happens, either candidate could win this election. The chances that such a swing puts Trump in the White House is low, but not zero. Repeat: Not zero. And, there is currently an anti-Clinton swing going on, the full magnitude of which we will not know for several days.

It is distinctly possible that the situation on the weekend before voting day will be distinctly different than, say, last weekend. At the present, the race is in flux.

More on the negative side: It is possible that James Comey has (in an act best described as a felony) put enough of a counter spin on the top of the ticket that the Senate is lost to the Democrats.

On the positive side, it is possible that the Democratic Party gets anywhere between one and three extra points in each state because of an improved ground game, a get out the vote effort, compared to the Republicans. But, the Republicans have been getting good at this, and in states where they have a senator at stake, they are putting millions of dollars into play. And of course, some of those states are also swing states.

Anyway, here is today’s bad news:

ABC Tracking Poll:


USC LA Times Tracking Poll:


IBD/TIPP Tracking Poll:


Recent trends reflected in the FiveThirtyEight electoral vote estimate:


Of the swing states, Trump is leading in Arizona, Georgia, Iowa, Ohio, Utah,

Of the swing states, Clinton is leading in Colorado, Maine, Michigan, Minnesota, Nevada, New Hampshire, North Caroina, Pennsylvania, Virginia, and Wisconsin.

Clinton is leading in Florida but with a rapidly diminishing lead, and is behind in more recent polls than is Trump. Florida may go for trump. A prudent guesser will now put Florida in the unknown column, or to be safe, in Trump column.

Secretary Clinton’s Likely First Violation of Her Oath of Office

When Secretary Clinton is elected President, barring more shenanigans on the part of Republicans like James Comey, she will take an oath of office, promising to protect and defend the Constitution of the United States of America.

Then, within a few days, she’ll violate that oath by appointing one or more Republicans to important positions in the Federal Government.

(As an aside, I’m wondering, what is the mechanism for paying someone like James Comey for giving a helping hand to his party and violating his constitutional oath? Offshore accounts? Do the payments come later? How does that work? I know how they do it on TV, but how do they do it in real life? But I digress…)

Every now and then, in every Democratic administration, a couple of Republicans are asked to serve. This is a thing both parties do at about equal levels. But what does not appear to be equal is the probability, increasing in recent years, that the cross party appointment will lead to either embarrassment, or serve to plant a time bomb of some sort. A cross party appointee messing with Democracy, or simply screwing up, seems to be more of a Republican thing than a Democratic things. (Though I’m sure there are a few counter examples.) Often, the Republican turns around at some point and sticks it to the Democrats. Sometimes it is just a personal attack that happens after they serve, other times it is a criminal act they carry out while still in their position.

James Comey is an example of this.

There are three truths that must be understood, and I hope Hillary Clinton understands and acts on these truths. But I doubt she will, because she she is a olde timey Democrat, bless her heart, and will likely carry on the tradition of bending over for the Republicans. But, since she should understand this more than anyone, ever, perhaps she will act differently.

Here are the truths:

1) Republicans are, in fact, very bad at certain things, especially national defense and crime. We are faced as a nation with huge problems in both of these areas, and if Secretary Clinton is elected to be President, she will be spending much of her administration dealing with these things. This includes the hatred of America engendered by protracted Republican wars, and the fact that our society is a prison state, and a police state, and other effects of the Patriot Act. These are mostly Republican-caused problems, and where Democrats were involved, they were Blue Dogs or cow towed.

2) Democrats are actually very good at doing these things, at dealing with defense and criminal justice. If Democrats keep putting their token Republicans in those areas, that will simply reinforce the utter falsehood that Democrats are lousy on crime and lousy on defense. This has to stop.

3) Republicans can not be trusted to govern, under any circumstances, in any role, at any level of government, ever. The fundamental philosophy of Republicans is that nothing matters, no ethical considerations or legal restrictions, as long as one ultimately votes against women’s health, for voter suppression, and in favor of unfettered gun ownership and use. Everything else, all other issues, are secondary. Therefore, when a Democratic president puts a Republican in any position of responsibility, knowing this, a deeply cynical and irresponsible act has occurred. The Republican will, eventually, violate the constitution.

To Republicans, the collective rights of all Americans make up the very pavement over which the bus of the Second Amendment, a Religious Republic, and a Police State roll. We don’t get thrown under the bus. We are expected to reside there, under the bus. Their bus.

Dear Secretary Clinton: After you take your oath to defend and protect the Constitution of the United States of America, don’t violate that oath right away by appointing any Republicans to any positions of authority of any kind whatsoever. Please.

There are Republicans who have served in Democratic administrations with honor and dignity, people like Jim Leach. But they are old, they are retired, they represent the GOP before the Republican Revolution. And the good they’ve done is not unique. Those positions could have been covered by Democrats. The Petraeus scandal, Bernanke’s sexism vis-a-vis the $10 bill, Chuck Hagel’s controversy, Bob Gate’s book, all serve as warnings.

But at this state, appointing a Republican to an important position within a Democratic administration carries sufficient risk of unconstitutional behavior that the act of appointment itself should be considered a violation of the oath.

Will 2016 see a landslide in the POTUS election?


Many many people, well intended, smart people, keep talking about the rout, the landslide, that will happen. They may be basing this on the new trend started by FiveThirtyEight and picked up by the New York Times and others of deriving a probability statement about the race. But when you see something like “87%” for Clinton in such an estimate, that does not mean that Clinton will get 87% of the votes. It means that it is very likely that Clinton will get 270 or more electoral votes. There is, for example, a zero chance that Clinton will get a single electoral electoral from Montana, Idaho, Wyoming, either Dakota, Nebraska, Kansas, Oklahoma, Missouri, Arkansas, Louisiana, Mississippi, Alabama, Tennessee, Kentucky, West Virginia or Indiana.

There are versions of this election where the Virgin Mary descends form heaven on a Unicorn and causes Trump to lose in Texas, Georgia, a few other states that he is not going to lose in, and then there are tossup states.

A great outcome for Clinton is winning all the tossups, including New Hampshire, Ohio, Florida, North Dakota, Arizona, Nevada, etc. But there is no version of the election in which she wins even one of the 108 electoral votes found among the afore mentioned states.

Now, the total number of electoral votes that Trump can not possibly lose is just over 100. The total number of electoral votes that Clinton can’t possibly lose is just under 200 (including, I think, Washington, Oregon, California, Minnesota, Illinois, Michigan, New York, Vermont, Massachusetts, Rhode Island, Connecticut, New Jersey, Delaware, Maryland, DC). Either candidate losing any of those states involves the Virgin Mary on the Unicorn. If you make any map of any kind with those states in place, as specified, per candidate, then nether candidate can win by a true landslide.

And we know what a true landslide is because there have been many of them. A very conservative estimate of Trump’s electoral take would be about 147 votes. The lowest actual estimate I’ve seen is, I think, 153. Very few put him below the 170s, and these all assume that he’ll get more, but with many states left in limbo. In other words, Trump losing badly gives him something like 25% to 30% of the electoral votes.

There have been 56 elections.

10 elections have been won by 90% or more of the electoral vote. The were won by George Washington, James Monroe, FDR, Ronald Reagan, Richard Nixon, Thomas Jefferson, Abraham Lincoln and Lyndon Johnson. The weakest of those was Lyndon Johnson in 1964, and this is what his map looked like:


28 of the elections were won by 70% or more. The weakest of those was Bill Clinton in 1996. This is what that year looked like:


Hillary Clinton’s electoral map is going to look a lot more like Bill Clinton’s map, and that is not a rout.

There have been many landslides in recent years. Reagan and Nixon as mentioned (Reagan twice), Johnson and Roosevelt as mentioned. Even Wilson, 1912, with just over 80% of the electoral vote looks like a rout on the map:


A major victory for Clinton will be taking all of the major swing states, and one or two of the formerly red states, such as Georgia, South Carolina, any Deep South state, Texas, or Utah. Any one of them. Plus the swing states (esp. Ohio and Florida, both, as well as Pennsylvania). That will feel like a rout, a landslide. But it won’t be.

James Comey’s Last Day at the FBI: November 9th

You all know what James Comey did. He sent a letter to Congress that will undoubtedly serve to change the vote distribution among the leasing candidates for president enough to possibly change the outcome of the United States election of the President of the United States.

Such an act is treasonous, and had a private citizen, especially a brown one or one with “Hussain” in his name, done something to affect the election to this degree, the FBI would be on that citizen like ugly on an ape. But, James Comey is the head of the FBI, he’s white, male, and a Republican. Also, there is an argument that could be made that he had to send this letter.

The argument that he should of is fallacious. The only reason to have done so is that he, James Comey, can not be seen as having done something more wrong (as opposed to less wrong) in the final analysis of the Clinton Email Tragicomedy. So, it was an utterly selfish act on his part, and does not excuse him. Indeed, it makes what he did worse.

President Obama will be fully justified in relieving Director Comey of his duties. People at his level of government have been asked to resign for less. But, since Comey’s act serves to hurt the Democratic candidate, the one President Obama has been stumping for, he can’t do that before the election.

And that is why November 9th will be James Comey’s last day in public service. Then, he can go and write his book.

The Presidential Race Tightens Even As Many Assume It Is Over

A Trump-Kaine presidency is now on the table.

It ain’t over ’till the lady in the pantsuits wins. Or looses.

Imagine Debbie Downer and Chicken Little have an offspring. It would be me. Or at least, that’s how I’ve felt over the last few weeks as the only person in the Free World who seems to have noticed that the gap between Trump and Clinton is closing, and in fact, was never really that large to begin with. It only appeared large because a fluctuation occurred at about the same time everyone was hoping for a fluctuation, so it became more real than it should have been. The race has been close for some time, remains close, and is narrowing.

This morning, the newscaster for NPR introduced a story on the race with “With Hillary Clinton’s lead narrowing …” or words to that effect. The story was about President Obama’s remarks. You think you’re wining, then you miss a couple of free flows, get a penalty or two you weren’t expecting, next thing you know, you wake up the next morning, and you’re the Minnesota Vikings. Or words to that effect.

Let’s look at some tracking polls. Tracking polls may be inaccurate with respect to magnitude (how high or low the candidates are, in relation to each other, but scaled in absolute terms) but they are supposed to be helpful in detecting short term changes. So, for example, if you have good reason to think two candidates are at, say, 60 – 40 in the split among voters, and a tracking poll then tells you that that first candidate has likely lost about 5%, that means that you should take seriously the possibly that it is no longer 60 – 40, but may have moved closer to 50 – 50, without assuming how much closer. That is what tracking polls can give you.

The Los Angeles Times has a well respected tracking poll. This is a picture of it:


Here’s the ABC tracking poll.


This shows the race narrowing to a near dead heat.

In both of these polls, ignore the absolute value. What these tracking polls are telling you is this: Ten days ago, you were jumping up and down happy because Clinton was so far ahead and her lead was expanding. Today, you need to stop jumping up and down and you have to put your nose the grindstone and work on making sure she wins, because, simply put, Trump has a chance.

A third tracking poll, the IBD/TIPP poll, is considered to be highly accurate (has never been wrong in a presidential race) and has put Clinton and Trump in a near dead head for a long time now. IBD/TIPP shows Clinton’s lead expanding a bit.


So, with two tracking polls showing what looks like an emerging reversal of fortune for the Clinton campaign, and one maintaining as an indicator that things are close, those who wish to not have a Trump Presidency should be concerned about two things.

The first thing to be concerned about is your own personal connection to and understanding of reality. A lot of Americans really like Trump, and you didn’t think that was possible and still don’t understand why. Fail to grasp that at your peril.

The second thing, of course, is an actual Trump presidency.

This is the point where most un-realists, those who simply wish Clinton to win so hard that their eyes have become scaled over, make this argument: “But the Electoral College, bla bla bla.”

So, let’s look at the Electoral College. I recently projected a very close race in the Electoral College, that some said was a crazy outlier. But when I looked at the other projections, I found that mine was similar to many others, with only one difference: I projected win/loss for all states, while the others left a lot of states as unknown. In other words, for states where we know the likely outcome, the race is close.

But how close?

Here is a list of the selected sampling of pundit forecasts listed at 270 to to win.


This represents the range of what people are thinking.

Note that in all cases, a) Clinton has more than 270 electoral votes, BUT, in several cases she is within one state of losing that. Note also that Trump is in every case below 270. But, also notice that in all cases (not shown in this table, but visible on direct inspection) there are plenty of unattributed states for either candidate to draw from.

This is the map that is of most concern:


This is the map 270 provides to represent “contested states.” It is not unreasonable. New Hampshiere, North Carolina, Ohio, Georgia, Florida, Arizona, Nevada, Utah, Wisconsin, and Iowa are reasonably thought of as contested. In this scenario, neither candidate has enough to win.

Let’s take this map and give Trump the states he is very likely to win if the wind is blowing softly in his direction. We get this:


Still, neither candidate wins.

I personally have a hard time believing Wisconsin will not be blue. New Hampshire has been trending more and more Blue, so maybe it will be Blue as well. Le’ts assume that Maine goes blue as well. If that all happens, Clinton wins by 3 electoral votes.

But it is also not unreasonable to guess that New Hampshire goes for Trump, or that, say New Mexico ends up going for Trump. In that case, Clinton is just below the 270 mark. If Trump then wins North Carlina and Florida, then hello President Trump.

Indeed, in the Election Year From Hell, we may very well expect this nightmare scenario:


If this happens, the vote on November 8th is thrown out and Congress decides who will be president. The House will decide who will be President, and they will pick Trump. The Senate will decide who is Vice President, and they will pick Kaine.

On Election night, I’ll be watching New Hampshire and North Carolina very closely.

Trump Supporter Charged With Vote Fraud, Grammar Infraction

How can you tell what a megalomaniac is really up to? You find out what the megalomaniac is accusing everyone else of. That’s what they are up to.

While the just barely brighter than dim press and pundits are focusing on Trump’s call for his followers to carry out voter suppression in African American and Hispanic neighborhoods on November 8th, or before at early voting elections, and accusing the Democrats of voter fraud (suppression and fraud are different, sort of opposite, things) something different is actually happening.

This is how dog whistles work. Dog whistles, usually used by conservatives, are thought by liberals to be a way of saying things that you can’t actually say because they are obnoxious or illegal. But no, that is not how they actually work. Dog whistles are much more subtle and nuanced than that. The recipients of the message unwittingly (but not unwillingly) adopt opinions or, in some cases, carry out acts, directed by constantly repeated well placed dog whistles.

The dog whistles are not explicit instructions. The are cues that set up a mind set that leads to a desire to act or think in a certain way.

Think about it. If you tell people who hate Democrats and Hillary Clinton that Democrats and Hillary Clinton are going to carry out voter fraud, again, and again, and again, what are they going to do? They are going to a) carry out their own voter fraud and b) do so with the justification that they are afraid that the other side is busy carrying out voter fraud.

So, from the Huffington Post, on reporting several apparent cases of voter fraud in Iowa:

Police in Des Moines, Iowa, said Friday that they had arrested Terri Lynn Rote, 55, on suspicion of voting twice in the general election.

Rote, a registered Republican, allegedly submitted ballots at two different early-voting locations in Polk County, Iowa…

She said she feared her first vote for Trump would be changed to a vote for Democratic nominee Hillary Clinton.

As expected.

There are two other individuals in the same area being looked at, neither has been arrested yet.

Apparent voting felon Rote is known to have commented, “I wasn’t planning on doing it twice. It was a spur of the moment,” a comment for which charges from the local grammar police are expected soon.

Learn Scratch Programming (For Kids And Adults)

Scratch Programming Playground: Learn to Program by Making Cool Games is a brand new offering from No Starch Press.

scratchprogrammingplayground_coverNever mind all the other programming books for kids, this is the best so far.

It helps that the Scratch Programming environment is so easy to use and allows such creative development, and it also helps that Scratch is likely to be a programming environment for basic robotics in the future (as I discuss briefly here). But the book itself is excellent, and works at several levels. A young kid working with an adult, a medium level kid working on their own, or an adult playing on the computer after the kids have gone to bed.

Scratch is in the Logo family of object oriented programming. Indeed, Scratch itself, as a language, is a very short distance from the original object oriented programming, much closer to the source than many professional object oriented language.

screen-shot-2016-10-28-at-8-55-57-pmIt works like this. See the graphic to the right. This is code that controls a “sprite” which in this case is a picture of a ball.

The light brown C-shaped things are control constructs. An outer one called “forever” contains code that will be run from the time the program is started until it is stopped externally. Inside that is an “if” loop that checks to see if the object “paddle” (specified in the blue object) touches the sprite (ball). If that event happens, then the code inside the “if” thingie is executed. In this case, the variable “score” goes up by one, a funny little blerp sound is made, and the ball turns in the opposite direction.

Meanwhile, the paddle has a wadge of code that goes with it as well, which responds to key presses or mouse movements, so that the paddle can be used as part of the bouncing the ball game. And so on.

screen-shot-2016-10-28-at-8-55-24-pmIn the code block on the left, contact between a pirate (a sprite) and a leaf causes the leaf to disappear and the pirate to get a score for making the leaf disappear.

You can imagine the possibilities.

So, imagine the following game. A complex maze is on the screen. The player uses arrow keys, etc., to move a tiny cat around in the maze, working the cat from the beginning to the end. At the end, there is a hole that the cat goes through, and now the cat is in another maze. And so on for several mazes.

Are there objects in the maze the cat must avoid? Or obtain? Will you time how long it takes to get through each level? Will you keep a high score? Will you have two cats, with two people controlling them, each moving in opposite directions through the maze?

The code examples I give above are not from Scratch Programming Playground, but the maze example is. It is one of several projects that the book works you though, as you learn all the various programming concepts in Scratch 2.0. The programs you learn to code produce complicated results and are really spiffy, but the programming itself is easy and the code is not extensive, because Scratch 2.0 is so powerful yet easy to use.

Each example, such as the maze, is fully developed, and then, new versions (like having the second player ability, etc.) added, and by the time you are done with that example, if not sooner, you are already adding things of your own design, from your own imagination.

Scratch 2.0 can be run as a stand along program in windows and on a Mac, but works better on the web, in a browser, on all platforms. Working in that environment, on the browser, has the important advantage of immediate access to a large amount of work done by others, that you can freely borrow from. And, of course, you can show off your own work.

Scratch Programming Playground tells you how to obtain or set up an account on Scratch at MIT, holding your hand effectively but respectfuly through the entire process. The book is also associated with, as per usual for a No Starch book, a web site with the code and other items used in the book. However, I recommend actually hand building most of this code on your own, so you actually learn what you are doing.

This is the overview table of contents for the book:


And this is the Maze Runner project contents expanded, to give you an idea of how the learning and making process is parsed out:


Note the multiple versions of the project that are developed after the main project is up and running.

It is possible to figure out how to make a hand held game controller work with Scratch programs, but that will depend on the controller you have and the platform. A USB controller and a bit of software from the web that lets you set up the buttons should work.

I would not be surprised if future Internet of Things programming, robotic programming, and other coding you might want to get involved in either uses Scratch or follows this model. The mBot robots can be controlled with a version of Scratch, which produces Arduino code for that robot, and there is now a compiler that allows the general use of scratch for Arduino. Arduino is a basic prototyping machine that can run things, as in “Internet of Things” and that is similar to controllers in general, like the ones in your computer, VCR, thermostat, DVD, car, Mars Rover, etc. (Wait, did I just say “VCR” … whatever.)

A bit of the book giving instruction on a code block to control a tennis ball sprite.
A bit of the book giving instruction on a code block to control a tennis ball sprite.
Anyway, Scratch 2.0 on the web, as per Scratch Programming Playground, gives you, er, your kids, great training in all the programming concepts, and with it you basically controls sprites (objects) on a screen. But the same language is already adapted to control a common form of robot (mBot) and has been adapted to program a widely used controller. So, with Scratch Programming Playground, a little practice and nine dollars worth of hardware, you can take over the world! Or, at least, a good portion of the Tri State Area.

When I do my “Science oriented holiday gift guide” (SOHGG) in a few weeks, this book is going to be on it. Al Sweigart, author, has really nailed a kids oriented programming book better than I’ve seen done before, and I’ve seen them all.

Electoral College Prediction: Trump 241 vs. Clinton 297

I’ve got a new set of electoral college predictions. I’m using the same method as before, but with these differences: a) I had to use less than ideal polls (c rating, a few that overlapped with days prior to POTUS debate III) on the last run, this time no such polls are used; and b) there are some new polls added in this time.


The difference is interesting, and somewhat concerning (compare to this result). For example, in this run, Arizona, Virginia, and New Hampshire go for Trump. Most people think of that as unlikely. Personally, I don’t see Virginia doing that. New Hampshire is conservative and is very white (thus potentially Trump-leaning), but is in transition. However, these states are all within a very small fraction of the 50-50 cutoff. Oddly, North Carolina is not that close.

I did a second map (using 270 to win) with the same data but adding ca 3% correction for ground game. Trump seems to not have much of one. I asked a number of colleagues what percentage correction they might use for a good vs. bad ground game. These are people who have ground game experience and a good record. They were all over the place in their suggestions, and noted that any such guess would be iffy this year. So, I picked 3%. North Carolina is actually slightly more tha 3% of the 50-50 line, but I included it anyway in this latest run, which adds New Hampshire, Arizona, Virginia, Ohio, and North Carolina.

I want to remind you of a couple of things about this model. It is indifferent to your opinion as it might be derived from polls. That is the point. This is meant to account for some of that potential observational bias, or at least, ignore it. Also, this model tends to work ver well. However, it is accurate mainly with respect to the percentage of the vote assigned to each candidate in a unit area (a state), not whether the candidate takes the state or not. In other words, we look at this and freak out about a state being blue or red, and the model says, “Who cares about that, I’m trying to tell you the PERCENT of the vote per candidate. So, 49 vs. 51 are two points off, and 81 and 83 are two points off, they are the same, silly human!”

The real meaning of this particular prediction, which uses BETTER DATA POINTS than the last one but FEWER OF THEM, is that it is not a) closing in on a Clinton landslide — that isn’t going to happen and b) it shows the kind of crazy variation over time that should keep us up at night. On the 8th. But not so much other nights, because it is, essentially, impossible for Clinton to lose.

And, to underscore that point, here are the states that my model currently says will go to Clinton, on the stronger Clinton side of the distribution, that are the minimal needed to get 270 votes:


So, that’s how Clinton can win without Pennsylvania or Ohio. And, again, this is the quirky nature of variation near the 50-50 line. Clinton will probably win Pennsylvania (according to everything) and couple of other states, and does not, therefore, need Florida. Probably.

Clinton Vs. Trump: Latest Electoral Prediction

It is fun to look at polls, and using such data, decide which candidate will win which state, and ultimately, which candidate will win the electoral college. A lot of people and organizations do that, and for this reason, I don’t. I do not have access to polls that no one else sees. Were I to use polling data to directly predict outcomes per state, I’d use a method like that used by FiveThirtyEight, and probably come up with similar results. How boring. It would be a waste of my time to try to replicate the excellent work done by Nate Silver and his team.

Back during the Democratic Primaries, I decided that I wanted to get a handle on which candidate was likely to win, fairly early on. The polling based estimates were inadequate because most states simply didn’t have polling data that early in the process. So, I invented an alternative method, which made certain estimates of how voters with different ethnic identities would vote. That method accurately predicted several primary outcomes, outperforming the poll based methods such as those used by FiveThirtyEight.

After a while, enough primaries had been carried out that I could switch methods slightly. Using the same exact model, but primed with the results of prior primaries (that year) rather than my estimates of voter behavior, I used the ethnic distribution data for each state to predict the outcome of upcoming primary contests.

Once again, my method was very accurate, and once again, it out performed the polling based methods.

So, recently, I’ve tried to apply a similar method to estimating the electoral outcome for this year’s presidential race. But, it is impossible to use the same exact method because the entire thing happens all on one day. I can’t use the election results from a handful of states to estimate the likely future outcomes in other states.

I recognize that polling data is very limited on a national level. Things happen during an election season that probably change people’s likely voting behavior, especially among independents. Solid states are rarely polled, and small states, swing or not, are rarely polled. Many polls are of low quality. Right now, for instance, fewer than half of the states have polls that were a) taken fully after the final POTUS debate and b) have an A- or better rating from FiveThirtyEight. If I allow the use of B and occasional C ratings for recent polls, and allow a few polls to include periods of time prior to the last POTUS debate, but only in states that are very strongly in favor of one candidate or the other (and thus likely to not move anyway), I can find 32 states that have sort of usable polling data. Interestingly, states with some of the more controversial changes happening, like Utah and Iowa, are not adequately polled.

In order to apply a model like the one I used in the Primaries to the current election, I used the 32 states for which there was somewhat acceptable recent polling data to inform the model (to calculate the regression coefficients) in order to then, separately, predict the likely voting behavior (Trump vs. Clinton) in all of the states.

Before I show you the map, however, I need to discuss something else.

About a week ago the press, especially the somewhat more left leaning press, and various commenters, seeing much reaction to a series of events beginning with the NYT release of Trump’s tax return and ending with the final POTUS debate, events which sandwiched the sexual assault tapes and accusations, collectively decided that a huge gap between Clinton and Trump was rapidly opening up and the race would end with a double digit spread, an electoral rout, and a big party.

Soon after, I pointed out that this may not be correct. That polling data seemed to show, rather, that there was an expansion of the difference between the two candidates followed by a re-closing of the gap, with Clinton still leading but by about as much as before this temporary shift. To this I added a concern. If too many people assumed that the race was over and in the double digit range, perhaps there could be a GOTV backlash effect, or a funding effect, that would shift things to within shooting distance for Trump.

I was not alone in thinking this, and I was probably right. The GOP sunk, via pacs, 25 million dollars into Senate races in response to the Democrats shifting from the national race to the Senate, which was followed by the Democrats shifting back to the national race in certain states, presumably recognizing that the polls were artificially spread. Indeed, some who criticized (arguing mainly from incredulity and good wishes) my admonition noted, correctly, that some of that narrowing was because a bunch of right-leaning polls had come out all at once. This is true, but it ignores that a bunch of left-leaning polls had made the formation of the Great Gap of GOP Defeat look a lot bigger than it ever really was.

I say all this as part one of my preparation for what I’m going to tell you below, which is not the news you want to hear. Part two is some logic I’d like to bludgeon you with.

Consider these points:

1) True Trump supporters could give a rat’s ass about sexual assault, poor debate performance, or tax forms. Donald Trump was correct when he said, weeks ago, now forgotten, that he could gun someone down on the streets of Manhattan and he would not lose support form his base. These people did not abandon him when he was heard to talk about sexual assault. If anything, they were energized by it. And, I’m talking about something just shy of 40% of the voters. We live in a barely civilized asshole country.

2) Please tell me exactly which Hillary Clinton supporters, who were going to vote for Clinton over Trump all along, are NOW going to pick Clinton (if polled or on voting day) that change from not being Clinton supporters to being Clinton supporters? In other words (this is a somewhat subtle point) which people who hated Trump became True Haters of Trump after the sexual assault thing? Almost none. They were already there.

3) The third category of people, the undecideds (who are only lying about being undecided, in most cases) and the so-called “reasonable Republicans” (of which there are very, very few), who could conceivably shift from Trump to Clinton are going to divide their voting activities between Johnson, a write in (as they are being advised by Republican leaders in some cases) or simply staying home.

In other words, over the last few weeks, no source has emerged that hands Secretary Clinton more electoral votes than she probably had about a month ago, and Trump is not going to have any, or at least not many, electoral votes go away.

Those observations (part one) and that logic (part two) cause me to be utterly unsurprised to find out that an analysis of the electoral map I did on October 16th and one I did today do not show Clinton pulling farther ahead. In fact, the two analyses have Clinton being less far ahead than Trump now than ten days ago. The difference is in Ohio (shifting from Clinton to Trump) which is almost certainly going to happen, and North Carolina (which shifted from Clinton to Trump in this analysis) which seems much less likely to happen, and Arizona shifting from Clinton (that was probably wishful thinking) to Trump.

The point here is this, plain and simple. An analysis using a technique that has worked very well for me in the past shows that the difference between that moment of Maximal Clintonosity and today is plus or minus a couple of state. In other words, not different. Maybe a little worse. Really, about the same.

Here’s the current map:


Obviously, I will be watching for more data over the next few days. I assume there will be a spate of polls as we approach November 8th (the day Democrats vote. Republicans vote on the 28th of November). If so, then there will be convergence between my method of calibration and my method of calculation, and the model will consume itself by the tail and become very accurate at the same time.

But between now and then, perhaps that very small number of polls that are both recent and high quality will grow a bit more and I can do this again and resolve those closer states.

By the way, the “swing states” according to my model, the states where things are close, are Ohio, North Carolina, Arizona, and Georgia of those now in the Trump column. Those are indeed swing states. Numerically, the close states that are in the Clinton column are Virginia, New Hampshire, and Pennsylvania.