Friday, August 25, 2017

How big is a 12% defection rate?

There's this story going around about how 12% of the people who voted for Bernie Sanders in the primary voted for Trump in the general, and this was sufficient to swing the vote in Trump's favor.  The Political Wire report is behind a paywall, but the raw data are here.




So, how big is a 12% defection rate?


At first glance, 12% seems huge, but how does it compare to other defection rates?  Well, Trump lost roughly 34% of Kasich voters, 3% of Cruz voters, 12% of Rubio voters, and 2% of Trump primary voters to Clinton.

4.5% of 2016 primary voters for Clinton voted for Trump.  If those voters had gone for Clinton in the general, they would be sufficient to swing the vote in her favor**.


Using this data to understand how people voted in an effort to understand how to reach those people in future elections could be useful.  Using this data to fan flame wars between Bernie and Hillary supports seems like a huge waste of time.  


** Brian Schaffner breaks down the Bernie defectors by state.  I'm a little nervous about breaking down the numbers by state, because there are a large number of voters with "na"  values for State.  I don't know what these values mean, except that we would need to take care when talking about individual state results based upon this data.


EDIT (8/28/17): I only just saw Schaffner's statement to NPR that "I found basically no Clinton primary voters who voted for Drumpf."  I'm looking at the source data and see the following weighted breakdown.  This shows 4.5% of Clinton voters defecting to Trump, so I'm not certain how Schaffner arrived at that conclusion.

Here is the R code that creates this table, from the raw RData downloaded from the CCES Dataverse:

library(data.table)
library(magrittr)
library(dplyr)
load("CCES16_Common_OUTPUT_Jul2017_VV.RData")
x %>% subset(select=c("CC16_328","CC16_410a","commonweight_vv_post")) %>%          setnames(old=c("CC16_328","CC16_410a","commonweight_vv_post"),  new=c("Primary2016","General2016","weight")) %>% 
 group_by(Primary2016,General2016) %>% filter(Primary2016 %in% ("Hillary Clinton")) %>% 
 summarise(weightedN=sum(weight)) %>% print()


Thursday, August 24, 2017

Focusing on the specific, rather than the general, in child rearing and monument building

I saw this comic on monuments at the Nib today, and for whatever reason, it reminded me that as a parent, you learn that it's important to praise children for specifics, rather than generalities.  I'm beginning to feel like this advice is applicable to monuments.  Perhaps they should commemorate something specific a person has done and placed in a location linked to that action, rather than a person in general.  

For example, the statue of Tesla in Niagara Falls makes perfect sense because Tesla was instrumental in building the world's first hydroelectric power plant there.

At the other end of the spectrum, Robert E. Lee never set foot in Louisiana, and so the monument to him in New Orleans is pure cult of personality.


Sunday, August 20, 2017

The saddest day of 2017 (according to the Hedonometer)

The Hedonometer is a cool project that tracks the happiness of the Twitterverse over time, using mechanical Turk-derived "happiness scores" for each word.  So far, last Saturday was the saddest day of 2017, and the single day view of August 12 is perfect for showing how it currently works and where future development is needed.

That Saturday was sadder than the previous seven days because of a greatly increased incidence of "negative" words like hate, violence, and terrorism, with no counterbalancing increase of "positive" words (or decrease of "negative" words) until we hit the word white.

This is where things get interesting, because out of context, white is considered a "positive" word, but in the context of the events in Charlottesville, white was likely a part of phrases that would definitely be negative.  The Hedonometer team is aware of this, and in the frequently asked questions on the About page, note the following:
“How will you deal with context?”
We are currently developing a principled method to identify relevant phrases, for example to deal with the multitude of both positive and negative uses of profanity. We expect to be scoring phrases instead of words, where appropriate, in the near future.



Saturday, August 12, 2017

Maintenance victory, of a sort

Problem: Venerable Patton High Velocity Air Circulator (henceforth referred to as "fan") stopped working. Took it apart, cleaned off years of dust. Showed the kids the copper coils that generate the electromagnetic field that causes the disc to rotate so that the blades turn. Diagnosed that, for tribological reasons I can't determine, the generated EM field is no longer strong enough to overcome the initial inertia of the disc, even after applying lubricant.

Solution: keep a screwdriver handy to give the fan a little push, and it will keep the blades moving after that.

Friday, August 4, 2017

Newly insured in the U.S., 2010-2015

FlowingData recently pointed to a report on the number of people in the U.S. who gained health insurance as a result of the ACA (and thus most at risk if the ACA is repealed without replacement), along with the following map:



I think this could be more useful by grabbing some U.S. census data.

The following map makes the potentially troubled areas immediately clear.  Bubble size indicates the total number of newly insured, and color indicates the ratio of newly insured to the population under 65.    



Tuesday, June 27, 2017

Sunday, June 25, 2017

Pro tip: when leaving on a 2+ week business trip to France...

... don't bring a phone that bricks within 12 hours of your arrival, especially if they can't send a replacement to a non-U.S. address.  #bootloop

Tuesday, May 16, 2017

Seafall: A Legacy Game

Seafall is a game that straddles the line between traditional board games and role-playing games, with a "storyline" that carries over from session to session through a campaign of multiple games.

On the strength of this Slate article, we acquired a copy for Christmas and finished the campaign this past weekend.  We played a total of 14 sessions, including the "Prologue" game, and had a great time, especially in the earlier sessions.  That's 40-50+ hours of entertainment for 4 people for $40, and no fights for several weeks over what we're playing for game night.  Can't ask for a better deal than that.  However, I can't wholeheartedly recommend the game without mentioning some caveats.

This is a good-looking game with solid pieces that would hold up for many, many more sessions.  However, as a Legacy game, the campaign is now over, and the driving interest in playing the game (the ongoing storyline) is gone and the mechanics of the post-campaign "game" aren't exciting, so we're disposing of it.  Fortunately most of the game is paper and cardboard, so it's nearly all recyclable.  I'm totally down with idea of an "experiential" game that doesn't clutter up the shelves when we're done with it, but if the idea of throwing away a game gives you the willies, this one may not be for you.

You get to make permanent alterations to the board, cards, and other elements of the game. This is transgressive, and can either feel exhilarating or horrifying.  Again, if drawing in permanent marker "ruins" a board game, this may not be for you.

You need to be a group that is okay with uncertainty, because as noted in pretty much every review of the game, the rules are not always clear.  There were many times we felt having someone familiar with the game to act as a gamemaster would have been helpful.

Each session simultaneously takes too long and not long enough.  As with most strategy games, the estimated playing time of 90-120 minutes is a gross underestimate.  With setup, cleanup, keeping abreast of changes to the basic rules, and two kids at the table, we needed to set aside about 4 hours for each session.  However, very few sessions saw a third in-game year.  Each year is broken up into 6 turns; one of us usually won by turn 10-12, often by triggering something that gave an unexpectedly large amount of glory (victory points). I suspect this is because we made more progress on the main storyline than expected per session, partly because we tend to play games fairly cooperatively (see below). Unfortunately, this meant that long-term strategies were not worth pursuing, and even medium-term plans were ruined by unanticipated events.  If your group is into making up house rules, I would be strongly tempted to time box the game so that you play a certain number of in-game years per session, possibly varying the number of years from session to session, rather than to a certain amount of glory.  

There are many, many times when you're presented with an old-school "choose your own adventure" type of decision, where you might take a "cautious" path or a "bold" path, one choice will have a potentially bad effect, and it's impossible to tell which is the "right" choice from the information you have available.  I'd rather the results be roughly equal, but different; for example, the "cautious" choice might result in no ill effects and give a moderate reward, while "adventurous" might cause some pain but also greater rewards.  Knowing this in advance, your group might come to an agreement on how to change the risk/reward system.

It's extremely difficult to play "friendly".  We like cooperative games and competitive games that don't require you to attack other players.  Part of the assumption in the balancing of Seafall is that players will gang up on the player who is in the lead.

Still and all, we thoroughly enjoyed ourselves, loved the concept of the game, and hope to see others like it that learn from the experience of Seafall.


Friday, April 14, 2017

Arrests in the NFL versus the general population


I saw, on FB, this article on how a single NFL team has had no players arrested in the last 3 years, and since I'm a statistician, my first thought was, "how does that compare to the general population?"

Very back-of-the-envelope speaking, there were about 3.2 million arrests of males between the age of 21-34 (inclusive) in the U.S. in 2012**.  There were about 32 million males in that age range in the U.S..  So, very roughly speaking, about 0.1 arrests per year per male aged 21-34, which is roughly the demographic for NFL players.

Assuming that arrests occur like a Poisson process and using 0.3 arrests per 3-year interval as the parameter of a Poisson distribution, there is approximately a 74% probability of a randomly selected male aged 21-34 not being arrested in a three-year period.  The probability of 50*** randomly selected men all not being arrested is 0.74^50, or 0.00003%, so the probability that at least one person on that team was arrested is 99.99997%.

Thus, the very back-of-the-envelope estimate of the probability of all 32 NFL teams having at least one player arrested during a three-year period, if they were equivalent to members of the general public, is 0.9999997^32 = 99.999%.  So it seems to me that it's extremely unusual for *any* of the NFL teams to be arrest-free over a three year period.


** Click National Estimates, Annual Tables, 2012, Offense by Age for Males

*** 50 being approximately the size of an NFL roster

Tuesday, January 24, 2017

Is Duolingo trying to tell me something?


After a quick pre-test, Duolingo generously, extremely generously, marked me as 52% fluent in Spanish.  Over the last 5 days of casual use, it has corrected the estimate to 49% (still generous), and then today gave me the following in the "Medical" section.

I guess I hope this is a phrase that appears in every language track, and not something they thought would be especially useful in Spanish?  or especially useful for me personally?