Blog News

1. Comments are still disabled though I am thinking of enabling them again.

2. There are now several extra pages - Poetry Index, Travel, Education, Childish Things - accessible at the top of the page. They index entires before October 2013.

3. I will, in the next few weeks, be adding new pages with other indexes.

Showing posts with label mathematics. Show all posts
Showing posts with label mathematics. Show all posts

Friday, 11 February 2011

What do they teach them?

As I was watching a TV quiz show, there was a true or false question: One divided by one is zero:true or false. The guy answering the question got it right.He said, "false". In this particular quiz the other contestants then get the chance to change any of the answers they think he has wrong. Three of them, all apparently normal intelligent people, then sat discussing it. There were two men and a woman with ages from twenties to sixties. You'd have thought one of them would know what one divided by one is, but no. They all agreed that one divided by one is zero. One of them actually said, "Well it can't be one, can it?" Three different generations of schooling and not one of them could manage the vastly tricky task of dividing by one.

Sometimes I despair.

Friday, 19 February 2010

Good Science makes Bad Sound Bites

There's an advertisement running on TV at the moment for a loan company. In it someone wants to borrow £70 for five days and is told it will only cost him £9.20. So he can get the £70 today and five days later he can pay back £79.20. It's pretty clear and it's up to the student whether he borrows it or not. Less clear, though stated in the print at the bottom of the screen, is that this equates to an annual percentage rate of 2689%. So if he doesn't pay back his £70 for a year it will have become £1882. After two years it would be more than £50,000. Of course it's very unlikely that the loan company wouldn't intervene rather more quickly than that.

This is an example of how language can be used to hide mathematical facts. It's actually rather unusual in that an absolute figure is being used to hide a percentage. Much more common is the other way round, especially in the press and even more especially in reporting of science.
We routinely see instances in the press of quoted figures along the lines of "eating x causes a 25% higher risk of cancer"* and this, as it is stated, is entirely meaningless. The figures are usually abstracted from scientific papers which have details of exactly what the quoted figure means and how it was derived but the newspapers very rarely bother with that because good science doesn't make for good sound bites.
What they do when quoting statistics like this is use the "relative risk increase" which is a very misleading figure. What they need to do is quote the "absolute risk" or the "absolute risk increase".

In the example above 25% sounds quite dramatic but if the sample size was 1000 and in the population not eating X four developed cancer while in the sample eating X five did then the absolute risk has has gone from 0.4% to 0.5% an "absolute risk increase" of 0.1%, or one in a thousand, which isn't even statistically significant compared to the background level.

This 0.1% is EXACTLY the same information as the previous 25% but described using a much less dramatic, and much more easily understood, figure. Words and mathematics sometimes make very uneasy bedfellows, especially when mediated by the people with a vested interest - be it the vested interest of a loan company wanting to make money or a journalist wanting to sell papers.

(*Incidentally I chose this example because one of the books I read , Ben Goldacre's excellent Bad Science, suggested facetiously that the newspapers are engaged in a process of dividing every substance on Earth into two groups - ones that cause cancer and ones that cure it, in the case of at least one of our National papers in the UK we get an X causes/cures cancer story, pretty well every week.)

Saturday, 15 August 2009

Google Analytics

Can someone explain to me how, on my other blog, my hits over the last ten days (according to Google Analytics) can be 0 6 2 0 1 2 1 1 1 0, and yet show, on the last day an increase of 38%.
Three years of University Maths didn't equip me to cope with this kind of arithmetic.

Friday, 10 July 2009

Sudoku: a rather more interesting question

I watched someone on the Metro this morning doing a Sudoku puzzle. Personally I find them dull in the extreme, an entirely algorithmic and mechanical process that hardly exercises the brain at all. They are nowhere near as much fun as a good cryptic crossword. They do, however, present a couple of interesting features that I have pondered and would genuinely like to know the answers to.
The first, and probably least interesting, problem is how are they created? Presumably a full grid is created and then some numbers removed but how is that grid created? How do you start with an empty grid and ensure that as you write the numbers in you don't write yourself into a position where it is impossible to fill the remaining squares. I assume there is some kind of algorithm that allows this to be done but I'd like to know what it is.
The second puzzle I've pondered is this, how many different grids are possible? I have tried to devise methods of working this out, and usually I'm quite good at probabilities and combinations but I haven't been able to even think of a way to approach this problem.
The third, final and most difficult is this - starting from a full grid how do you remove numbers to arrive at the minimum sufficient condition for a single solution? Remove too many and there will be multiple solutions, don't remove enough and it will be easier than you want. How do you make sure that what is presented contains enough, and only enough, information?
The Sudoku puzzle itself I find remarkably boring but I really would like the answers to these questions.
Anyone got any ideas, or a source that shows the answers?

Wednesday, 17 June 2009

The Birthday Problem

One of those books mentions, in passing, one of my favourite bits of counter-intuitive maths. I first ran across it way back, when I was a nerdy schoolkid who liked to do maths. Just in case there is anyone who is unfamiliar with it, here it is again.
How many people need to be in a room in order for there to be a better than even money chance that two of them have the same birthday?
You can assume that all birthdays are equally likely and, just to make it a bit easier, you can forget about leap years.
.
.
.
So, think about it.
.
.
.
Of course if you've come across this before you had the answer sentences ago.
.
.
.
But, on the off chance that you haven't seen it, go on, think about it.
.
.
.
I'll just wait here.
.
.
.
(Um-de-dum-de-dum-de dum)
.
.
.
Still thinking?
.
.
.
Go on, I'm in no hurry.
.
.
.
OK. Let's have a look at the problem. Most people instinctively go for rather high numbers. 183 is a fairly common answer, presumably because that's over half of 365. It's completely wrong though. The correct answer, and I can prove it, is 23.
The way to tackle it is to work out the percentage chance that NONE of them have the same birthday and then take that away from 100.
So if there is one person in a room he has a birthday that (because we're ignoring leap years) must fall on one of 365 different dates. If someone else comes in then that person's birthday can be on any one of the others so it has 364/365 chance of not being the same. The next person has 363 chances in 365, the next one has 362 chances and so on.
The 23rd person has 343 in 365.
To get the chance of all of these events being true, we need to multiply them together.
(365/365) * (364/365) * (363/365) *... ... * (343/365)
and if you do that you get 0.048697 or as a percentage about 48.7%.
.
So if the percentage chance of there being no two birthdays the same is 48.7%, then the percentage chance that at least two are the same is 51.3%, or a bit more than evens. It turns out with a bit more maths that you only need there to be 57 people for there to be a better than 99% chance that two of them share a birthday and for a hundred people the chance of there being no two people who share a birthday falls to below one in a million.
I remember that being one of the first bits of counter-intuitive maths that I ever saw. I love maths almost as much as I love languages.

Tuesday, 16 June 2009

Bad Maths

While I'm on the subject of Bad Science, Ben Goldacre's entertaining dissection of the alternative medicine industry and the bad practices of the pharamcuticals industry...
The trouble (or maybe the advantage) of reading this kind of stuff is that you can't stop noticing examples all around you when you have read it.For example there is a report that I heard on TV at least half a dozen times yesterday which says, in various paraphrases, that "men are up to 70% more likely to die of cancer than women."
The suggestion is that this is a) terrible and b) due to men's lifestyles.The trouble is that the bare statistic is entirely meaningless unless they give a lot more information with it. We need to know what they mean by 70% more likely. We need to know if they are talking about men who have cancer being more likely to die than women who have cancer or do they mean men and women from the whole population.
On its own the bald statement is indecipherable. For example, if 1 woman in 1000 dies of cancer then this figure means that slightly less than two men in a thousand do. Whereas if 100 women in 1000 die of cancer then 170 men do. Rather more significant.If we are talking about the number of cancer patients who die (rather than the number of people who die of cancer), the maths gets more complicated because we would need to know the incidence of cancer in male and female populations as well as the actual relative sizes of those populations before the statistic becomes meaningful.This imprecise use of mathematical language isn't hard to understand - it arises because journalists need a short quick way of saying things without giving long explanations and most of them probably don't understand that their statistics are, as presented, completely meaningless.
And that's before we look at the intuitive leap that says it's down to lifestyle differences.
I must look up the actual research paper and see what it really says.

Wednesday, 18 February 2009

Big Numbers

I have the ten o'clock news on TV while I'm sitting here doing nothing very much on the internet. The story that's just finished was the current one about the fraud charges levelled at Sir Allen Stanford. The charges, according to news, relate to a $9 billion dollar fraud. I was moved to consider the mathematics of it. How on Earth could anybody ever spend $9 billion dollars? Even using the American rather than British definition of a billion that's $9,000,000,000 which means if you spend $10,000,000 every year and make nothing it will take nine hundred years to spend it.

Sir Allen Stanford is 58 years old, if someone that age managed to live for another fifty years they would have to spend a staggering 180 million pounds a year to get rid of it all.

On my current salary it would take me over 370,000 years to earn that much. And I have to work for mine.