A Trick With Horses

I am going to teach you a trick with horses. You can do it at home if you have enough horses. This old trick was famously done by TV’s Derren Brown.

We will run a with race with two horses, we can use more horses but with two it is easiest to explain. First find the names and addresses of 1024 people. Write to 512 to say horse A will win the race. To the other 512 say that horse B will win. Say horse B wins. Throw away the names of people to whom you said horse A would win. Next week, new race. To 256 of the remaining 512 say that horse C will win and to the other 256 say horse D. Horse C wins. Throw away the names of the people you gave the wrong prediction to. Same again the following week. Now there will be 128 people you have given a winning horse to three times. Do it again, 64 people and four wins. Then 32 people and five wins. And so on. Eventually there will be one person who thinks you are most amazing expert in horse racing, you have predicted 10 winners in 10 races. They are now primed for the big scam.

On TV, Derren gets this one person to bet all their life savings on the next race, on his prediction. And the sucker loses. Derren is distraught. This all makes great TV.

It has a happy ending though, because Derren has in secret bet on the horse that actually won, and he gives his winnings to the aforementioned sucker. So everyone is happy. (Of course, in secret Derren had bet on all the horses in this last race, so he can’t lose. They don’t show this on the TV though.)

In statistics this trick is a bit like what called is “p hacking.”

A scientist says he is 95% confident that eating peas causes spots. Where did he get that 95% from? He does lots of statistics on lots of data involving people who do and don’t eat peas. He writes research papers, becomes famous in the vegetable community and is hired by the Cabbage Marketing Board to promote the health advantages of cabbage. Cabbages good, peas bad.

Problem is that for years he does this research on many people, and many vegetables. He studies 1,000 people, and none of them show any bad effects from eating parsnips or mange tout or carrots. Not even broccoli. This is no good, he cannot write a research paper saying vegetables are good for you. Everyone does that. So he finds another 1,000 people. And then another 1,000. Then just 500. Or 200. With a small number of people he is more likely that one of them will be the school boy who allergic to everything. So one day, hurray, he find some very spotty people in his small sample. It had to happen eventually. Naughty scientist.

Mathemagical Thinking Lesson

You see this a lot with beauty products for which there are lower standards for claims than with, say, medical products. Look out for the small print telling you how large was the sample of people used in the trial. Eight out of 10 cats etc. Is that 80% of 10,000 cats? Or maybe just four out of a sample of five cats.

Are you looking into which school to send your genius progeny? You might find that a fairly local school has a very high recent ranking, as measured by exam results. But is that because that local school is very small and has one particularly bright child in one year? One out of a small sample, one is relatively large compared to one out of a large sample. As soon as that child leaves the school will fall back in the ranking.

Houdini – The Master Of Topology

Little known fact – in which we specialize – Houdini could have been a great mathematician. Specifically a topologist. Escapology, topology, there are great similarities. Topology is the mathematical study of shapes and spaces. I don’t know much about it. It seems to involve eating a lot of donuts. Or knitting. (But, have you noticed,  there’s never a topologist to be found when it’s time to untangle the Christmas tree lights.)

But why was Houdini so good at topology? Well, Houdini is famous for many daring escapes, from boxes, from milk churns, jail cells, handcuffs. You can buy a set of shackles here so you can do a spot of escapology yourself. (Note: Do not try this at home. Even more important, don’t try this inside a box at the bottom of the East River.) You can have a member of the audience, or a close personal friend, padlock your hands behind your back using two real padlocks, there is no trick here, they are real padlocks. And in one second you escape. How is this possible? With topology, of course. Should I give away the secret? I will give you a hint below.

I once tried escapology. When my legs were more bendy than they are now. Here is the true story of my escape from a holdall, filmed for national television in the United Kingdom. It has an unhappy ending, but not for the obvious reason.

In 2010 we hear of the death of Gareth Williams, a mathematician working for UK GCHQ. He is found naked inside a red holdall, padlock on the outside, key on the inside. Because he worked for British “spies” people say that he must have been murdered.

There is an inquest and several experts say it is impossible for a man to get inside this type of bag, and close it so that the padlock is on the outside. They squeeze, they bend, they cannot do it.

At the time that the inquest results were announced I happened to be in my living room with a reporter friend. “I can do this!” I said to him immediately. I showed my friend the principle using that $20 Houdini shackle linked above. We then ran around London trying to find a red North Face holdall, the type in which Mr Williams was found. At last we found one in a shop in Kensington. (The shopkeeper said that a Sky News reporter bought one too just before, they must also know the trick. The race is on!)

We go to my flat and I try to get into the bag. It is very hard work. I am not as young as I used to be.

Look closely, you can see me in the bag.

But after 20 minutes I am in the bag and the bag is locked. The key is on the inside. The padlock on the outside. Exactly the condition in which Gareth Williams was found. It is very hot, and very difficult to breathe. And please note, my stomach is considerably bigger than Gareth Williams’, I have not exercised for 30 years, I was much older. I have dodgy shoulders. And because my friend is watching I still have my clothes on. But I did it.

I am locked in a bag.

The friend and I go to Channel 4 where he works. We tell the news people our discovery. They set up a camera. We are all ready. Health and safety documents signed. Three keys to the padlock are all outside the bag ready for them to open it. I do it again. Not quite so good this time. I slip a bit and the padlock is half in and half out of bag. But unfortunately the hole of the padlock is inside the bag and all keys are outside. I think this is funny. For a while. They slip the key into the bag and I open it. Channel 4 want me to try again. But I am too exhausted. So I end up on the cutting-room floor! (Another person tried the same trick a few weeks later, and got loads of publicity. She was a short teenager. She would have fitted inside a lunchbox.)

What can we learn from this? Experts, phooey! Mathematicians are experts, magicians are experts. Judges should speak to mathemagicians.

So what is the trick of topology? It is easy. First open the zip. Then bend bag/zip around until the two ends of the zip touch. The whole zip should form a large loop. Now put the padlock through the two pull tabs at the ends of the zip. So the padlock is on but the zip is still open. Now pull the two tabs together, making sure that the padlock is outside the bag as you do this. (Also have a key inside and another key outside, just in case. And maybe a strong knife and scissors.)

So what happened to poor Gareth Williams? Some say it was the Russians.  Me, I think he was experimenting, he was curious.

Mathemagical Thinking Lesson

In mathematics we have the concept of Proof by Existence. It’s probably the easiest type of proof to understand. Example: Prove that there is an integer solution of 

x^2-3x+2=0.

Prove it! That’s an easy one, try x=1. There, done!

Outside mathematics someone says something can’t be done, and then someone does it, that’s an existence proof. The proof doesn’t have to be constructive, i.e. we don’t need to know how it’s done, only that it has been done. “Houdini can’t escape from his water torture cell!” Well, he did. We don’t know how (or rather, we didn’t at the time), but we know a solution exists.

That’s were we sort of are with the Gareth Williams case. I say “sort of” because it wasn’t done under exam conditions, so to speak. So it’s reasonable to ask for another demonstration. And at least two people have done this while being observed. So it cannot be said that “This cannot be done.”

A book was published recently about the Gareth Williams case in which the author said he had tried “300 times” to get inside a holdall and lock himself inside. Therefore it cannot be done he said. I don’t think he mentions whether he has also tried to split the atom 300 times and failed.

This is all very annoying to the obsessive mathematician. The saying of maybe Carl Sagan, maybe Martin Rees, maybe William Wright, “Absence of evidence is not evidence of absence,” has clearly not caught on among the general public.

It’s also a very defeatist position to take. Only mathematicians, and not mathemagicians, should be allowed to say “It can’t be done,” and then only in relation to mathematics. If everyone said “It can’t be done,” we would all still be living in caves, and not on the way to Mars. Actually, language might not even exist, so we wouldn’t even be able to say “It can’t be done.” But that’s one for the philosophers.

A Trick With Dice

Ten is bigger than five, and five is bigger than one. And so ten is bigger than one. Basic stuff. In symbols (we mathematicians like symbols, more than we like numbers):

If A > B and B > C then A > C.             (*)

This is common sense. Wait, not so fast! (There is no such as thing as common sense to mathematicians.) This is not true for everything.

Do you play Rock, Paper, Scissors? Rock beats Scissors, Scissors beats Paper. In symbols

R > S > P

But it is not true that R > P. Because Paper beats Rock.

R > S > P > R > S > …

When something obeys (*), as numbers do, then we call that Transitive. But like Rock, Paper, Scissors there are many fun things that are not transitive, and some of them even involve numbers, in a way. And can even be used to win drinks at a bar. (This could turn into a theme.) Let’s see an example.

You play games with dice, then you are used to the standard dice with six sides, numbered 1, 2, 3, 4, 5, 6. Each side equally likely to be rolled. We are going to roll dice, you and I, to see who pays for the drinks. But we aren’t going to use regular dice. They will be six sided and they will be unbiased. But we are going to use six-sided dice with slightly different numbers on them. Here are three such dice:

A: 1, 1, 3, 5, 5, 6

B: 2, 3, 3, 4, 4, 5

C: 1, 2, 2, 4, 6, 6

We each choose a die, we roll. If we draw we roll again. Loser pays for the drink. All the dice are very similar, no? The pips on all the dice add up to 21, so the mean roll is 21/6 = 3 1/2, just like for a regular die.

I am feeling generous, I will let you choose your die first. You choose A? Ok, I choose C. Who wins most often? You’d think that would be equally likely to win because the means are the same, no? No! Look at table:

1 1 3 5 5 6
1 D D L L L L
2 W W L L L L
2 W W L L L L
4 W W W L L L
6 W W W W W D
6 W W W W W D

Along the top is your roll, die A. Down the left-hand side is my roll, die C. Thirty-six possibilities, out of which I win 17, you win 15, and there are four ties and we roll again. And this is true whichever die you choose. Choose B and I choose A, choose C and I choose B. Every time you pay for more drinks than me! Ok, so not a big advantage but it adds up over a typical lock-in session.

Warren Buffett is big fan of non-transitive dice. I don’t know if he is a big drinker.

Mathemagical Thinking Lesson

What can we learn from this? Other than don’t go to a bar with me. The most important lesson is that what happens on average does not give us the whole picture. All these dice have the same mean roll. That is irrelevant. What about other types of average? The median is the middle number in an ordered list. Die A has a median of 4, die B 3.5 and die C 3. Now there are differences, perhaps you’d choose die A. Doesn’t matter. Similarly the modes are different. The mode is the most frequent number, here all dice are bimodal, and are different. But again that form of average is irrelevant.

Normally we are great fans of common sense. But sometimes common sense can be highly misleading. Sometimes you have to ask questions that defy common sense.

See also the excellent essay by Stephen Jay Gould, “The Median Isn’t the Message,” https://journalofethics.ama-assn.org/article/median-isnt-message/2013-01

Magic Is A Sufficiently Advanced Technology

I have a saying, it is “Magic is indistinguishable from a sufficiently advanced technology,” which is very close to something Arthur C. Clarke said which is “Any sufficiently advanced technology is indistinguishable from magic.” Ok, I stole his saying and reversed it, I confess.

Sadly it is true. In olden times magicians would make balls levitate and float across audiences. It was a trick involving wires and threads. But you knew that. Now you can buy drones that do the same thing. Look at airhogs.com. Where is the magic in that?

In those good old days we read an audience member’s secret writing hidden inside an envelope using skills perfected over decades. (Often involving peaking. Actually always involving peaking.) Now you can buy writing pads that will transmit any drawing to a video screen on your wrist.

Cold reading an audience required psychological insights, and cojones of steel. “Is there anyone here called Margaret?” (I suspect Margaret is a very common name for an audience member at this sort of event.) But now I can see the names of people paying by credit card. I look at them on Facebook. Now I can say “Is there anyone here called Margaret, who went on holiday to Ibiza with friends and kissed a Spanish waiter?” Too easy. There’s no skill anymore.

What do you want, Instagram or magic? You can’t have both.

A Trick With Money

Everyone loves money! Everyone loves magic! Everyone loves mathematics!

Sadly not all of this is true. Actually most of it is not true. Imagine how difficult it must be for David and me to earn a living. Here is a trick we use in bars when people are very drunk. And we are desperate for cash.

We say to a drunk person, “Here are 20 coins, all showing heads. While I look away you turn over eight of them to show tails. I will keep looking away, you can even blindfold me, and I will divide the coins into two piles, each having the same number of tails face up. If I can’t do it you keep the 20 coins. If I can then you give me the same amount. Deal or no deal?”

How is this possible? How can we get two piles with same number of tails if we can’t see anything?

I will give the solution and then prove it is possible by algebra. Algebra is when you use letters instead of numbers. We’ll talk about symbols mathematics and numbers mathematics later.

But would you mind taking just a minute or two to have a go yourself? I know, I know. I also hate it when I’m asked in a book to spend a minute breathing deeply, or making a list of all the things I’d like to change about myself. But we aren’t going to do this often. Honest.

Ok, the solution. All you have to do to win the money from the drunk person is to move any eight of the coins to another pile, and turn all of them over. You will see that both piles have the same number of tails. Ok, it won’t be four in each pile, maybe that is what you expected. But I did not say that.

Here is the mathematical proof in a table. We don’t have to use 20 coins and turn over eight. Here we start with m coins and turn over n. When we move n into the new pile (on the right) x is the number of heads that get moved across, we don’t know what this number is but it doesn’t matter. See how the number of tails, coloured red, is the same on the left and the right. And it doesn’t depend on m or n.

LEFT PILE RIGHT PILE
Heads Tails Heads Tails
Initially m 0
Turn over n m-n n
Move n to another pile m-n-x n-(n-x) x n-x
Turn over right pile m-n-x n-(n-x) = x n-x x

Usual deal, if you do this in a bar and win then I get my 10% commission. If you mess it up and lose, I don’t pay you. It’s a bit like the performance-related pay in a hedge fund.

Mathemagical Thinking Lesson

This lesson is about thinking in different domains.

Did you figure out how to do trick? If you hadn’t then I wonder if it would have been easier if we’d used the numbers five and two instead? Or even two and one! What about 137 and 59?

With two and one, I think you would have got it. But then it wouldn’t have looked special, just dumb. With five and two you might have got the solution if you could be bothered. With 20 and eight we reckon you might have given up. That they are both even numbers and there are two piles might seem to be a clue, but is misleading. But then with 137 and 59 you might have thought there’s something special about those two numbers, maybe it’s all about prime numbers. Now there’s a garden path you wouldn’t want to be led along.

The mathematician has two ways to approach this.

The first method: Given the 20/eight version the mathematician might wonder if the numbers are special. If not, then they’d reduce the problem to the two/one version. Then move on to three/one, etc. Then 20/eight and finally the general solution, using letters instead of numbers.

The second method isn’t just for mathematicians, and is the way I approached it initially. We have four numbers to play with: Four (half of eight…there’ll be two piles); Six (half of 20-8); Eight; And 10 (half of twenty). (Twelve isn’t special, moving 12 is the same as moving eight.) And there’s one optional thing to do, turn coins over. There aren’t many experiments to go through. Moving four and turning them over is quickly shown to not work. And moving and turning eight works. Solution found.

We’ll talk about numbers people and symbols people later. There is a great advantage to being able to think in both domains. The mathemagician knows this, and knows how to distract either with the tedium of dealing with numbers or the fear of dealing with symbols.