r

How Many More Palindrome Dates Will You See?

I'm currently on paternity leave and in search of quick but interesting programming challenges to stay fresh. The latest Riddler Express provided a quick refresher on string manipulation. If we write out dates in the American format of MM/DD/YYYY (i.e., the two digits of the month, followed by the two digits of the day, followed by the four digits of the year), how many more palindromic dates will there be this century?

Winning the World Chess Championship

This week's Riddler Express from FiveThirtyEight: The World Chess Championship is underway. It is a 12-game match between the world’s top two grandmasters. Many chess fans feel that 12 games is far too short for a biennial world championship match, allowing too much variance. Say one of the players is better than his opponent to the degree that he wins 20 percent of all games, loses 15 percent of games and that 65 percent of games are drawn.

Cubs World Series Puzzles (For Fun)

This week's Riddler Express from FiveThirtyEight: The best team in baseball this year, the Chicago Cubs, have clinched their playoff spot and will play their first playoff game a week from today. The Cubs’ road to the World Series title consists of a best-of-five series followed by two best-of-seven series. How many unique strings of wins and losses could the Cubs assemble if they make their way through the playoffs and win their first championship title since 1908?

A Modified Draft Pick Selection Order

In preparation for teaching a new computing course for the social sciences, I've been practicing building interactive websites using Shiny for R. The latest Riddler puzzle from FiveThirtyEight was an especially interesting challenge, combining aspects of computational simulation and Shiny programing: You are one of 30 team owners in a professional sports league. In the past, your league set the order for its annual draft using the teams’ records from the previous season — the team with the worst record got the first draft pick, the team with the second-worst record got the next pick, and so on.

Can You Best The Mysterious Man In The Trench Coat?

The latest Riddler puzzle on FiveThirtyEight: A man in a trench coat approaches you and pulls an envelope from his pocket. He tells you that it contains a sum of money in bills, anywhere from $1 up to $1,000. He says that if you can guess the exact amount, you can keep the money. After each of your guesses he will tell you if your guess is too high, or too low.

Can You Win This Hot New Game Show?

So the latest Riddler puzzle on FiveThirtyEight goes like this: Two players go on a hot new game show called “Higher Number Wins.” The two go into separate booths, and each presses a button, and a random number between zero and one appears on a screen. (At this point, neither knows the other’s number, but they do know the numbers are chosen from a standard uniform distribution.) They can choose to keep that first number, or to press the button again to discard the first number and get a second random number, which they must keep.

Will Someone Be Sitting In Your Seat On The Plane?

This week's Riddler puzzle on FiveThirtyEight features the following questions: There’s an airplane with 100 seats, and there are 100 ticketed passengers each with an assigned seat. They line up to board in some random order. However, the first person to board is the worst person alive, and just sits in a random seat, without even looking at his boarding pass. Each subsequent passenger sits in his or her own assigned seat if it’s empty, but sits in a random open seat if the assigned seat is occupied.

Do Cops Pull Over Fewer People in the Rain?

So I enjoy reading Deadspin on occasion, sometimes checking out Drew Magary's Funblog where he answers reader questions - usually few directly pertain to sports. A couple weeks ago, one reader wrote in asking: If you were a cop, would you ever pull someone over in the rain (presuming you aren’t a Seattle cop)? This got me wondering: are cops less likely to pull a person over in the rain?

Valuing Timeouts in Football (Part II)

Last week I examined how one can use logistic regression to estimate the value of a timeout, with minimal success. I promised a better way to estimate this value which frees us from some of the inherent limitations to logistic regression, mainly that the value of timeouts are linear (e.g. the difference in win probability from 3 to 2 timeouts is the same as from 2 to 1) and constant (e.

Valuing Timeouts in Football

On December 27, the Pittsburgh Steelers were down 13-3 against their rivals, the Baltimore Ravens, after the first half. The Ravens opened the second half with the ball, but quickly punted the ball following a three-and-out drive. On the following possession, the Steelers took over the ball on their own 21 yard line, and made a short gain followed by an incomplete pass. Facing second and 5 from their 26 yard line, Steelers quarterback Ben Roethlisberger had a problem: the play clock was winding down and the team was not yet set.