Search This Blog

Showing posts with label Playwiths. Show all posts
Showing posts with label Playwiths. Show all posts

Friday, 12 August 2022

Three mathematical puzzles

 This is another selection from my book Playwithsavailable from Amazon or through Polymoth Books. The apparent supplier is really just me, trading as Polymoth Books, but I set the firm up so I can supply booksellers and libraries more cheaply (note that some conditions apply).

This bit is free.

The crossed house puzzle

Your task looks simple: draw the diagram below by putting your pencil down on the paper, and drawing a single continuous line. You are not allowed to draw over any of the lines.


There is a solution, and in time, you will see a pattern!

You can solve this with a lot of difficult trial and error, or you can be mathematically clever, and work out a basic principle that applies to problems like this one and the next two as well. That’s a hint!

The question you have to ask yourself is this: “how many times do I enter or leave from one of the key points?” There is something very special about the points with odd numbers of starting and finishing points. The rest is up to you, but the problem does have a solution.

The prisoner and the cells

A prisoner in a rather strange prison (with even stranger guards!) was told that if he could find a way to walk through all of the doors of all of the cells, once and once only, he would be allowed to go free. The diagram below shows how the cell doors were arranged.

The prisoner’s puzzle.

* Image by en:User:Booyabazooka - http://en.wikipedia.org/wiki/Image:15-puzzle.svg, Public Domain, https://commons.wikimedia.org/w/index.php?curid=1059593

Analyse the problem and see whether it is possible, and if it is, work out the solution. If it is not possible, prove it. Well, if you had any sense, you would have done the crossed house problem first. And that’s a hint. If you draw this figure on a torus in such a way that the hole of the torus is inside the middle cell at the bottom, it might be a bit easier—and that’s another hint.

The Königsberg bridge problem

In the city that was once called Königsberg, there were two islands in the river, linked to each other and to the shore by bridges as you can see in the diagram. The river is blue and the bridges are white. The problem for the citizens of Königsberg was this: was there any way of walking around the city and crossing each of the bridges once and once only?

 

A map of ancient Königsberg, with two islands in the river, and seven bridges.

Well, if you had any sense, you would have done the prisoner and the cells problem first. And that’s the last hint, for now. Now a research question: were/are there islands and bridges like this in Königsberg?

Notes

The three problems all have a common theme: entries and re-entries to certain points. If a cell in the second problem has an odd number of doors, you must either start inside it, or you must end in it, but not both. In the Königsberg bridges problem, each island has an odd number of entry and exit points, as does each bank. There is no solution to the second and third problems.

To find out about Königsberg reality, look for maps of Königsberg online.


The Two Cultures and strange circles

This is another selection from my book Playwithsavailable from Amazon or through Polymoth Books. The apparent supplier is really just me, trading as Polymoth Books, but I set the firm up so I can supply booksellers and libraries more cheaply (note that some conditions apply).

This bit is free, and it probably is not for the faint-hearted

1. The Two Cultures

In very early 1959, I argued with a pompous headmaster who had a Master of Arts degree, because I wanted to continue my studies in Latin, and also study physics. He rejected my request with a crushing dismissal: “Boys who do physics do not do Latin.” That was how I became the victim of something neither of us would have heard of back then, the notion that learned society was made up of “two cultures”, the Arts culture and the Science culture.

The divided cultures had been around for a century or more, but the name “two cultures” was only proposed in 1958 by C. P. Snow, a physicist who wrote fine novels, making him a member of both cultures. Snow said that, as the Arts people saw it, the “Arts Culture” contained all the witty, urbane and articulate people.

The “Science Culture” was, according to the Arts people, made up of scruffy men (and just a few equally scruffy women back then) who were incredibly clever about extremely difficult things, but who were absolutely useless when it came to dealing with people. Scientists were stolid and uncreative manipulators of objects, lacking in personal skills.

The scientists were often absent-minded, we were told, where the Arts culture people were clear-thinking. Leave us to do the ruling, puffed the Arts people. The scientists and engineers let this go, but in their turn, they puffed that the Real Work should be left to them.

According to this divisive pair of stereotypes, creativity is only found in the Arts people, and practicality lies only with the Science people. Fuelled by these notions, the two camps are encouraged to regard each other with a less than friendly contempt. My regard for people who accept that view is far less polite. To survive and do well, it helps to have a foot in each camp. To work in STEM, you badly need the art of debate, the ability to write clearly, sketch neatly, take photos and more. You need STEAM, and the M is important.



Some non-standard round shapes. 

Once upon a time, astronomers were certain that all the moving bodies in space travelled in circles, “because circles are perfect”. In many ways, modern science began when Johannes Kepler saw that the orbits of planets were ellipses.

Or maybe science emerged when Isaac Newton proved that the orbits had to be that shape, because of the way gravity worked. Whichever way it happened, those odd squashed circles called ellipses were involved. 

 

A 19th century engraving of a Gatling gun: notice the shape of the wheels. 

To me, ellipses are important, because in perspective, circles look like ellipses, but I am no artist, and I need help to get my ellipses right. When I am drawing on paper, I use plastic templates to draw my ellipses, but with a simple graphics program like Paint.Net, I can draw ellipses of any shape and size.

If you want to work on shading and stippling geometric shapes, use a colour printer to print out pale sky-blue ellipse outlines. Make just enough fine black points on the paper to show the outline, then photocopy it: pale blue (often called “dropout blue”) usually fails to show in a photocopy, and away you go.

We will meet Piet Hein again in chapters 15 and 20 of my book (and I may get to them here, one day), but now we need to look briefly at his superellipses, which were adopted as a suitable shape for rounding-off a space in the centre of Stockholm, rather more nicely than the rounded rectangle above. If you look online for <Sergelstorg>, you can see the result in maps and aerial photos of Stockholm.

By an odd chance, Hein came up with his solution in 1959, the year in which I encountered the two cultures, and C. P. Snow published a book about his them. Surely, if anybody ever showed how the Two Cultures notion breaks down, it must be Hein. And now, we need to venture into mathematics of a Heavy Kind

There is a whole family of curves with this formula:
As a group, they are called Lamé curves, after Gabriel Lamé, who discovered them. If n is between 0 and 1, the figure is a four-pointed star. If n= 1, it is a parallelogram, and for n between 1 and 2, it is a rounded-off rhombus. If n=2, we get an ellipse or a circle (depending on the values of and b), and above that, we get squircles, or superellipses.

Sergelstorg has n=2.5, and a/b=1.2. Over to you, but look around on the internet for 3D supereggs and ellipsoids…

Möbius strips and more

I have taken a short break from cleaning up The Cornish Boy Quartet, which is Australian YA historical fiction, because I wanted to share something on this topic, after it came up on a librarian list which does not allow attachments. It is a selection from my Playwiths, available from Amazon or through Polymoth Books. The apparent supplier is really just me, trading as Polymoth Books, but I set the firm up so I can supply booksellers and libraries more cheaply (note that some conditions apply).

That said, this next part is free, and teachers looking for ideas can get those from the e-book, available at the Amazon link, for $5.

Cut a 5 cm strip lengthwise from paper (an old newspaper will do). Holding the strip out straight, give one end a half twist (180º) and glue or tape the two ends together. Your piece of paper is now a Möbius strip. When you twisted your strip, the inside and the outside became one continuous surface. There is also only one edge.

Take a pen and carefully draw a line along the centre of a new uncut strip. Where do you end up? Is the line drawn on the inside or outside of the paper? Now cut the strip along the line you drew. How many pieces do you get? It may help if you use the picture below to make an ant-covered Möbius strip: here is a link to a PDF that you can download and print.

Möbius ants!

You can use the PDF (this is recommended), or blow the above image up on a photocopier, so the chain of ants is 23 cm long then join two copies, as shown below, and do back-to-back photocopies. You need to experiment to get the ants on opposite sides of the page, going in opposite directions.

I had a bit of trouble following my own instructions, so here’s a step-by-step set of photos: remember that you need to print both sides

(1) PDF on-screen; (2) printed out; (3) cut up; (4) trimmed; (5) joined; and (6) a finished Möbius strip.

Cutting the Möbius strip in two different places.

Next, take the photocopied or printed sheets and cut two strips, 23 cm x 7 cm, and join them, so all the ants are in columns, and make a Möbius strip which you can cut, either straight down the centre (see left, above), or off to one side, as shown in the right-hand picture.

Try this again. But this time, give the paper a full twist. Then try one and a half twists, and see what happens. Last of all, see what you can discover about Klein bottles.

Notes

The pictures below show what you get when you cut the strip. The first picture shows that a cut down the middle gives a single loop, but there is a surprising result when you test for Möbiusness (my own word). The test is simple: draw a pen line along one side until you get back to the start: If the paper is still a Möbius strip, the line will be on both sides, but in the picture below, that doesn’t happen:



Now in the last picture, there are two interlinked loops. I cut off the big ants, and something odd happened: the little ants are isolated on a Möbius strip, but the big ants are on a non-Möbius strip.

Playwiths is full of STEAM ideas, and arose from a website of the same name. No publisher would take it on, even though the site drew more than 4 million visits over 20 years. That is why it is self-published.

Sometimes, you wonder about these people!




Monday, 28 March 2022

Was Ramanujan wrong, or wrongly reported?

 Most recreational mathematicians know the story of Godfrey Hardy’s taxi. In brief, Hardy called on his sick colleague, Srinivasa Ramanujan. In the course of making conversation, Hardy mentioned the number of his taxi-cab, his favourite form of transport. It had, said Hardy, a rather dull number, 1729. “No, Hardy! No, Hardy!” replied Ramanujan, “It is a very interesting number - it is the smallest number expressible as the sum of two cubes in two different ways.”

Ramanujan was referring here to the fact that 1729 is the sum of one cubed and twelve cubed, and also the sum of nine cubed and ten cubed. The two mathematicians then went on to discuss the fourth powers equivalent, but that has no part here. There is a solution, by the way, with 133 and 134 being the numbers on one side: the rest I leave to you, once you have my methodology, set out below. So Hardy is mainly remembered by mathematicians as the person who played straight man to Ramanujan.

There was more, as we shall see, but first, a small diversion: 1729 is one of a special group of numbers called Carmichael numbers, which are important in number theory. It is highly likely that Hardy was trying to find out if Ramanujan had discovered these numbers in his intuitive way, and got an answer from left field instead. As I am about to reveal, though, this was wrong, and given Ramanujan’s brilliance, it is far more likely that he was misquoted

It has been known for thirty years or so that there is an infinite number of Carmichael numbers, but is there an infinite number of them with factors in arithmetic progression? That description fits 1729 (7 x 13 x 19), but that may be just happenstance. On the other hand, I read recently that 91 is expressible as the sum of two cubes in two different ways: 91 = 33 + 43 = (-5)3 + 63

At 0600 this morning, it was dark, I had fetched the newspaper, and was trying to remember the target number, and the cubes that composed it. Then I recalled that it was 91, which my mind had filed as interesting, because it is 1/19 of 1729, being 7x13.

That did it. I got up, fired up Excel, and set to work. But before I continue, what are Carmichael numbers? Mathematicians will understand when I note that there is insufficient space in the margin of the page to offer it in full…

OK, I won’t be mean to those interested but less familiar with the trivia. Pierre de Fermat (1601–1665) is  remembered today mainly for his “Last Theorem”, which took more than 300 years to prove. In the margin of his copy of Diophantus’ Arithmetica, Fermat wrote:

“To divide a cube into two other cubes, a fourth power or in general any power whatever into two powers of the same denomination above the second is impossible, and I have assuredly found an admirable proof of this, but the margin is too narrow to contain it.”

Now on with the spreadsheet and how I saved myself a lot of what we Australians call hard yakka. One way to solve knotty problems is to try all the possibilities and these are Diophantine solutions, named after the author of the book that Fermat scribbled his note in.

I once wrote in one of my books that Diophantus would have killed to get his hands on a computer and a spreadsheet program, and I meant it. I am still trying to find a way of using a spreadsheet to test Collatz' conjecture.

In cell A2, I entered the value -20, then I selected that column down to row 89, and used FILL – SERIES to integers down to 67. Next, in cell B2, I inserted this formula: =A2*A2*A2. This, of course, returns the value (-8000), being the cube of -20.

Next, I used COPY – DOWN, or CTRL-D, to fill column B with cubes. Then I was ready to laboriously typed in the first row: C2 (=B2+B3); D2 (=B2+B4); E2 (=B2+B5) and so on, all the way to column AQ. Then I could highlight rows 2 to 89 and columns C to AQ and fill those cells with COPY – DOWN, or CTRL-D.



As you can see, I now had more sums-of-two-cubes values than I could poke a stick at, and a few of my “hits” are marked with colour. I highlighted all of the values, copied them and did an unformatted paste into a Word file. This gave me tab delimited rows, so I had to get rid of the tabs. In Word, CTRL-h gives FIND AND REPLACE, and if you are smart-lazy like me, you either know, or need to know two codes to use. A tab marker is ^t, and a carriage return (end of paragraph) is ^p.

So in no time at all, I had 1845 values that could be sorted into numerical order and searched. After getting through less than a page, I muttered something that a passing kookaburra misheard as beggar this for a game of soldiers. The actual words are now lost to the mists of time, so we shall move on.

I highlighted the whole column (CTRL-A) and copied it (CTRL-C). Then back to the spreadsheet, open a new worksheet, click on A1 and paste (CTRL-V). Now I have all of my values in order, but no great desire to eyeball them, as I had had no breakfast, and no mug of tea, either. Time for smart-lazy again. In cell B2, I added this formula: =IF(A1=A2, "hit","").

 

As you can see, there was no need to scrutinise all the values, but look on the right, where there are some trebles. Now ignoring zero, which can be obtained in an infinite number of ways: x3 + (-x)3, where x is any integer, the first treble is well below Ramanujan’s 1729. You can get both 728 and -728 in three ways.

Here they are: 728 = (-10)3 + 123 = 63 + 83 = (-1)3 + 93

Numerology is a trap, a snare and a delusion, but the difference between 1729 and 728 is 1001 (7x11x13), while 91 is 7x13 and 1729 is, as noted above, 7, 13 and 19. You can see why people get drawn in, even if I don’t mention that only in base-13 notation is it true that 6x9=42!

He proves by algebra that Hamlet's grandson is Shakespeare's grandfather and that he himself is the ghost of his own father.
—James Joyce, Ulysses, 21.

I think I’ll stop there.





Thursday, 24 March 2022

Collatz’ conjecture

 Number crunchers know that the word conjecture is always a warning that by the pricking of my sums, something evil this way comes. Conjectures are unsolved problems, and in fact, Paul Erdös, a noted Hungarian mathematician, was reported to have said of Collatz’ conjecture, “Mathematics may not be ready for such problems.” Others called it “dangerous” and “a quagmire”.

When it comes to mathematical challenges, the Four-colour map problem, Fermat’s last theorem and squaring the circle, are far too difficult to even consider on a bus, but the Collatz conjecture is nice and simple to play with. It was put forward by Lothar Collatz, who waited two years after receiving his doctorate, before offering this puzzle. Pro tip: always get your higher degree nailed to the wall before you make waves!

Choose any positive integer n to begin a series. For each following term, if the previous term is even, the next term is one half of the previous term. On the other hand, if the term is odd, multiply it by 3 and add 1. Collatz’ conjecture is that no matter what the value of n, the sequence will always reach 1. Here are five sample strings:

1, 4, 2, 1;

2, 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1;

3, 10, 5, 16, 8, 4, 2, 1;

4, 2, 1;

5, 16, 8, 4, 2, 1.

The sequences generated are sometimes called the hailstone sequence or hailstone numbers, because the values usually go through multiple ascents and descents, like hailstones in a cloud.

If you are working through the numbers on your bus ride, can you see what the next number is that you need to test? From what you can see above, you can rule out 7, 8, 10, 11, 13, 16, 17 and lots more…

The Hungarian-born mathematician Paul Erdös (1913–1996), is considered to hold the world record for the number of papers he wrote in collaboration with other mathematicians. Erdös numbers are whimsical numbers given to mathematicians. Erdös himself has the Erdös number 0, and any person who has collaborated with Erdös on a paper has an Erdös number of 1, while a mathematician who has collaborated with a direct collaborator is given an Erdös number of 2, and so on.

Tuesday, 15 March 2022

Once in a thousand years

This is from my book for bright young people, Playwiths.

Consider the number of years between events described as “once in a thousand years”, such as floods. To the layperson, this immediately raises the question: how can the authorities access data, covering several thousand years? The answer is that they can’t, but they have what is usually referred to as the Poisson distribution to fall back on, and to understand that, we need to consider an old tale of Prussian cavalrymen who were kicked in the head by their horses.

Just in case you know any French, the Poisson distribution has nothing to do with handing out fishes. It was developed by (and named after) Siméon-Denis Poisson. It describes the probability of clusters in random events, given nothing more than the average occurrence of such events. (If you have no French, their word for fish is poisson, leading to dreadful puns about one man's meat being another man's poisson, but that is irrelevant.

This on the right is not irrelevant, but it is, instead, an elephant, which is a horse of a different colour, as we say in the writing trade. Now let's get back to the horses...

Poisson died in 1840, before the Prussians were kicked. Ladislaus Bortkiewicz published a book in 1898 in which he tried out the distribution of head kicks in each of the 14 corps of Prussian cavalry over a 20-year period, to see if it matched Poisson’s predictions.

Basically, the Poisson distribution works like this: given a sample average (or better, a population average), you can predict the probability of clusters of, say, breast cancer cases in a workplace, the number of calls to a call centre in a given minute, power failures on a grid, some types of traffic accident, the number of typographical errors on a page and the failure of light bulbs. And given some flood data for a few inundations, the Poisson distribution can predict about how often there would be a flood of a certain level.

Let us consider the Prussian data: there were several cases where a significant number of kicks had happened, and many more where no kicks had happened, so Bortkiewicz got hold of the data for 200 corps-years. In 109 cases, there were no injuries, but there were 65 instances of one injury, 22 cases of two, three cases of three head-kicks and one unfortunate corps, in one year, had four instances, a total of 122 cases. That meant the probability of a case in any given corps in any given year was about 6/10, or if you want precision, 0.61.

Bortkiewicz triumphantly showed that the known distribution was an almost perfect fit to the theoretical prediction. After that, people everywhere took up Poisson’s idea enthusiastically.

This story was popular, because most of the world liked the idea of Prussian cavalry being kicked in the head, but the main point was to say that there would be variation, and a high “score” did not necessarily imply carelessness or anything else. Ask anybody who has done some basic statistics, and they will all know about the Prussian head-kicks. It’s the example that is always mentioned.

What is less-mentioned is that you can calculate the flood height that, based on prior data, would happen once in a thousand years. This figure would be approximate, and the estimates would be refined after each flood, and they would be slightly invalidated if the risk is increasing rather than steady, but it’s better than nothing if you need a predictor.

I actually began looking into this issue, revisiting it after several decades, because somebody was questioning the science behind climate change and global warming, and as a throw-away line, poked fun at councils in Australia which have maps showing the limits of one-in-a-thousand-year floods. How, the idiot asked, could anybody know what has happened in the past?

Those who know my historical interests will not be surprised to learn that I point to 1859 as the year when scientists in unrelated disciplines began to be unable to understand one another. The public had started to feel lost around science a few years earlier, but after the 1860s, a great deal of science was either counter-intuitive or it relied on obscure methods. One way and another, science all got progressively more complicated.

Counter-intuitive science is in some ways the worst source of dissent and confusion, but if we know that mathematicians have a clever wrinkle that lets them estimate what a one-in-a-thousand-year flood would be like, we can accept that. The science that flies in the face of uninformed ‘common sense’, and the science that causes fears to arise, these are the sorts of science that cause trouble.

Even if the ancient Greeks knew that the world was a sphere, peasant minds were happy to say that the world they saw was clearly flat. In the same way, other equally simple and fearful peasant-quality minds attack the idea of evolution, misrepresenting what evolution is, even as they deny it. 

Climate is another case: the modern peasants who watch the weather on TV thinks they understand climate, but that, in fact, is a very different kettle of poissons.

Friday, 11 October 2019

Can we trust statistics?


This chapter began as two radio talks delivered on the ABC, almost thirty years ago. My friend Peter Chubb asked me if I had addressed these issues, and I said that I hadn’t, but that I had provided a link to the text of the talk. Two nights later, I decided to add it, the next night, I rewrote it.
There is enough information here to let readers try the following exercise in Evil Statistics out for themselves.
*
Boris, Don and Tony went fishing, and caught ten fish. Four weighed 1 kg, two were 2 kg, two were three kg, one was 6 kg, and one was 10 kg. They reported that the average was 1 kg, 2 kg and 3 kg, and all were telling a sort of truth. Boris reported the mode, the most common mass, Don reported the median, the mass of the middle two fish, Tony reported the mean, adding all the masses and dividing by ten. Each value was true, each was different.
It all sounds a bit like “Lies, damned lies, and statistics”, but who first said that? The popular myth is that it was Mr. Disraeli, the well-known politician, but many quite reputable and reliable reference books blame author Mark Twain.
It turns out that it was first published by Twain all right, but Twain attributed the line to Disraeli, and you won't find the story in any earlier publication than Twain's autobiography. In short, Mark Twain made the whole thing up! Disraeli never spoke those words: Twain invented them all, but he wanted the joke to have a greater force, and so gave the credit to an English politician.
Twain wasn't only well-known for his admiration of a good “Stretcher” (of the truth, that is), he even lied when he was talking about lies, and his name wasn't even Mark Twain, but Samuel Clemens! Now would you buy a used statistic from this man?
Last century, when Disraeli is supposed to have made the remark, statistics were just numbers about the State. The state of the State, all summed up in a few simple numbers, you might say.
Now governments being what they are, or were, there was more than a slight tendency in the nineteenth century to twist things just a little, to bend the figures a bit, to bump up the birth rate, or smooth out the death rate, to fudge here, to massage there, to adjust for the number you first thought of, to add a small conjecture or maybe to slip in the odd hypothetical inference.
It was all too easy to tell a few small extravagances about one's armaments capacity, or to spread the occasional minor numerical inexactitude about whatever it was rival nations wanted to know about, and people did just that. Even today, when somebody speaks of average income, if you don’t smell fish, at least remember them, and ask if that’s the mean, the median or the mode.
When I was young, I smoked cigarettes, but the cost and the health risks convinced me, so I stopped, back in 1971. Smokers think we reformed smokers are tiresome people who keep on at them, trying to get them to stop as well.
The non-smokers say those who still puff smoke are the tiresome people, who can't see the carcinoma for the smoke clouds, who deny any possibility of any link between smoking and anything. Like the tobacco pushers, the smokers dismiss the figures contemptuously as “only statistics”. The really tiresome smoker will even say a few unkind things about the statisticians who are behind the figures. Or about the statisticians who lie behind the figures.
By the end of the 19th century, statistics were no longer the mere playthings of statesmen, they were way to clump large groups of related facts into convenient chunks. If you can see how the statistics were arrived at, perhaps you can trust them.
At one stage in my career, I led a gang of people who gathered statistics and messed about with numbers, but we preferred to be called ‘number-crunchers’. People say a statistician is “somebody who's rather good around figures, but who lacks the personality to be an accountant”.
They speak of the statistician who drowned in a lake with an average depth of 15 cm. We are told that a statistician collects data and draws confusions, or draws mathematically precise lines from an unwarranted assumption to a foregone conclusion. They say “X uses statistics much as a drunkard uses a lamp-post: rather more for support than for illumination”.
Crusty old conservatives give us a bad name, pointing out that tests reveal that half our nation's school leavers to be below average, which is true, but it is equally true that the vast majority of Australians have more than the average number of legs. All you need is one Australian amputee!
If somebody does a Little Jack Horner with a pie that's absolutely bristling with statistical items and they produce just one statistical plum, I won't be impressed at all: the plum's rather more likely to be a lemon, anyhow. 
The statistics have to be plausible and significant. Later, I will show you a statistical link between podiatrists and public telephones: this is obviously nonsense, and we will ignore it. There is no logical reason for either to influence the other.
Still, unless there is a plausible reason why X might cause Y, it's all very interesting, and I'll keep a look-out, just in case a plausible reason pops up later, but I won't rush to any conclusion. Not just yet, I won't.
First, I will check on the likelihood of a chance link, something we call statistical significance. After all, if somebody claims to be able to tell butter from margarine, you wouldn't be too convinced by a single successful demonstration, would you? Well, perhaps you might be convinced: certain advertising agencies think so, anyway.
If you tossed a coin five times, you wouldn't think it meant much if you got three heads and two tails, unless you were using a double-headed coin, maybe. If somebody guessed right three, or even four, times out of five, on a fifty-fifty bet, you might still want more proof.
You should, you know, for there's a fair probability it was still just a fluke, a higher probability than most people think. There's about one chance in six of correctly guessing four out of five fifty-fifty events. Here is a table showing the probabilities of getting zero to five correct from five tosses:
zero right
one right
two right
three right
four right
five right
1/32
5/32
10/32
10/32
5/32
1/32

 The clever reader may notice a resemblance to Pascal’s triangle here!
Now back to the butter/margarine study. Getting one right out of one is a fifty-fifty chance, while getting two right out of two is a twenty five per cent chance, still a bit too easy, maybe. So you ought to say “No, that's still not enough. I want to see you do it again!”.
Statistical tests work in much the same way. They keep on asking for more proof until there's less than one chance in twenty of any result being just a chance fluctuation. The thing to remember is this: if you toss a coin often enough, sooner or later you'll get a run of five of a kind.
As a group, scientists have agreed to be impressed by anything rarer than a one in twenty chance, quite impressed by something better than one in a hundred, and generally they're over the moon about anything which gets up to the one in a thousand level. That's really strong medicine when you get something that significant.
There. Did you spot the wool being pulled down over your eyes, did you notice how the speed of the word deceives the eye, the ear, the brain and various other senses? Did you feel the deceptive stiletto, slipping between your ribs? We test statistics to see how “significant” they are, and now, hey presto, I'm asserting that they really are significant. A bit of semantic jiggerypokery, in fact.
And that's almost as bad as the sort of skullduggery people get up to when they're bad-mouthing statistics. Even though something may be statistically significant, that's a long way away from the thing really being scientifically significant, or significant as a cause, or significant as anything else, for that matter.
Statistics make good servants but bad masters. We need to keep them in their places, but we oughtn't to refuse to use statistics, for they can serve us well. Now you are ready to object when I assert that all the podiatrists in New South Wales seem to be turning into public telephone boxes in South Australia, and it all began with Florence Nightingale. Most people think of her as the founder of modern nursing, but as part of that she created ways to use statistics to pinpoint facts.
After her name was made famous, directing nursing in the Crimean war, she returned to London in 1857, and started to look at statistics, and the way they were used. She wrote a pamphlet called “Mortality in the British Army”, and the very next year, she was elected to the newly formed Statistical Society.
She looked at deaths in hospitals, and demanded that they keep their figures in the same way. The Statistical Congress of 1860 had, as its principal topic, her scheme for uniform hospital statistics. It isn’t enough to say Hospital X loses more patients than Hospital Y does, so therefore Hospital X is doing the wrong thing.
We need to look at the patients at the two hospitals, and make allowances for other possible causes. We have to study the things, the variables, which change together. Statistics, remember, are convenient ways of wrapping a large amount of information up into a small volume. A sort of short-hand condensation of an unwieldy mess of bits and pieces.
And one of the handiest of these short-hand describers is the correlation coefficient, a measure of how two variables change at the same time, the one with the other. Now here I'll have to get technical for a moment. You can calculate a correlation coefficient for any two variables, things like number of cigarettes smoked, and probability of getting cancer.
The correlation coefficient is a simple number which can suggest how closely related two sets of measurements really are. It works like this: if the variables match perfectly, rising and falling in perfect step, the correlation coefficient comes in with a value of one. But if there's a perfect mismatch, where the more you smoke, the smaller your chance of surviving, then you get a value of minus one.
With no match at all, no relationship, you get a value somewhere around zero. But consider this: if you have a whole lot of golf balls bouncing around together on a concrete floor, quite randomly, some of them will move together, just by chance.
There’s no cause, nothing in it at all, just a chance matching up. And random variables can match up in the same way, just by chance. And sometimes, that matching-up may have no meaning at all. This is why we have tests of significance. We calculate the probability of getting a given correlation by chance, and we only accept the fairly improbable values, the ones that are unlikely to be caused by mere chance.
We aren’t on safe ground yet, because all sorts of wildly improbable things do happen by chance. Winning the lottery is improbable, though the lotteries people won't like me saying that. But though it's highly improbable, it happens every day, to somebody. With enough tries, even the most improbable things happen.
So here's why you should look around for some plausible link between the variables, some reason why one of the variables might cause the other. But even then, the lack of a link proves very little either way. There may be an independent linking variable.
Suppose smoking was a habit which most beer drinkers had, suppose most beer drinkers ate beer nuts, and just suppose that some beer nuts were infected with a fungus which produces aflatoxins that cause slow cancers which can, some years later, cause secondary lung cancers.
In this case, we'd get a correlation between smoking and lung cancer which still didn't mean smoking actually caused lung cancer. And that's the sort of grim hope which keeps those drug pushers, the tobacco czars going, anyhow. It also keeps the smokers puffing away at their cancer sticks.
It shouldn't, of course, for people have thrown huge stacks of variables into computers before this. The only answer which keeps coming out is a direct and incontrovertible link between smoking and cancer. The logic is there, when you consider the cigarette smoke, and how the amount of smoking correlates with the incidence of cancer. It's an open and shut case.
I'm convinced, and I hope you are too. Still, just to tantalise the smokers, I'd like to tell you about some of the improbable things I got out of the computer in the 1980s. These aren't really what you might call damned lies, and they are only marginally describable as statistics, but they show you what can happen if you let the computer out for a run without a tight lead.
Now anybody who's been around statistics for any time at all knows the folk-lore of the trade, the old faithful standbys, like the price of rum in Havana being highly correlated with the salaries of Presbyterian ministers in Massachusetts, and the Dutch (or sometimes it's Danish) family size which correlates very well with the number of storks' nests on the roof.
More kids in the house, more storks on the roof. Funny, isn't it? Not really. We just haven't sorted through all of the factors yet. The Presbyterian rum example is the result of correlating two variables which have increased with inflation over many years.
You could probably do the same with the cost of meat and the average salary of a vegetarian, but that wouldn't prove anything much either. In the case of the storks on the roof, large families have larger houses, and larger houses in cold climates usually have more chimneys, and chimneys are what storks nest on. So naturally enough, larger families have more storks on the roof. With this information, the observed effect is easy to explain, isn't it?
There are others, though, where the explanation is less easy. Did you know, for example, that Hungarian coal gas production correlates very highly with Albanian phosphate usage? Or that South African paperboard production matches the value of Chilean exports, almost exactly?
Or did you know the number of iron ingots shipped annually from Pennsylvania to California between 1900 and 1970 correlates almost perfectly with the number of registered prostitutes in Buenos Aires in the same period? No, I thought you mightn't.
These examples are probably just a few more cases of two items with similar natural growth, linked in some way to the world economy, or else they must be simple coincidences. There are some cases, though, where, no matter how you try to explain it, there doesn't seem to be any conceivable causal link. Not a direct one, anyhow.
There might be indirect causes linking two things, like my hypothetical beer nuts. These cases are worth exploring, if only as sources of ideas for further investigation, or as cures for insomnia. It beats the hell out of calculating the cube root of 17 to three decimal places in the wee small hours, my own favourite go-to-sleep trick.
Now let's see if I can frighten you off listening to the radio, that insomniac's stand-by. Many years ago, in a now-forgotten source, I read that there was a very high correlation between the number of wireless receiver licences in Britain, and the number of admissions to British mental institutions.
At the time, I noted this with a wan smile, and turned to the next taxing calculation exercise, for in those far-off days, all correlation coefficients had to be laboriously hand-calculated. It really was a long time ago when I read about this effect.
It struck me, just recently, that radio stations pump a lot of energy into the atmosphere. In America, the average five-year-old lives in a house which, over the child's life to the age of five, has received enough radio energy to lift the family car a kilometre into the air. That's a lot of energy.
Suppose, just suppose, that all this radiation caused some kind of brain damage in some people. Not all of them necessarily, just a susceptible few. Then, as you get more licences for wireless receivers in Britain, so the BBC builds more transmitters and more powerful transmitters, and more people will be affected. And so it is my sad duty to ask you all: are the electronic media really out to rot your brains? Will cable TV save us all?
Presented in this form, it's a contrived and, I hope, unconvincing argument. Aside from anything else, the radiation is the wrong wave-length and cannot change any cells. My purpose in citing these examples is to show you how statistics can be misused to spread alarm and despondency. But why bother?
Well, just a few years ago, problems like this were rare. As I mentioned, calculating just one correlation coefficient was hard yakka in the bad old days. Calculating the several hundred correlation coefficients you would need to get one really improbable lulu was virtually impossible, so fear and alarm seldom arose.
That was before the day of the personal computer and the hand calculator. Now you can churn out the correlation coefficients faster than you can cram the figures in, with absolutely no cerebral process being involved.
As never before, we need to be warned to approach statistics with, not a grain, but a shovelful, of salt. The statistic which can be generated without cerebration is likely also to be considered without cerebration. Which brings me, slowly but inexorably to the strange matter of the podiatrists, the public telephones, and the births.
Seated one night at the keyboard, I was weary and ill at ease. I had lost one of those essential connectors which link the parts of one's computer. Then I found the lost cord, connected up my computer, and fed it a huge dose of random data.
I found twenty ridiculously and obviously unrelated things, so there were one hundred and ninety correlation coefficients to sift through. That seemed about right for what I was trying to do.
When I was done, I switched on the printer, and sat back to wait for the computer to churn out the results of its labours. The first few lines of print-out gave me no comfort, then I got a good one, then nothing again, then a real beauty, and so it went: here are my cunningly selected results. I have simply used, for good reasons, the methods of the crooks and con-men.

Tasmanian birth rate
SA public phones
NSW podiatrist registrations
Tasmanian birth rate
1
+0.94
-0.96
SA public phones
+0.94
1
-0.98
NSW podiatrist registrations
-0.96
-0.98
1

Well of course the podiatrists and phones part is easy. Quite clearly, New South Wales podiatrists are moving to South Australia and metamorphosing into public phone boxes. Or maybe they're going to Tasmania to have their babies, or maybe Tasmanians can only fall pregnant in South Australian public phone booths.
Or maybe codswallop grows in computers which are treated unkindly. Figures can't lie, but liars can figure. I would trust statistics any day, so long as I can find out where they came from, and I'd even trust statisticians, so long as I knew they knew their own limitations. Most of the professional ones do know their limitations: it's the amateurs who are dangerous.
I'd even use statistics to choose the safest hospital to go to, if I had to go. But I'd still rather not go to hospital in the first place. After all, statistics show clearly that more people die in the average hospital than in the average home.
The original version is here:
http://members.ozemail.com.au/~macinnis/ockhams/stats.htm.

Monday, 7 October 2019

Science Playwiths 1.


I am about to sign a contract for a new book which I want to be called Science Playwiths, because it originated in a long-running web site of that name. It covers STEAM: Science, Technology, Engineering, Arts and Mathematics. Here's a first sample, about curious number facts.
 *
One estimate of the size of the entire universe puts its radius at 3 x 1023 times larger than the size of the observable universe. That is almost exactly half the value of Avogadro’s number, which every good chemist knows to be 6.022 x 1023. So what?
The speed of light in terafurlongs per fortnight is 1.803, close enough for government work to the metric equivalent of a fathom, showing that any measured value can be given almost any number by a cunning choice of units. Any reasoning based on the coincidence of two values needs to be questioned closely to see if the coincidence is just, well, a coincidence—or the work of somebody using peculiar units to get a result.
For example, the number of islands in the Hawaiian island chain is 137, and the ratio 1/137, often referred to as alpha, is the fine structure constant in physics. This value represents the probability that an electron will emit or absorb a photon. It is the square of the charge of the electron divided by the speed of light times Planck’s constant, and it is just a number: there are no dimensions or units involved at all.
The significance of alpha was first spelled out in 1915 by a physicist named Arnold Sommerfeld—at the time, measurement errors made the value closer to 136—and physics ever since has been littered with efforts to explain the number.
The most famous attempt was that of Sir Arthur Eddington, a prominent astronomer who believed that such constants could be used to produce a theory of the universe. He built a huge 16-dimensional equation full of these constants and claimed that alpha could be calculated from the number of terms: (162 - 16)/2 + 16, or 136.
Unfortunately, experiments quickly showed that alpha was really closer to 137. Eddington was not dismayed. He said he had forgotten to add one more factor, alpha itself, and made the value 137. For this, Punch magazine dubbed him Sir Arthur Adding-One.
Eddington was not deterred. Proudly he proclaimed that the firmament contains exactly (137 - 1) x 2256 protons. In 1938, he declared:
I believe there are 15 747 724 136 275 002 577 605 653 961 181 555 468 044 717 914 527 116 709 366 231 425 076 185 631 031 296 protons in the universe and the same number of electrons.
Of course, he may have been right; I have not yet been able to count them all, and it’s hard enough trying to find the value of 2256.