## A Bayesian look at Star Trek’s ‘Redshirts’

Hello, welcome back to the Cognitive Whiteboard. My name’s Jim. And today we’re going to be taking a Bayesian look at Star Trek’s red shirts. And in particular, the idea that the red-shirt-wearing characters in Star Trek are the perfect example of a disposable character who’s unlikely to make it to the end of the episode without dying. And if you look at the numbers from the original Star Trek series where William Shatner was Captain Kirk, that would certainly seem to be the case. The majority of the deaths are people wearing a red shirt. However, I thought it’d be interesting to use Bayes’ theorem to actually test this hypothesis and figure out who of these three people should be the most worried. Should it be myself wearing the science and medical team blue, our CEO, Luke wearing the leadership command gold, or Eileen, our Chief Operations Officer wearing the operations and engineering red?

So to do that we’re going to need our information here about who died and also some information about the total breakdown of the crew on the Starship Enterprise. So, if we take that information and Bayes’ theorem, which I’ll explain in a moment, we can then try and calculate how concerned each of these people should be. So, what we actually want to look at is what is the probability that someone will die given they are wearing a red shirt. And that’s what we can use Bayes’ theorem for. Testing a hypothesis based on some known observation that we have made. And to do that, we need to combine several probabilities. The first one is the likelihood function, and that’s telling us what is the probability that somebody was wearing a red shirt given that they died.

And that would be our original data here. So that would be our 26 red shirts out of 45.

We then got the prior and that is the prior probability of dying in the first place. So that’s a total of 45 out of the total crew of the enterprise of 429. And then finally, we’ve got the marginal probability, which is our probability of wearing a red shirt regardless of whether we live or die during the series. And that would be our 240 red shirts out of the total 429. So, if you put those numbers in, we actually come out with a surprisingly low 11%. And the reason for that really is because yes, the majority of the characters who die are wearing a red shirt, but the majority of the crew are wearing a red shirt, so they’re not necessarily more likely to actually meet their end on the show.

If you calculate for the other colors, then the blue shirt comes out at about 7% and then the command gold comes out 19%. They’re actually nearly twice as likely to meet their end compared to the red shirts. So, Eileen has no real need to be any more concerned than me, but Luke maybe has something to worry about if he gets sent off to an unknown planet. However, we all know that the best example of a disposable character is someone who isn’t given a name. So we don’t have room for all the maths, but you can actually calculate this for somebody who doesn’t have a name and use that to update the prior in Bayes’ theorem. And that’s something else you can do based upon more observations that you make, you can update the probabilities that you calculate and update this prior information here and the marginal as well.

So if we do that and actually go through the process of updating that prior, if the red shirt wearing character does not have a name, then that probability shoots up to 33%. So that was just quite a good example of the use of Bayes’ theorem but also how we can go about updating the prior information as well. So, Luke should be concerned a little bit more than before, but we know Eileen’s name so she is absolutely fine. So hopefully we’ll come up with some more examples of these that we can maybe look at as the Whiteboard series goes on. But until then, I hope that was interesting and I’ll see you back here in the future. Take care.