Friday, May 6, 2016

Will the Senate Flip?

The Cook Political Report rates the competitiveness of Senate races using terms like "solid," "tossup," and so on. Currently,

  • Of the 10 Democratic seats in play, 7 are solid D, 1 is likely D, 1 leans D, and 1 is a tossup.
  • Of the 24 Republican seats in play, 11 are solid R, 6 are likely R, 1 leans R, and 6 are tossups.

The Democrats have fewer seats in play, and the Democratic seats are generally safer. Obviously this situation favors the Democrats. Is it enough to flip the Senate? Currently, the Republican majority is 54–46 (awarding the two Independent senators to the Democrats, since that's who they caucus with).

For the sake of building a toy model, I assigned probabilities to the Cook Report's verbal ratings as follows:

  • For a tossup race, I assigned both outcomes equal probability ½.
  • For leaning seats, I assigned probability ⅔ to the outcome matching the lean.
  • For likely seats, I assigned probability 0.85 to the likely outcome.
  • For solid seats, I assigned probability 1 to the indicated outcome.

These parameters aren't based on any firsthand knowledge of the races in question, they're just ballpark figures.

With probabilities assigned, it is easy to simulate the election many times on a computer. Assuming no coding errors (I did this on my lap during jury duty today), we obtain a probability around 24% of the Senate flipping to a majority for the Democrats.

Also, the probability of a fifty-fifty split is 20%, in which case the Vice President delivers a majority for whichever party wins the Presidential election.

Here is the frequency distribution of outcomes based on a million runs of the election. The blue bars represent flipping scenarios, and you can check that their fractions add up to 24%.




Now, don't take this analysis to the bank or anything. The Cook data are bound to change as time goes on, and on top of that, the probabilities that I assigned to Cook's verbal ratings are somewhat arbitrary. For example, if "likely" means probability 0.75 (instead of 0.85), then the chances of a flip increase from 24% to 34%. Intuitively, more volatility is bad for Republicans because they have more seats in play. Conversely, less volatility favors them; if "likely" is 0.95 and "lean" is 0.9, then the chances of a flip are only 12%.

Tuesday, May 3, 2016

Sam Wang

Tonight Donald Trump appears to have locked up the Republican nomination. If you read Sam Wang, this news has been a long time coming. Here's what the Bayesian analyst neuroscientist said back in February:
...it would take a seismic event to change the trajectory for either Hillary Clinton or Donald Trump.
Media figures are pressured to fill a daily “news hole.” I am not under this pressure. Since I don’t perceive the coming months as being all that suspenseful, I’m tempted to sign off on Presidential coverage until June!
...My guess is that it’s time to get used to these two particular faces between now and November.
This was back when Rubio was still competing for the nomination. I have long believed that Trump and Clinton would become the nominees, and that isn't because of my own perspicacity—it's because, as a Bayesian myself, my practice is basically to decide to believe whatever it is that Sam at the time believes, and to believe in it just as strongly or as weakly as he does.

Update 5/7/2016: Quelle horreur: Sam says he's a closet frequentist! Well, that's OK, we all are sometimes. My toy model of the Senate race from yesterday is just frequencies too.

Saturday, April 30, 2016

Welcome to Oklahomainewmexiconnecticutah!

1. Which state name is last alphabetically?

Wyoming

2. Which state name ends in three vowels?

Hawaii

3. Which state names begin and end with the same letter? (4)

Alabama, Alaska, Arizona, Ohio

4. Which two state names end with the letters LAND?

Maryland, Rhode Island

5. Which state names have a double letter? (9)

Connecticut, Hawaii, Illinois, Massachusetts, Minnesota, Mississippi, Missouri, Pennsylvania, Tennessee

6. True or False? Every letter of the alphabet is needed to write the names of the fifty states.

False: You don't need Q.

7. Which state names could be spelled out very nicely in capital letters using toothpicks because none of the letters are curved? (2)

HAWAII, MAINE

8. Which state name has the fewest syllables?

Maine

9. Which one-word state name has the most syllables?

Louisiana has five syllables—unless you live there!

10. Do more state names end with a vowel or end with a consonant? (Take bets first!)

More state names end with a vowel.

11. Do more state names begin with a vowel or begin with a consonant?

More state names begin with a consonant.

12. One day, the citizens of Florida and the citizens of Idaho noticed that the last part of "Florida" is the first part of "Idaho." So they voted to become one state, Floridaho! Can you think of any other states that could vote to unite because of matching first and last parts?

Looking only for matching parts that have two or more letters, I found these possibilities:

Vermont, Montana → Vermontana
Wisconsin, Indiana → Wisconsindiana
Alabama, Maryland → Alabamaryland
Ohio, Iowa, Washington → Ohiowashington
Oklahoma, Maine, New Mexico, Connecticut, Utah → Oklahomainewmexiconnecticutah

13. I once drove a car through three consecutive states all beginning with the same letter. What were the states?

Iowa, Illinois, Indiana

14. If you want to leave this state by crossing the border into the state that immediately follows it in alphabetical order, you can do that - but only if you're on a boat. What state is it?

Michigan

15. The only two states that have this letter in their name also happen to share a border. What letter is it?

X

16. Starting out from this state, I can drive due north, or due east, and in either case enter a state that has no letters in common with the state where I started. In what state did I start? (2 possible answers)

Kentucky: drive north into Ohio along Interstate I-71, and drive east into Ohio along Route 10 in Greenup County.

Utah: drive north into Wyoming along Pigeon Canyon Road in Daggett County, and drive east into Wyoming along Interstate I-80.


UPDATE 5/1: Changed #16 to correct an error.

Tuesday, April 26, 2016

Fifty-State Word Games

I made these puzzles during a family vacation when my kids were getting antsy and needed something to do. (It was my wife who got the ball rolling by proposing #5.)

For reference, I gave the kids an alphabetized list of state names. Puzzles 13-16 also call for a map. Supply copious hints as needed!

1. Which state name is last alphabetically?

2. Which state name ends in three vowels?

3. Which state names begin and end with the same letter? (4)

4. Which two state names end with the letters LAND?

5. Which state names have a double letter? (9)

6. True or False? Every letter of the alphabet is needed to write the names of the fifty states. 

7. Which state names could be spelled out very nicely in capital letters using toothpicks because none of the letters are curved? (2)

8. Which state name has the fewest syllables? 

9. Which one-word state name has the most syllables?

10. Do more state names end with a vowel or end with a consonant? (Take bets first!)

11. Do more state names begin with a vowel or begin with a consonant?

12. One day, the citizens of Florida and the citizens of Idaho noticed that the last part of "Florida" is the first part of "Idaho." So they voted to become one state, Floridaho! Can you think of any other states that could vote to unite because of matching first and last parts?

13. I once drove a car through three consecutive states all beginning with the same letter. What were the states?

14. If you want to leave this state by crossing the border into the state that immediately follows it in alphabetical order, you can do that - but only if you're on a boat. What state is it?

15. The only two states that have this letter in their name also happen to share a border. What letter is it?

16. Starting out from this state, I can drive due north or due east and enter a state that has no letters in common with the state where I started. In what state did I start? (2 possible answers)


UPDATE 5/1: Changed #16 to correct an error.

Sunday, April 24, 2016

BAA to WRY in 32 Steps

In this post, I'll show the promised long chain from BAA to WRY. To make contact with where we began, I'll recast the problem as an Alphabet Slider.


Right now, the sliders indicate the word BAA. If you move the sliders down far enough, you can indicate the word WRY.

So here's the game: how many words can you form by moving sliders downward? The game is over when the sliders finally indicate WRY.

Note, on each play, exactly one slider moves down.

(For the answer I found using a computer, scroll down.)




























BAA
BAD
BAG
BAH
BAM
BAN
CAN
CAP
CAR
EAR
FAR
GAR
GAS
HAS
HAT
HAW (fruit of a hawthorn)
JAW
LAW
LAX 
LAY
MAY
NAY
PAY
RAY
SAY
SHY
SKY
SLY
SOY
TOY
TRY
WRY

This solution leaves the central A in place for a very long time, eventually harvesting a run of six -AY words before finally taking advantage of the possibilities afforded by the initial letter S to branch out at the middle position.

Here's what the endgame looks like as a graph. Each vertex is a word, and an arrow points from one vertex to another if it is a fair play to change the first word into the second. (I removed direct shortcuts from the graph.) Sorry the word labels aren't visible—LAX is at the top, and TRY is at the bottom.






Thursday, April 21, 2016

Directional Change-A-Word

Inspired by reader mdahlman's comment on the Alphabet Slider puzzle, I came up with this variation on the traditional "Change-A-Word" puzzle:

BAA

WRY
Change one letter at a time until BAA becomes WRY. Each intermediate step must be a valid word. You may only change a letter into one that occurs later in the alphabet. 
I was able to do this in four steps. Can it be done in three?

At the other extreme, the most meandering solution that I could find has 31 steps. (I found it using a computer.) I'll share it next time.

***

Some notes:

(1) This game isn't equivalent to the one mdahlman had in mind, because only one letter at a time can change.

(2) A long time ago, I reported that in the standard Change-A-Word game, most four-letter words can be reached from most four-letter words. Four-letter words are like a vast, connected raft, or continent, with just a few isolated offshore islands. Here's the largest of the islands:


In a comment on that post, reader danimal suggested a variation on Change-A-Word in which the player may only change a given letter to a letter adjacent to it in the alphabet. I found it difficult to create instances of that version of the game, but the upshot of the present post is that we get plenty of instances if we replace the adjacency requirement with a directional requirement.

Saturday, April 9, 2016

Alphabet Slider, Cont'd

The slider mechanism in the Alphabet Slider puzzle determines what's called a "partial ordering" on three-letter words. Specifically, given two words w1 and w2, we write

w1 < w2 

if every letter of w1 occurs earlier in the alphabet than the corresponding letter of w2. For example, we write

ACE < PYX

because A is earlier in the alphabet than P, C is earlier in the alphabet than Y, and E is earlier in the alphabet than X.

There exist words "between" ACE and PYX. For example,

ACE < EON < PYX

as you can check. A solution to the Alphabet Slider is a chain like the one above, and the goal is to find the longest possible chain. With the help of a computer, I found this solution:

ACE < BEG < CHI < DIM < EON < FRO < ITS < JUT < PYX.

(An equally long chain results from using NUT instead of JUT. A reader also notes that OUT could go in this position.)

Here's a picture—note that lines never cross.

The game can be played with words of any length. For example, here's a pretty good chain of four-letter words:

ABBE < DILL < ELMS < FONT < GROW < JURY.

For eight-letter words, I found

HEADACHE > KNEELING > SPONSORS.