My previous post on mathematics in science fiction had a serious omission -- I ignored probability and statistics. These two subjects are often lumped together, but they are, in a way, opposites. In probability, you know the rules of the game ahead of time (I roll a die, and each number from one to six is equally likely) and you have to calculate the odds of various outcomes (how likely is it that I will roll three sixes in a row?) Statistics is just the opposite: you are given the outcomes and are trying to figure out the rules of the game. If you have a bunch of "data", what is the likelihood that they were produced from a particular model of the universe? In his book Numerical Recipes, Bill Press and his collaborators describe statistics as "that gray area which is surely not a branch of mathematics as it is neither a branch of science." I couldn't agree more.
Probability is clean and precise, and I really enjoy it. I've written several papers about the pattern of galaxy clustering in the universe (technically, this is called the "large-scale structure" of the universe) based largely on different aspects of probability theory. Probability is my friend.
Statistics, on the other hand, is not my friend. It's a necessary evil, like a decennial colonoscopy. Statistics is the Norse trickster god Loki -- it's slippery and untrustworthy. There are even different sects within statistics whose members base their analyses on completely different fundamental assumptions. For example, you can be a Bayesian or a frequentist -- these two groups fought an inconclusive war that devastated Germany in the 17th century. (By the way, don't believe everything you read on the internet). For a less jaundiced and undoubtedly more accurate view of statistics, read the various posts on Michael Flynn's blog, such as this one.
How have these subjects entered science fiction? A very clever treatment of statistics is "The Law," by Robert M. Coates, which appeared in 1947 in The New Yorker of all places (in the unlikely event that you subscribe to the The New Yorker, you can read the full story here). In Coates's story, the law of averages breaks down, so that, for instance, everybody tries to get on the same bridge at the same time. A similar idea is presented in "A Very Good Year," by Jack C. Haldemann (not to be confused with his brother Joe Haldemann). In Haldemann's story, nobody dies for a whole year, but then the law of averages takes over the following year with a vengeance.
It's harder to find treatments of probability in science fiction, unless you count the many times it appears in stories of quantum mechanics (some of which I've discussed earlier). Greg Egan's Quarantine makes particularly interesting use of probability theory as it applies to quantum mechanical measurements.