post

Read Issue 14 now!

Our latest edition, Issue 14, is available now! Enjoy the articles online or scroll down to view the magazine as a PDF.

✉️ You can also order a printed copy to your door, just paying P&P.

Features

Fun

Printed versions

or

Download Issue 14 as a PDF

post

That’s a Moiré

I was sitting in the back seat of my parents’ car, stopped at a junction. I could see two cars in front of ours and both had their indicators flashing. The amber lights were out of phase: one turned on just as the other went off, but then, over the course of a few minutes, they teamed up and were flashing in unison. Then, a few minutes later, they returned to being out of phase.

That memory has always stayed with me. I was a young child, and it would be years before I studied physics and learned about wave oscillations and beat frequency—the technical term for the phenomenon I had witnessed. The flashing frequencies of the cars’ indicator lights were slightly different, causing them to slowly drift in and out of phase with one another. The beat frequency is the frequency with which this phase oscillates, and as we’ll see below, it is equal to the difference between the two flashing frequencies. Continue reading

post

On the cover: Vhat? Vhere? Venn

More often than I care to admit, I find myself sitting in the audience of a maths lecture or seminar completely and utterly lost as to what the speaker is going on about. What are they talking about? How does this relate to stuff I know about? Where does this fit within the sphere of mathematics as a whole? In fact, most of the time I am lost beyond the first slide of a presentation. In an endeavour to minimise the possibility that audience members would experience this feeling that I know all too well, I recently introduced myself at the start of a talk with this slide:

You could be forgiven for remarking “My, what a beautiful Venn diagram you have there!” Indeed, I too was under the impression that what I had created was in fact a Venn diagram. Continue reading

post

In conversation with Dominique Sleet

There are many qualities attributed to mathematicians that we can be proud of: we’re logical, meticulous, intelligent, even creative. Despite maths being revered for needing all of these excellent attributes, one thing we are perhaps not so renowned for is our communication skills: most of the world still finds maths intimidating and opaque. That’s why Chalkdust sat down with science communication expert Dominique Sleet to learn the secrets that will help us to share the beauty of maths as far and wide as possible.

Science explained

Dominique began her science communication life as an explainer at the Science Museum in London. Many London-based Chalkdust readers will be keenly familiar with the Science Museum, but for those who are not, the Science Museum is pretty much exactly what it says on the tin. As well as many more traditional static galleries, it has several interactive galleries aimed at young people, which are like science-themed playgrounds.

The Science Museum (Wikimedia Commons user Shadowssettle, CC BY-SA 4.0)

Explainers are tasked with (you guessed it) explaining the science behind what they’re doing. “You get to play with some fun things, like putting flowers into liquid nitrogen and smashing them or blowing up a hydrogen balloon. The whole museum ethos is to build an association between fun and science. If there’s some learning in there then that’s great, but there doesn’t have to be; it’s just about nurturing that relationship.” But there’s plenty to learn if you’re looking. “Some of the science behind the exhibits is beautiful. We had this exhibit where you would look through polarising lenses at a thin layer of ice and you could see all these feathery beautiful patterns with amazing colours. I’m a nerd, I like science.”

Those of us who grew up to be Chalkdust editors could spend a cheerful afternoon churning out algebra, but for most children the liquid nitrogen has the more evident appeal. “Maths has its challenges. It’s a lot more abstract. With science, as long as you use the right language, you can make almost anything accessible, whereas with maths, you often need to have prior knowledge.” And don’t forget that intimidation. “People have this barrier, it’s almost like a badge, ‘I don’t do maths.’ And it’s really sad. So before you’ve even begun, you have to overcome this preconception of maths being like an alien language, and only for clever people.” People are often more receptive to the content if they don’t know that it’s maths—”Pattern Pod was my favourite gallery, which was for under-eights and all about maths, but we were looking at patterns and didn’t label it as maths.” Unfortunately, the plausible deniability can’t last forever, and inevitably your audience will notice that they are being subjected to maths: what then? “You need to show why something’s important and make it relevant to everyday life. You can’t get into the depth that you’d need to understand all the maths behind the exhibits, but you can go into some detail about how the maths was used, how it changed the world, and what impact it had on people.” The work does not end there however. How do we get people to turn up for maths in the first place?

A royal invitation

Dominique talking in the Royal Institution lecture theatre

Receiving millions of visitors per year, the Science Museum is well-placed to reach out to people who wouldn’t usually be interested. “But even then there are barriers. I remember doing an outreach programme in south-east London and people hadn’t even heard of the Science Museum. That’s why outreach is really important. Going out into local communities and finding the people where they are in their everyday lives.”

Dominique’s next job was at the Royal Institution (also in London), where she worked on everything from their famous annual Christmas lectures to their extensive year-round masterclass programme. So what’s the trick to running a maths masterclass? “Pick a topic that interests you because if you’re passionate about the topic then you’re halfway there. The kids aren’t going to be excited about something if you’re not excited yourself. In the same breath, you need to realise that, while you might find something amazing, other people really don’t. You’ve got to show them why it’s interesting.”

A braid made during one of Matthew Scroggs’s RI masterclasses


It was nice to hear a shoutout for one of Chalkdust‘s own, who apparently is quite the master of masterclasses himself. “This will sound like I’m sucking up, but I remember a session with Matthew Scroggs getting the kids to explore different braiding patterns. There’s actually some really interesting maths going on, because some combinations of braid would work and some of them wouldn’t. But at the end he was saying he doesn’t really understand it, he doesn’t know what makes a good braid and what doesn’t.” This open-ended aspect of maths often isn’t apparent until university, and school often leaves people with the idea that all the maths has been done. “Kids have this idea that maths can only be right or wrong, but in fact there can be lots of exploration. And maths can be really quite creative.”

When Dominique learned that the 2019 Christmas lectures would be focused on maths, and feature veritable maths celebs Hannah Fry and Matt Parker, she jumped at the chance to be involved. “My role was Christmas lectures assistant, a kind of catch-all. On the night itself, I’m the one in the front row, on the laptop with little prompts for Hannah—and at the same time, trying to keep an eye on messages from livestreaming venues, to make sure they’re all happy.” And it was a lot of hard work. “Very high pressure and some of the team would work until two o’clock in morning. It was crazy.” One of her contributions turned out to be very prescient, in a segment designed to show how mass vaccination succeeds. “I suggested that we use surgical masks to indicate that the kids were vaccinated and that they can’t catch the virus. Now looking back on it—oh my God! Told the future!”

Dominique with Christmas lecturer Hannah Fry


Of course, communicating maths for TV brings with it some new challenges. “Sometimes there will be conflicting priorities between the production team and the Royal Institution. The production team want everything to look flashy. Whereas obviously the RI still want it to be interesting, but we also want to make sure the integrity of the maths is still there.” Those who watched the Christmas lectures (if you didn’t, you should hang up your maths fanatic hat right now) will recall a specific sequence which involved schoolchildren lining up and then taking a step to either the left or the right based on the result of a coin toss. “What we were trying to show was that probabilities can help you predict outcomes. So we wanted to get this lovely bell-shaped curve from all the students moving about, but we didn’t get what we were hoping for. Partly because it’s hard to instruct a large group of people to do exactly what you’re asking, but also simply because probability doesn’t offer any guarantees.” So where did that leave the narrative of the lecture? “The fact that the kids didn’t do what we thought is actually a really interesting point in itself. But from a TV perspective, that’s the opening demonstration and we can’t go off on a tangent. So we ended up having a montage of two different schools in the lecture.”

Widening participation

As Dominique moves on to her next job working on the outreach programme at Imperial College London, she finds that the university setting has an increased focus on widening participation—so how do we convince young people from underrepresented groups to consider maths? She says an obvious start is making your event free if possible (since financial barriers often have a big impact), and ensuring diverse role models are present. “Representation does matter—look for different people from different backgrounds, from different areas, as well as different topics.” Marketing is also crucial. “You can have the best outreach in the world, but if nobody knows about it and it’s not reaching the right people, then it’s not doing anything.” But don’t think your job is over once you have them in the room. “The audience should be kept at the forefront of your mind. You need to be thinking about who your activity is for, what you want them to learn and how are you going to make sure they actually understand?”

Finally, she encourages everyone to take the necessary time and effort to accommodate accessibility needs. “Putting a bit of effort in to make it as accessible as possible, whether that’s looking at the colour scheme you’re using for colour blindness, not putting too many words on a screen, or having materials available in advance or in large print. All of those accessibility things can feel like extra work but they’re only ever going to improve it. Good for everyone—not just the person you are trying to accommodate.”

Having only been at Imperial for three months, she is is still reasonably new to the job, but has a lot of positive things to say about what she has seen. Her current project focuses on sixth formers. “I think the programme itself is really worthwhile, it’s very intense. There are online courses, with mentoring sessions in small groups throughout the year as well as large welcome and closing events on campus, although as you can imagine these have had to convert to online events in recent times.” Looking to the future, she says: “There is a move to intervene earlier in children’s maths education so Imperial, like many other organisations, have a growing number of outreach programmes aimed at younger students.” We wish her all the best in her latest endeavour.

post

An odd card trick

Martin Gardner—one of history’s most prolific maths popularisers—frequently examined the connection between mathematics and magic, commonly looking at tricks using standard playing cards. He often discussed ‘self-working’ illusions that function in a strictly mechanical way, without any reliance on sleight of hand, card counting, pre-arrangement, marking, or key-carding of the deck. One of the more interesting specimens in this genre is a matching trick called the magic separation.

This trick can be performed with 20 cards. Ten of the cards are turned face-up, with the deck then shuffled thoroughly by both the performer and, importantly, the spectator. The performer then deals 10 cards to the spectator and keeps the remainder for herself. This can be done blindfolded to preclude tracking or counting. Not knowing the distribution of cards, our performer announces she will rearrange her own cards ‘magically’ so that the number of face-ups she holds matches the number of face-ups the spectator has. When cards are displayed, the counts do indeed match. She easily repeats the feat for hecklers who claim luck.

How the illusion works

The magic separation was first devised by Bob Hummer in his pamphlet Half-a-Dozen Hummers back in 1940, and since has been the subject of discussion in books by senior conjurors such as Bill Simon in Mathematical Magic from 1964, Karl Fulves in Bob Hummer’s Collected Secrets in 1980, and by the master of mathematical puzzles Martin Gardner in his aptly named book The Scientific American Book of Mathematical Puzzles and Diversions from 1959. The unusual step of allowing the deck to be out of the performer’s control makes the trick particularly baffling, but this is simply a diversion to further obscure its deterministic workings. What might these workings be?

The water and wine riddle: a litre of wine is transferred to the water container, then a litre of mixture is transferred back. Is there more wine in the water than water in the wine?

Gardner explained the trick in terms of a conservation of mass property, borrowing from the classic riddle of equal containers of water and wine. Namely, if a litre of wine is transferred to the water container, which is then stirred, and a litre of the mixture is subsequently transferred back to the wine container, is there more wine in the water than water in the wine?

Intuition often suggests there is, since the first transfer was pure wine, while the second, reverse transfer was a water and wine mixture. This intuitive, but incorrect supposition is what renders the magic separation trick so likewise remarkable. In fact, there is as much water in wine as wine in water: since the starting and ending volumes in the containers are equal, whatever wine is in the water container must be matched by whatever water is in the wine container.

This conservation principle can be concretely demonstrated for the magic separation by starting with two separate piles, one of 10 face-up cards and the other of 10 face-down cards. Now, make a one-for-one exchange of cards between the piles any number of times you wish. You can make each selection randomly and you can even shuffle each pile after each transfer. The only condition is that transferred cards maintain their original orientations. At the conclusion, each pile still has 10 cards that will now be some mixture of face-ups and face-downs. What one necessarily finds is that the number of face-up cards in one pile (analogous to the wine) equals the number of face-down cards in the other pile (analogous to the water). The ‘magic’ part of the magic separation is that our performer simply—though with some theatrical flourish—turns her pile over to force matching numbers of cards.

In Hummer’s original 1940 pamphlet, he referred to this trick as “sure fire” and it is now easy to see how this is the case. Indeed, the deterministic outcome enabled by combining conservation with the ‘turn over’ manoeuvre and the elegant misdirection of spectator shuffling has made the magic separation a standard part of the close-up magic toolkit. The original trick has since expanded into a large family of variations, both stylistically and in terms of the numbers of cards used.

The version above—10 cards up and 10 cards down—is popular and we shall call this a 10/10 configuration. Some other versions split a full deck evenly, while others use an uneven division of a deck, for example a 20/32 configuration. These variations go by many names within professional conjuring circles, including the match-upthe topsy turvy deck, and the gremlins.

Here come the mathematicians

The fact that there are so many versions of the magic separation and that they all seem to work on the same combination of conservation and turn over manoeuvre beckons a deeper mathematical look: is there some sort of general law that governs the magic separation family?

To start investigating this question, let $T$ be the total number of cards in the deck and $F$ be the number of face-up cards therein. Also, take $S$ as the total number of cards, face-up plus face-down, that the spectator is dealt. These are parameters that characterise a specific variation of the magic separation. However, separate from these are the variables, which, unlike parameters, are out of the performer’s control and which generally change each time the trick is performed because of shuffling. Following the Diaconis and Graham convention in their book Magical Mathematics, where an overbar indicates ‘face-up-ness’, let $\overline{\sigma}$ and $\sigma$ represent the respective numbers of face-up and face-down cards the spectator is holding and $\overline{\mu}$ and $\mu$ be the corresponding counts of the magician’s cards.

Four classes of cards, tallied respectively by $\overline{\sigma}$, $\sigma$, $\overline{\mu}$, and $\mu$, result from two types of division: spectator versus magician and face-up versus face-down.

The following tallies for cards held by each party are immediately implied: for the spectator $\overline{\sigma} + \sigma = S$ and for the magician $\overline{\mu} + \mu = T – S$. A third equation comes from noting that, although the cards are shuffled, the number of face-ups is fixed, no matter how the cards are distributed in any instance of the trick, meaning $\overline{\sigma} + \overline{\mu} = F$. The last, and most key ingredient is the observation that the number of face-up cards held by the spectator has to equal the number of initially face-down cards possessed by the magician because it is the conjuring ‘turn over’ manoeuvre that forces the matching effect into existence. In other words, the illusion only works if $\mu = \overline{\sigma}$.

These ingredients are now baked into the following mathematical pie. Rearrange the face-up equation as $\overline{\mu} = F – \overline{\sigma}$, substitute this into the equation tally for the magician’s cards, and then rearrange terms to find $\mu = \overline{\sigma} + T – S – F$. The only way $\mu = \overline{\sigma}$ can be satisfied is if the last three terms are self-cancelling, meaning that the mathematical condition enabling the magic separation is \[ F \>+\> S \>=\> T\>. \] For convenience, we will call this little result Hummer’s theorem.

Visualising the workings

Hummer’s theorem is actually quite profound in the sense that it explains how all extant variations of the magic separation work and also shows how to immediately invoke numerous newer versions, as limited, it seems, only by the number of cards the magician can physically handle. For instance, following some quick calculations using the theorem, one could readily perform much grander versions of the trick that combine, say, several full 52-card decks.

A Fisher table showing that a new drug is more effective than an old drug.

Another interesting aspect of Hummer’s theorem is that it immediately suggests how to visualise the workings of the magic separation at their most basic, mechanistic level by borrowing on $2\times 2$ contingency tables. Such tables are ordinarily used in the context of assessing whether two categorical variables, for instance medical treatment (old drug versus new drug) and clinical result (patient improves versus does not improve), are statistically related. One of the most common statistical calculations executed on such tables is something called Fisher’s exact test, so it will be convenient to call these $2\times 2$ structures Fisher tables.

Visualising the magic separation.

Now, in order to visualise the architecture of the magic separation, we use the columns for the people (spectator versus magician) and rows for the cards (face-up versus face-down). The diagram to the right shows the variables $\sigma$, $\overline{\sigma}$, $\mu$, and $\overline{\mu}$, and the parameters, $F$, $S$, and $T$, in such a table. A moment’s consideration should indicate that the only $2\times 2$ tables consistent with Hummer’s magic separation are those in which the leading diagonal entries are equal.

A 10/10 Hummer configuration (left), a 20/32 Hummer configuration (right).

A bit more consideration suggests that all Hummer-compliant tables are Fisher tables, but not all Fisher tables are Hummer tables. This is readily confirmed by example. The top two tables to the right satisfy diagonal equality, while the bottom table does not. Here, Hummer’s theorem is violated ($8+12\neq24$), so this instance lacks the required conservation property for the magic separation. These tables can be used to visualise the actual dynamics of the magic separation.

A non-Hummer table that violates the separation condition.

Tables representing a trick possess a conservation property: the margin totals are rigidly fixed. Because parameters $F$, $S$, and $T$ are likewise fixed for a particular variation of the magic separation trick, we can exploit the conservation property here to visualise the 10/10 pile experiment introduced above as a series of $2\times 2$ tables, one for each round of trades. The experiment starts with 10 face-ups for the spectator and 10 face-downs for the magician, resulting in the leftmost $2\times 2$ below.

In the first exchange, the spectator cedes a face-up card to the magician, who in turn passes back a face-down card, resulting in the round 1 table. Importantly, while the boxed variable tallies show each person’s new holdings, the margin tallies have not changed.

After shuffling both piles, the second iteration might see the same type of exchange, resulting in the table marked round 2. One could now step through many additional rounds of trades, sometimes exchanging cards of the same orientation, for which the table remains exactly the same, and sometimes exchanging cards of opposite orientation, whereby the boxed tallies are updated appropriately.

A performance of magic separation, represented as a pile experiment with no card exchanges made.

Every table would display constancy of margin totals and strict satisfaction of Hummer’s theorem, no matter how the cards are distributed. One possible endpoint to this 10/10 experiment is familiar from above.

In a sense, the magic separation trick itself could actually be thought of as a special case of this process that consists of the magician’s deal, with zero rounds of card exchange.

Heightened mystery of odd-numbered decks

In the original magic separation, Hummer emphasised that the deck size, $T$, must be an even number. Fulves’ instruction manual repeats this condition, as do Simon’s and another of Gardner’s books on mathematical magic. But here is a question: can the magic separation work if $T$ is odd?

The answer is not intuitively obvious. First, face-up cards must be matched one-for-one between spectator and performer, ie in pairs. Second, there are many tricks that do indeed require even-numbered decks (Diaconis and Graham discuss examples). However, since there were no parity conditions placed on $T$ in our derivation, we can immediately conclude that odd decks are indeed acceptable. A quick corollary to Hummer’s theorem evidently leads to a new and non-obvious extension of this 80-year-old trick!

Because this aspect is somewhat more difficult to perceive, a truth table showing all possible parity combinations can be helpful:

spectator magician $\overline{\sigma}+\overline{\mu}=F$ is satisfied?
case $F$ $S$ $\overline{\sigma}$ $\sigma$ $T-S$ $\overline{\mu}$ $\mu$
A even odd odd even even even even no
B even odd odd even even odd odd yes
C even odd even odd even even even yes
D even odd even odd even odd odd no
E odd even odd odd odd even odd yes
F odd even odd odd odd odd even no
G odd even even even odd even odd no
H odd even even even odd odd even yes

Half the cases—namely A, D, F, and G—are actually inaccessible because they violate $\overline{\sigma} + \overline{\mu} = F$. For instance, in case G, both people cannot hold an even number of face-ups if the total number of face-up cards in the deck, $F$, is odd.

For the admissible cases, B and C are the more pedestrian because the required parities are already established. Conversely, cases E and H are a little more interesting. Here, the magician’s own two subsets have different parities from one another and it is the conjuring ‘turn over’ that forces the parities of $\overline{\sigma}$ and $\mu$ to match because the latter now has become flipped. Hummer’s magic separation works even when there are an odd number of cards in a deck that itself starts with an odd number of face-up cards!

This ‘double-odd’ configuration is surprising and does not seem to have been empirically discovered over the eight decades that the magic separation has been performed.

KC Cole remarked in her book The Universe and the Teacup that mathematics can produce a “literal expansion of consciousness” and it seems that Hummer’s theorem, namely that the spectator’s card count plus the face-up card count must equal the size of the deck, marks yet another example of this amazing and long-established phenomenon. Keep that in mind the next time you dazzle your friends and neighbours with the magic separation.

post

Chalkdust issue 14 – Coming 22 November

Fantastic news! Chalkdust issue 14 will be released at 11am on Monday 22 November. You can preorder printed copies now!

The cover of issue 14

We’re really excited to share this new issue with you. Among the many articles, we have features on chess, visual beat frequency and the history of the Polish codebreakers. Of course there are also all your favourite regulars.

Here’s a sneak peak of the snazzy cover art inspired by Madeleine Hall’s article on Venn diagrams.

You can share your excitement about the upcoming issue with us on Twitter using #chalkdust14. 

You can still order physical copies of issues 11, 12 and 13, or view them as pdfs.

You can preorder issue 14 now, to get a physical copy sent straight to your home.

Alternatively you can find a free copy at the following universities:

  • Bath
  • Birmingham
  • Bristol
  • Cambridge
  • Durham
  • Edinburgh
  • Greenwich
  • Imperial College London
  • King’s College London
  • Liverpool
  • Manchester
  • Oxford
  • Queen Mary University of London
  • Reading
  • Royal Holloway
  • Scumbag College
  • Sheffield Hallam
  • UCL
  • University of East Anglia
  • Warwick

Have we missed out your university? Want to order some copies for the common room? Drop us an email at: contact@chalkdustmagazine.com

post

Crossnumber winners, issue 13

Hello everyone! It’s time to announce the winners of the issue 13 crossnumber competition! Before we reveal the winners, here is the solution of the crossnumber.

1 6 9 9 9 9 9 9 9
8 5 1 1 1 1 1 1 6 4
3 2 0 9
6 3 3 5 2 1 0 1 6 4
9 0 0 9 6 0 7 1 4
4 0 2 9 3 1 1 9 6 3
0 9 7 1
1 5 7 9 2 9 9 9 7 3
2 2 2 9 9 9 9 0 0
1 7 9 2 7 9 4 9 1 2
3 2 0 2
6 4 7 2 9 1 0 2 8 5
1 0 0 3 4 3 1 6 9

The sum of the across clues was 13704.

There were 82 entries, 68 of which were correct. The randomly selected winners are:

  1. Alistair Benford, who wins a £100 Maths Gear goody bag,
  2. Miguel Ángel Morales Medina, who wins a Chalkdust T-shirt,
  3. Yuliya Nesterova, who wins a Chalkdust T-shirt,
  4. Martin Schuh, who wins a Chalkdust T-shirt.

Well done to Alistair, Miguel, Yuliya and Martin, and thanks to everyone else who attempted the crossnumber. Keep your eyes peeled for issue 14’s puzzle, which will be released very soon…

post

Issue 13

Our latest edition, Issue 13, is available now! Enjoy the articles online or scroll down to view the magazine as a PDF.

To celebrate the launch of Issue 13, we’re encouraging you to make some art inspired by cellular automata. Read more here.

Features

Fun

Printed versions

or

Download Issue 13 as a PDF

post

In conversation with Ulrike Tillmann

They say variety is the spice of life and to us at Chalkdust, maths is life so it makes sense that maths is made better by variety. A variety of topics, a variety of people, a variety of poorly constructed maths puns. Ulrike Tillmann embodies this ethos with her work bridging the gap between pure and applied maths. Despite spending most of her academic career in the UK, Ulrike has lived in several other countries. She was born in Germany and then went on to study in the US. She is now a professor of pure mathematics at the University of Oxford and a fellow of the Royal Society, balancing her time between research, teaching, and outreach. She sat down with us to chat about her career and what the future holds, both for her and maths in general.

Taking the reigns

If you’ve been following maths news in the past few months, the name ‘Ulrike Tillmann’ may be particularly familiar to you. It was announced recently that she will be the next president of the London Mathematical Society, one of the UK’s five ‘learned societies’ for mathematics. She will also take up the mantle as director of the Isaac Newton Institute, a research institute at the University of Cambridge, in autumn of this year. Research institutes are perhaps the least well-known entities in the academic world (as viewed from the outside), often only visited by some of the most senior academics in a field. We asked Ulrike to explain what they are all about. “The Isaac Newton Institute runs mathematical programmes in quite a broad range of areas. These programmes typically run between four and six months and researchers come from all over the world to concentrate on their research.” The programmes are beneficial not only to individual mathematicians, but to the community as a whole. “Being together with your colleagues who are also experts in your area, and who are often completely spread all over the world, is a fantastic thing. It brings the field forward and it can make a big difference to that research area.” On paper, the role of director will involve overseeing the organisation of these programmes, but she sees it going beyond this, including “making sure that things like equality and diversity are not just observed, but also incorporated.”

Continue reading

post

On conditional probability: Cards, Covid, and Crazy Rich Asians

I was watching the film Crazy Rich Asians the other day, as there’s not a lot to do at the moment besides watching Netflix and watching more Netflix. I thoroughly enjoyed the film and would highly recommend it. However, there was something that happened in the first few minutes which really got me thinking and inspired the subject of this Chalkdust article.

The main character in the film is an economics professor (the American kind where you can achieve the title of professor while still being in your 20s and without having to claw your way over a pile of your peers to the top of your research field). Within the opening scenes of the film we see her delivering a lecture, in which she is playing poker with a student, while also making remarks about how to win using ‘mathematical logic’. The bell rings seemingly halfway through the lecture the way it always does in American films and TV shows, and our professor calls out to her students “…and don’t forget your essays on conditional probability are due next week!” Now, I am not going to delve into the question of what type of economics course she is teaching that involves playing poker and mathematical logic, but it got me thinking—what exactly would an ‘essay on conditional probability’ entail?

What is conditional probability?

Conditional probability is defined as a measure of the probability of an event occurring, given that another event (by assumption, presumption, assertion, or evidence) has already occurred. For all intents and purposes here, for two events $A$ and $B$, we’ll write the conditional probability of $A$ given $B$ as $P(A \mid B)$, and define it as \[P(A \mid B) = \frac{P(A\;\text{and}\;B)}{P(B)}.\] The little bar $ \mid $ can just be thought of as meaning ‘given’.

Now that we’ve got some technicalities out of the way, let’s look at some examples of conditional probability. Imagine you are dealt exactly two playing cards from a well-shuffled standard 52–card deck. The standard deck contains exactly four kings. What is the probability that both of your cards are kings? We might, naively, say it must be simply $(4 / 52)^2 \approx 0.59$, but we would be gravely mistaken. There are four chances that the first card dealt to you (out of a deck of 52) is a king. Conditional on the first card being a king, there remains three chances (out of a deck of 51) that the second card is also a king. Conditional probability then dictates that: \begin{align*} P(\textrm{both are kings}) &= P(\textrm{second is a king} \mid \textrm{first is a king}) \times P(\textrm{first is a king}) \\ &= \frac{3}{51}\times \frac{4}{52}\approx 0.45\%.\ \end{align*} The events here are dependent upon each other, as opposed to independent. In the realm of probability, dependency of events is very important. For example, coin tosses are always independent events. When tossing a fair coin, the probability of it landing on heads, given that it previously landed on heads 10 times in a row, is still $1/2$. Even if it lands on heads 1000 times, the chance of it landing on heads on the 1001st toss is still 50%.

Bayes’ theorem

Any essay on conditional probability would be simply incomplete without a mention of Bayes’ theorem. Bayes’ theorem describes the probability of an event, based on prior knowledge of conditions that might be related to the event. It is stated mathematically as:

 

 

Bayes’ theorem

$P(A\mid B) = \frac{P(B \mid A)P(A)}{P(B)}.$

 

 

We can derive Bayes’ theorem from the definition of conditional probability above by considering $P(A \mid B)$ and $P(B \mid A)$, and using that $P(A\;\text{and}\;B)$ equals $P(B\;\text{and}\;A)$.

A fun (and topical!) example of Bayes’ theorem arises in a medical test/screening scenario. Suppose a test for whether or not someone has a particular infection (say scorpionitis) is 90% sensitive, or equivalently, the true positive rate is 90%. This means that the probability of the test being positive, given that someone has the infection is 0.9, or $P(\textrm{positive}\mid\textrm{infected}) = 0.9$. Now suppose that this is a somewhat prevalent infection, and 6% of the population at any given time are infected, ie $P(\textrm{infected}) = 0.06$. Finally, suppose that the test has a false positive rate of 5% (or equivalently, has 95% specificity), meaning that 5% of the time, if a person is not infected, the test will return a positive result, ie $P(\textrm{positive}\mid\textrm{not infected}) = 0.05$.

Now imagine you take this test and it comes up positive. We can ask, what is the probability that you actually have this infection, given that your test result was positive? Well, \[P(\textrm{infected} \mid \textrm{positive}) = \frac{P(\textrm{positive} \mid \textrm{infected}) P(\textrm{infected})}{P(\textrm{positive})}.\] We can directly input the probabilities in the numerator based on the information provided in the previous paragraph. For the $P(\textrm{positive})$ term in the denominator, this probability has two parts to it: the probability that the test is positive and you are infected (true positive), and the probability that the test is positive and you are not infected (false positive). We need to scale these two parts according to the group of people that they apply to—either the proportion of the population that are infected, or the proportion that are not infected. Another way of thinking about this is considering the fact that \[P(\textrm{positive}) = P(\textrm{positive and infected}) + P(\textrm{positive and not infected}).\] Thus, we have \[P(\textrm{positive}) = P(\textrm{positive} \mid \textrm{infected})P(\textrm{infected}) + P(\textrm{positive} \mid \textrm{not infected})P(\textrm{not infected}).\]

And we can infer all the probabilities in this expression from the information that’s been given. Thus, we can work out that\[P(\mathrm{infected}|\mathrm{positive}) = \frac{0.9\times 0.06}{0.9\times 0.06 + 0.05\times 0.94}\approx 0.5347.\]

In a population with 6% infected by scorpionitis, this test will come back positive (purple shaded background) in 10.7% of cases.

Unpacking this result, this means that if you test positive for an infection, and if 1 in 17 people in the population (approximately 6%) are infected at any given time, there is an almost 50% chance that you are not actually infected, despite the test having a true positive rate of 90%, and a false positive rate of 5% (compare to the proportion of the shaded area in the diagram filled by infected people). That seems pretty high. Here are some takeaways from this example: the probability that you have an infection, given that you test positive for said infection, not only depends on the accuracy of the test, but it also depends on the prevalence of the disease within the population.

Unprecedented applicability

If 3% are infected with Covid-19 (purple person), a lateral flow test will come back positive (purple shaded background) 2.7% of the time.

Of course, in a real-world scenario, it’s a lot more complicated than this. For something like (and, apologies in advance for bringing it up) Covid-19, the prevalence of infection (our $P(\textrm{infected})$ value) changes with time. For example, according to government statistics, the average number of daily new cases in July 2020 was approximately 667, whereas in January 2021 it was 38,600. Furthermore, $P(\textrm{infected})$ depends on a vast number of factors including age, geographical location, and physical symptoms to name only a few. Still, it would be nice to get a sense of how Bayes’ theorem can be applied to these uNpReCeDeNtEd times.

An article from the UK Covid-19 lateral flow oversight team (catchy name, I know) released on 26 January 2021 reported that lateral flow tests (which provide results in a very short amount of time but are less accurate than the ‘gold standard’ PCR tests) achieved 78.8% sensitivity and 99.68% specificity in detecting Covid-19 infections. In the context of probabilities, this means that \begin{align*} &P(\textrm{positive} \mid \textrm{infected}) = 0.788 \textrm{ and}\\ &P(\textrm{positive} \mid \textrm{not infected}) = 0.0032. \end{align*} On 26 January 2021, there were 1,927,100 active cases of Covid-19 in the UK. Out of a population of 66 million, this is gives us a prevalence of approximately 3%, or $P(\textrm{infected}) = 0.03$.

Taking all these probabilities into account, we have \[P(\textrm{infected} \mid \textrm{positive}) = \frac{0.788 \times 0.03}{0.788 \times 0.03 + 0.0032 \times 0.97} \approx 0.8839,\] which means that the chances of you actually having Covid-19, given that you get a positive result from a lateral flow test, is about 88%. This seems pretty good, but can we make this any better?

If the prevalence increases to 80%, you can be much more certain of a positive result, but there are also more false negatives.

Instead of just taking the number of active cases as a percentage of the total population of the UK to give us our prevalence, we can alternatively consider $P(\textrm{infected})$ for a particular individual. For someone who has a cough, a fever, or who recently interacted with someone who was then diagnosed with Covid-19, we could say that their $P(\textrm{infected})$ is substantially higher than the overall prevalence in the country. The article Interpreting a Covid-19 test result in the BMJ suggests a reasonable value for such an individual would be $P(\textrm{infected}) = 0.8$. It’s worth mentioning that this article has a fun interactive tool where you can play around with sensitivity and specificity values to see how this affects true and false positivity and negativity rates. Taking this new value of prevalence, $P(\textrm{infected})$, into account, then \[P(\text{infected} \mid \text{positive}) = \frac{0.788 \times 0.8}{0.788 \times 0.8 + 0.0032 \times 0.2} \approx 0.9990,\vphantom{\frac{a}{\frac{c}{b}}}\] giving us a 99.9% chance of infection given a positive test result, which is way closer to certainty than the previous value of 88%.

Can we do any better than this? Well, compared with the lateral flow Covid-19 tests, it has been found that PCR tests (which use a different kind of technology to detect infection) have substantially higher sensitivity and specificity. Another recent article in the BMJ published in September 2020 reported that the PCR Covid-19 test has 94% sensitivity and very close to 100% specificity. In a survey conducted by the Office for National Statistics in the same month, they measured how many people across England and Wales tested positive for Covid-19 infection at a given point in time, regardless of whether they reported experiencing symptoms. In the survey, even if all positive results were false, specificity would still be 99.92%. For the sensitivity and specificity reported in the BMJ article, this is equivalent to having a false negative rate of 6% and a false positive rate of 0%. If we plug these numbers in, regardless of what the prevalence is taken to be, we have: \[P(\textrm{infected} \mid \textrm{positive}) = \frac{0.94 \times P(\textrm{infected})}{0.94 \times P(\textrm{infected}) + 0 \times P(\textrm{not infected})} = 1.\] So when a test has a false positive rate of almost 0%, if you achieve a positive test result, there is essentially a 100% chance that you do in fact have Covid-19.

So what can we take away from this? Well, we have seen that if a test has higher rates of sensitivity and specificity, then the probability of the result being a true positive is also higher. However, prevalence and the value of the probability of infection also play a big role in this scenario. This could be used as an argument for targeted testing only, for example if only people with symptoms were tested then this would increase the probability of the result being a true positive. Unfortunately, it is the case that a large number of Covid-19 infections are actually asymptomatic—in one study it was found that over 40% of cases in one community in Italy had no symptoms. So, if only people with symptoms were tested, a lot of infections would be missed.

 

 

Bae’s theorem

$P(\text{Netflix} \mid \text{chill}) =$

$\frac{P(\text{chill} \mid \text{Netflix})P(\text{Netflix})}{P(\text{chill})}$

 

In conclusion, I’m no epidemiologist, just your average mathematician, and I don’t really have any answers. Only that conditional probability is actually pretty interesting, and it turns out you can write a whole essay on it. The ending of Crazy Rich Asians was much better than the ending to this article. Go watch it, if you haven’t already.