Posts written by Thomas Lumley (2645)

avatar

Thomas Lumley (@tslumley) is Professor of Biostatistics at the University of Auckland. His research interests include semiparametric models, survey sampling, statistical computing, foundations of statistics, and whatever methodological problems his medical collaborators come up with. He also blogs at Biased and Inefficient

August 16, 2012

Attack of the killer eggyolk

The Herald tells us

Eating eggs yolks is almost as bad for your heart as smoking, new research suggests.

This one is not really the fault of the newspaper: that is what the researchers suggest, though it is not really what the research suggests.

 Researchers analysed lifestyle data from over 1200 men and woman aged about 60 who were attending a vascular prevention clinic in London. 

So we’re looking at patients who had been referred to a special clinic because of suspected atherosclerosis, not a representative sample (and that’s London, Ontario, not the better-known one slightly west of the Olympic stadium).

The researchers asked patients about egg consumption and smoking (but did ask for or didn’t use anything else about diet or exercise).  They found that patients with a lot of atherosclerotic plaque in their carotid arteries tended to be older, more likely to smoke, and more likely to eat eggs.   How much more likely? Well, the ‘almost as bad’ is seriously understating the association they found.  If their results are correct, eating one egg yolk has more than ten times the effect on carotid plaque of smoking one cigarette.  The estimates don’t look that extreme at first glance, because they count consumption in egg yolks per week, and packs of cigarettes per day.

This is the sort of situation where it’s important to look at what is already known.  There is a big US cohort study following up nurses and doctors, which didn’t find any adverse effects of egg consumption.  Short-term experimental studies with controlled diets have had mixed results.  A few other long-term studies have found heart disease effects specifically in diabetics, but only 11% of the people in this study were diabetics.

It’s possible that eggs increase heart disease risk, especially in diabetics, but the results of this study seem too extreme to be explained by a real risk.  Another possibility is that when you ask people about egg consumption, what you get is the number of times per week they consume a good solid traditional breakfast, where eggs are not the only dietary risk factor present.

Exactly 100 million pi (roughly)

The US Census Bureau estimates that the population of the United States reached π×100 million on Tuesday afternoon (US time): 314,159,265. (via Stuff)

There’s no margin of error with this estimate, which might seem surprising from a respected national statistics agency.  The reason is that there is no sampling error in the estimate, all the uncertainty is from non-sampling errors.   The Census Bureau started with the 2010 US Census counts, subtracted deaths and emigrations (me, for example) and added births and immigrations.  In principle, the data on all these is complete and no sampling is used.  That doesn’t mean there isn’t any error — far from it — but it does make it very hard to estimate how much error there is.

The ubiquity of non-sampling error, and the impossibility of estimating it accurately, explain why surveys in New Zealand are about the same size as surveys in the USA, despite the huge difference in population.   In theory, you could afford to collect larger samples in the US, so US statistical agencies could get more precise estimates than Stats New Zealand can afford.  In practice, once surveys get to a certain size, the non-sampling error starts to be more important than the sampling error, and extra sample size stops giving you much increase in accuracy.

August 15, 2012

Is that a kiwi in your pocket?

Stuff has a story based on the latest release from the “Mega Kiwi Sex Survey”, covering all sorts of headline-worthy topics such as infidelity rates, and major turn-ons and turn-offs.

Conducting an accurate and reliable sex survey is difficult: both in taking the sample and in persuading people to give honest answers.  It’s much easier not to bother with all that.  We’ve commented adversely on the Durex Sex Survey before, but that at least made real attempts to get a representative sample.  Durex hired Harris Interactive, who are probably the leaders in trying to get reliable data out of online surveys.

The Mega Kiwi survey, not so much.  The producers say (update: most links here NSFW)

Fitzgerald says they are aiming to capture data from a broad cross section of New Zealanders “We’re working with a couple of key partners to get their audiences to take part, but we’re really trying to build a complete picture of the New Zealand sexual identity, so whether you’re a 60-year-old male in Eketahuna or a 22-year-old female in Ponsonby, we want to hear from you.”

and that’s how they went about it. A little Googling finds some of the links to the online survey form.  It’s a typical bogus poll.

Even if it were a real poll, the sample size of 1500 wouldn’t justify quoting results to the nearest tenth of a percentage point, since the margin of error would be about 2.5%.    In fact, the news release gives numbers to a tenth of a percent even for Gisborne.  Gisborne has about 1% of the Kiwi population, so a representative sample would have just 15 Gisborne respondents.

Still, the real point of the survey is to get news coverage rather than having to pay for advertising.  It seems to have worked.

Real petrol prices

From Stuff

BP spokesman Jonty Mills said as prices neared uncharted territory it was likely demand would drop. The outlook for prices remained volatile, he said.

An Automobile Association spokesman, Mark Stockdale, said prices were now “perilously close” to a record, which typically prompted a review of driving options and habits.

As usual this is talking about nominal prices, not inflation-adjusted, so the real prices aren’t really as ‘perilously close’ to a record as all that.  Dividing the StatsNZ petrol price index by CPI we get:

Prices are much lower than in 1985,  and still safely below the more recent 2008 peak.  The record that is in peril is the little wiggle in prices from last year.

On the other hand, prices are up at the levels of the 1980s (though with much cheaper cars), so driving really is getting more expensive.  A “review of driving options and habits” might be a good idea

 

 

August 14, 2012

Numerate Queenstown police.

From the Otago Daily Times:

Over the weekend, police dealt with seven separate incidents involving Australians, including theft, nudity, disorderly behaviour and gross intoxication.

Sergeant Mark Gill said although the numbers appeared to show the Australians behaving badly, it was proportional to Queenstown’s Australian visitor ratio with other nationalities.

The common denominator in many small crimes in Queenstown’s CBD was too much alcohol and that was an issue for the police, Sgt Gill said.

Looking at the rest of his comments, Sgt Gill is clearly trying to stop Queenstown looking dangerous and scaring off tourists, but it’s encouraging whenever we see denominators being used sensibly in public by people who aren’t (as far as I know) trained professionals.

 

 

August 13, 2012

What Wells actually said, in context

The aphorism that adorns StatsChat is actually a paraphrase, by the statistician Samuel Wilks in a 1951 speech, of what H.G. Wells wrote.  The full paragraph from Wells’  Mankind in the Making (1904) is

Modern, too, is the development of efficient mathematical teaching; so modern that for too many schools it is still a thing of tomorrow. The arithmetic (without Arabic numerals, be it remembered) and the geometry of the mediaeval quadrivium were astonishingly clumsy and ineffectual instruments in comparison with the apparatus of modern mathematical method. And while the mathematical subjects of the quadrivium were taught as science and for their own sakes, the new mathematics is a sort of supplement to language, affording a means of thought about form and quantity and a means of expression, more exact, compact, and ready than ordinary language. The great body of physical science, a great deal of the essential fact of financial science, and endless social and political problems are only accessible and only thinkable to those who have had a sound training in mathematical analysis, and the time may not be very remote when it will be understood that for complete initiation as an efficient citizen of one of the new great complex world-wide states that are now developing, it is as necessary to be able to compute, to think in averages and maxima and minima, as it is now to be able to read and write. This development of mathematical teaching is only another aspect of the necessity that is bringing the teaching of drawing into schools, the necessity that is so widely, if not always very intelligently perceived, of clearheadedness about quantity, relative quantity, and form, that our highly mechanical, widely extended, and still rapidly extending environments involve.

In 1904, it was reasonable to describe the analytic techniques needed to make `endless social and political problems’ accessible and to achieve `clearheadedness about quantity, relative quantity, and form’ as “mathematics”.  Today we would usually call these “statistics”, although “numeracy”, or “don’t they teach you anything in school these days” would also be possible translations.

It’s also worth emphasizing, for the benefit of those seeing change and decay in all around, that teaching these basic calculating and thinking techniques in public schools was something Wells was proposing as a major reform in education.

Cybercrime misrepresentation soars

From a story in Stuff

The amount of money Kiwis lost to online dating scams has doubled in the past year and now makes up almost two-thirds of all reported online fraud losses.

which then goes on to say

NetSafe operates a website, theorb.org.nz, in partnership with the police, the Consumer Affairs Ministry and other government agencies which lets people report frauds by clicking on an “online reporting button”.

So it’s not a doubling of cybercrime, it’s a doubling of cyberreporting. A bogus poll, in other words.

We then read

The charity claimed in June that cyber-crime cost the country “as much as $625 million” in financial losses once the time and expense in sorting issues, such as removing malware, was included.

If we simultaneously believed the $625 million and believed that the ‘two-thirds’ from online dating scams was meaningful, that would be $400 million per year from online dating scams, which is ludicrous.  So at least one of these figures is bogus.

In fact, they both probably are. The story goes on to say

The estimate was extrapolated from international surveys carried out by Symantec, which sells security software.

NetSafe consultant Chris Hails acknowledged Symantec’s figures had been questioned and said there was no single source of reliable figures.

The journalist is to be commended for at least forcing this admission.  The figures from people selling computer security products are notoriously inflated; there’s a good description of attempts to track down the sources of these numbers from a recent ProPublica article.

It’s hard to visualise big numbers, so it may not be obvious how extreme the $625 million number is.  For example, it’s more than the total profit from NZ beef exports ($2 billion gross, about 25% profit (p22)) , and it’s more than ACC spends on medical treatment each year.

August 8, 2012

NZ troops more at risk abroad than at home

The Herald’s headline is “NZ troops more at risk at home than abroad”, but there’s the familiar problem with denominators.

Of more than 3500 injuries recorded between January 2011 and May 2012, 269 were suffered overseas, according to figures released to the Herald under the Official Information Act.

The majority of injuries are in NZ, because that’s where most NZDF staff time is spent.  At the moment, 343 NZDF personnel are on operations and UN missions, and 553 on other overseas deployments.  That’s from a total of 11891 military personnel and 2455 (equivalent full time) civilian staff (annual report, p13).  So, just over 6% of NZDF staff  are deployed overseas, and they get 7.7% of the reported injuries.   They are at more risk overseas, even if you lump together minor sporting injuries with deaths from enemy action.     That’s what you would expect, and it’s what Lt General Rhys Jones is quoted as saying.

Ignoring the denominators misses out the opportunity to comment on the real differences: it’s a bit surprising that being deployed doesn’t increase the injury risk more, but the increase in serious and fatal injuries is probably masked by the noise of miscellaneous exercise-related injury.

August 7, 2012

Data mining sees faces in the clouds

One of the problems with lookingfor patterns in Big Data is that there’s a lot of things that look like patterns.  It’s easy to see things that aren’t there.

In a dramatic example, Phil McCarthy feeds a random polygon generator into an automatic face recogniser, and makes random changes to the polygons to improve the recognition score.

(via Ben Goldacre and Prosthetic Knowledge)

Even more alternative medal comparisons

As a former Australian, I need to point out that the natural denominator for comparisons between Aus and NZ should include sheep as well as people.

On this metric, Australia has one medal per 4.5 million population, and one gold medal per 50 million population. New Zealand has one medal per  4.4 million population, and one gold medal per 11.8 million population.

Looks like New Zealand is still ahead, even if you include sheep in the population.  On the other hand, Jamaica leaves us both in the dust.