# A Rock-and-Roll Riddle

If this post isn’t proof I can turn anything into an nerdy discussion about probability, nothing is. The Afghan Whigs are currently touring for their (fantastic) new album, In Spades. After playing a show in Dublin, a funny conversation popped up on Twitter between an Irish fan of the band and Greg Dulli, lead singer.

Let’s break this down:

1. David is claiming it’s been 11 years since The Afghan Whigs have toured in Ireland.
2. Greg Dulli, known expert on all things that Greg Dulli does, says he’s been to Ireland 10 times out of the last 20 years.

The answer is obvious. Greg is right. He is, after all, Greg Dulli. But what’s the probability, based on the information given, that they are both right?

We have to assume a couple of things.

One, performing in Ireland “10 times out of the last 20 years” can mean multiple performances in one year and none in another. So for example, the band may have played Dublin and Cork in 1999 (two performances), but didn’t tour in Ireland in 2000. This is actually closer to the truth than the band playing 10 years in a row than taking 10 years off.[1]

Two, since we’re halfway through the year, I’ll count 1998 as 20 years ago since it’s easier to run this simulation by years than months.

How many combinations of 10 performances can we have in 20 years? With repetitions, the formula looks like this.

$\frac{(r + n -1)!}{r!(n-1)!}$

Our n is the number of things (20 years) and our r is the number to be taken (10 performances). Plug those numbers in and the answer is 20,030,010 possible combinations. But if we want to know the probability of both Greg and David being correct, we need to know how many of those combinations include performances that didn’t take place in the last 11 years. To do this, we need to list every single one of those 20 million combinations.

Thankfully, statistical programming languages like R exist so we can use hacker statistics. In R, it’s as simple as using the combinations function from the gtools library.

The following creates a matrix containing every single combination:

library(gtools)
years = seq(1998,2017, by=1)

n = 20
r = 10

c = combinations(n,r,years, repeats.allowed=T)


Just a warning, this will take some time. The c object will roughly take up 1.5GB of space.

Printing the first six lines of the matrix will look a little like this:

     [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,] 1998 1998 1998 1998 1998 1998 1998 1998 1998  1998
[2,] 1998 1998 1998 1998 1998 1998 1998 1998 1998  1999
[3,] 1998 1998 1998 1998 1998 1998 1998 1998 1998  2000
[4,] 1998 1998 1998 1998 1998 1998 1998 1998 1998  2001
[5,] 1998 1998 1998 1998 1998 1998 1998 1998 1998  2002
[6,] 1998 1998 1998 1998 1998 1998 1998 1998 1998  2003


You can read those rows like “The Afghan Whigs performed 10 times in 1998,” “They performed nine times in 1998 and once in 1999,” etc. We want to know how many of these combinations only include performances before or in 2006. You can subset the matrix using the following:

subset = c[!rowSums(c>2006),]

The subset actually narrows down the number of possible combinations from 20 million to 43,758! Finding our probability of both David and Greg being correct is now easy:

$\frac{43758}{20030010}=0.002184622$

Sorry, David. Even without further proof from Greg that The Afghan Whigs performed more recently than 11 years ago, the probability of them playing 10 times in Ireland in the last 20 years but only before 2006 is slim: 0.2%.[1]

[1] But probability being what it is, it’s not outside the realm of possibility for a band to break up and spend a long period not touring, then reunite. The Afghan Whigs, in fact, broke up in 2001, temporarily reunited in 2006, then permanently reformed in 2011. Greg continued to tour with multiple bands, including The Twilight Singers and The Gutter Twins (as well as solo shows). I didn’t take this into account in the post because it adds A LOT of complexity and an explanation like this. But if you’re curious, here ya go:

The number of possible combinations is reduced to 8,436,285, since we’re now talking about 14 possible years not 20 (since the band technically wasn’t together for six of them). Removing every combination of performances taking place after 2006 results in 1,001 combinations, which yields a probability of 0.0008749495 or 0.08%.