Excel challenge solution: Mastermind

Excel challenge solution: Mastermind

A few weeks back, I published an Excel challenge to score, and maybe solve, the game Mastermind in a spreadsheet. Today, I’m going to share some solutions to that challenge. To avoid repeating myself a lot, I’ll assume you’ve read the original challenge already – if you haven’t, I’d suggest you take a look at that first.

[The picture is my own Mastermind board, a particularly excellent gift from my sister-in-law which inspired this challenge.]

Continue reading “Excel challenge solution: Mastermind”

Mapping divisions in the US Senate (part 1)

Mapping divisions in the US Senate (part 1)

Unless you’ve been living under a rock for the past several years, you may have heard that partisan divisions are the new normal in US politics, with the exercise of the ‘nuclear option’ to confirm some Presidential appointments, the refusal by the Senate to hold a vote on the President’s nomination for the vacant Supreme Court seat, the brinksmanship around debt-ceiling negotiations (at the time of writing, that link goes to a disambiguation page on the term ‘United States debt-ceiling crisis’, the very existence of which kind of tells you all you need to know…), to name just a few examples.

Of course, it’s easy to think of examples of conflicts that have been in the news lately, and not so easy to get an objective view of long-term changes. So I thought it would be interesting to look at the question with some hard data on how the members of both parties actually vote. Voting data for the US Senate back as far as 1989 is very easily available through senate.gov, and similarly for the House.

Continue reading “Mapping divisions in the US Senate (part 1)”

Bar games, advanced maths, and more circular references

Bar games, advanced maths, and more circular references

So, I promise this blog isn’t going to only feature puzzles and Excel challenges (next ‘real’ post on Friday, if all goes according to plan), but I enjoyed this week’s Riddler enough that I thought I should write something on it.

Consider a hot new bar game. … A marker is placed at zero on [a] number line. Then [a] coin is repeatedly flipped. Every time the coin lands heads, the marker is moved one integer in a positive direction. Every time the coin lands tails, the marker moves one integer in a negative direction. You win if the coin reaches -X first, while your friend wins if the coin reaches +Y first. (Winner keeps the coin.)

How long can you expect to sit, flipping a coin, at the bar?

Here are a few ways you can tackle it (if you’re just an Excel nerd and not a general nerd, you can skip to the last one…):

Continue reading “Bar games, advanced maths, and more circular references”

Tennis, puzzles, and circular references

Tennis, puzzles, and circular references

I’m a big fan of FiveThirtyEight’s weekly puzzle, the Riddler, which has an interesting mix of puzzles with a mathematical flavor. This week’s puzzle asks you to pick the best starting score for a tennis game against a much stronger opponent, and it has a very neat solutions with iterative calculations (circular references) in Excel.

Here’s the full puzzle:

Your wish has been granted, and you get to play tennis against Roger Federer in his prime in the Wimbledon final. You have only a 1 percent chance to win each point, but Roger, sporting gentleman that he is, offers to let you name any score and begin the match at that point. (So, if you’ve entertained a fantasy of storming back after being down three match points in the fifth set, now’s the time to live it.) What score can you name that gives you the best chance to win, and what is your chance of winning the title?

Continue reading “Tennis, puzzles, and circular references”

The road less traveled

The road less traveled

Trying to find an interesting insight in a big set of data is like digging for treasure. If you don’t know what you’re looking for, your chances of finding something great are very slim indeed (in this analogy, a good hypothesis can play the role of a treasure map – but that’s a conversation for another day). And if you do find something promising, it may be more of an uncut diamond that needs a lot of work to reveal its real value.

But every once in a while, you might just find a shining gem sitting right by the surface on an island you just started exploring. This was one of those times.

Continue reading “The road less traveled”

Who’s going to win my Euro 2016 pool?

Who’s going to win my Euro 2016 pool?

I’m in a pool at the moment for Euro 2016. Every entrant predicts the results of the group stage games, and then of the knock-out stages, with increasing points for a correct call in each round.

Since there are only 8 games left (4x quarter-finals, 2x semis, 3rd place, and the final), I though it would be interesting to see who would win in the different scenarios. The result was the ‘Matrix of Triumph’ below, which shows who will win for every remaining outcome. It’s pretty easy to put together (<30 mins work) by the steps below – if you’re in a pool too, you should give it a try.

Continue reading “Who’s going to win my Euro 2016 pool?”