Posts written by Thomas Lumley (1821)


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

July 27, 2016

In praise of NZ papers

I whinge about NZ papers a lot on StatsChat, and even more about some of the UK stories they reprint. It’s good sometimes to look at some of the UK stories they don’t reprint.  From the Daily Express


The Brexit enthusiast and cabinet Minister John Redwood says “The poll is great news, well done to the Daily Express.” As he seems to be suggesting, you don’t get results like this just by chance — having an online bogus poll on the website of an anti-Europe newspaper is a good start.

(via Antony Unwin)

July 26, 2016

Going for the headlines

From SalonShock poll: Nate Silver’s election forecast now has Trump winning

That’s not either of his two forecasts, that’s the “now-cast”:

From Nate Silver:

But one method to measure the convention bounce is to look at FiveThirtyEight’s now-cast, our estimate of what would happen in an election held today. We don’t usually spend a lot of time writing about the now-cast because — uhh, breaking news — the election is scheduled for Nov. 8.

Nate Silver’s actual election forecast:


59.5% is low enough to be worrying, but it isn’t less than 40.5%

Obesity genetics

There’s actually a good story in the Herald about obesity and genetics, based on research in Samoa.  The researchers are interested in finding genetic relationships to understand the biological processes in obesity better. Polynesian peoples are relevant partly because of relatively high obesity rates, but also because each island group was settled by a relatively small number of people, leading to larger genetic differences between nations. It’s the same reason Icelanders are studied a lot by geneticists.

In this study, they found a genetic variant that is essentially non-existent in previously-studied populations (about 1 in 10,000 people) but present in almost half of their sample from Samoa.  People with the variant had, on average, a higher BMI by 1.4 kg/m2, which is quite a lot for a genetic effect — at least five times larger than the most important variant previously known, and enough to perhaps be relevant for health. On the other hand, the genetic variant explains only about 1.5% of the variation in BMI between people in the study and less than 10% of the difference in average BMI between, say, Samoa and Japan.

There’s also evidence that the genetic variant has been advantageous to the ancestors of modern Samoans.  Genetic variants that have spread more rapidly through a population tend to have brought along larger chunks of the genome from the person where they first arose.  This shows up as correlation with a larger than usual set of neighbouring variants, which was seen here.  The main reason for a genetic variant to spread more rapidly is if it is beneficial, so that’s probably the explanation.  The story given about survival on long ocean voyages would make sense, but there isn’t any specific genetic evidence for that.

An obvious question is whether this genetic variant is present in other Polynesian populations, perhaps including Māori. No-one knows yet — they haven’t looked, and this is the sort of research where consulting in advance with iwi would be important.

July 25, 2016


  • US election opinion polls are going to get less accurate for a few weeks, history suggests.
  • The Guardian looks at Twitter abuse directed at politicians (contains abusive language)
  • PBS video about glow-worms — the StatsChat-relevant point is that glow worms are spread much more evenly and less randomly than stars
  • The famous London Tube map, now with walking times between the stations (only stations on the same line, sadly)
  • Emma Hart writes about the Broadcasting Standards Authority’s evidence-based ‘community standards’ at Public Address
  • Interesting graph of income by occupation group in the US over time (Flowing Data)
  • Why there are fewer PokemonGO locations in black neighbourhoods in the  US. (They don’t actually mean ‘why’, they mean ‘how’ — if Nintendo wanted to change this they could have.)

XKCD on controlled comparisons (and PokemonGO)


Causation implies correlation (almost)

As we all know, variables can easily be correlated when they don’t really have anything to do with each other — especially time series.  There aren’t enough types of trend over time to go around, so variables have to share. takes advantage of this by making graphs of entertainingly spurious correlations:


In the other direction, though, the correlations can be more convincing.  When you see a story claiming that WiFi and cellphones cause Alzheimer’s Disease–

Scientists are still trying to figure out just how much damage the electromagnetic signals emitted from WiFi equipment can actually do to the human brain. But by potentially preventing our brains from flushing beta-amyloid—just by being in close proximity—it’s clear these devices already have the potential for serious damage.

–it’s reassuring to remember that as WiFi has become more common, rates of dementia at a given age have gone down, not up.

It’s logically possible that dementia rates would be going down faster if not for technology, but you’d want pretty good evidence before you started believing that — starting with some sign that the people making the claims understood the basic disease trends.

July 24, 2016

Disease awareness

One News tonight had a story about venous thromboembolism (VTE) and how people don’t know about it. I couldn’t find a reference for the research, but it wouldn’t surprise me if 50% of people hadn’t heard that term — and many of those who do recognise it might associate it only with long-distance flights.

I can see people wanting to raise awareness, and the story includes a really good animation of what actually happens in a VTE. On the other hand, this is how VTE risk varies with age (source)

Nature Reviews Cardiology 12, 464 (2015). doi:10.1038/nrcardio.2015.83

On top of that, about half of VTE is due to hospitalisation, as the story went on to describe. Given those risk patterns, it’s kind of weird to have the main example in the story be a 20-year-old law student who got a pulmonary embolism without any obvious risk factors.

Disease awareness can be valuable, but it’s probably more useful when it’s modelled on people who are at high, or at least average, risk of the disease.

Tense and depressed

Q: Did you see that sleep disruptions will give kids depression and anxiety in later life?

A: The story in the Herald? From the Daily Mail? Yes

Q: And that this costs the US $120 billion per year? Is that what they really found?

A: No. The $120 billion is for all forms of anxiety and depression. They’re not really claiming it’s all  — or even mostly — due to kids sleeping badly. They just want you to see the number.

Q: What did they really find?

A: They say kids who got less sleep for two nights found less enjoyment in positive things.

Q: Makes sense. You certainly get grumpy after even one night’s disrupted sleep.

A: Pot, kettle.

Q: But that’s just short-term. What happened when the kids grew up?

A: They didn’t. They’re still kids.

Q: How long have they followed them up?

A:  The press release describes the experiment as still ongoing: “they are temporarily restricting sleep in 50 pre-adolescent children between the ages of 7 to 11. “

Q: But the Herald has that in the past tense.

A: Yes. Yes it does.

Q: How long has the research been going on?

A: The grant was funded about two years ago.

Q: Ok, so why does the story talk about “depression and anxiety as adults”?

A: The researchers believe there would be long-term effects in adults.

Q: But this experiment isn’t about that?

A: No.

Q: That’s a relief, actually. If the experiment really was going to make the kids depressed as adults it wouldn’t seem ethical.

A: No, though we also could talk about the ethics of news stories that imply parents are at fault for everything.

July 22, 2016

Abstract isn’t the same as logical

Suppose, to copy a classic example, you are a checking license compliance for a pub and have to  make sure only people 18 or older are drinking alcohol.  There are four people present. Alice is drinking beer. Boris is drinking water. Chris is fifteen. Doris is 50. Do you need to:

For most people, this is pretty easy.

The Herald has an equivalent puzzle that has been made pointless and abstract, in terms of letters and numbers, and lots of people get it wrong. That’s fine, except the headline is “Card test reveals how logical you are.”  Manipulating conditional implications abstractly is a useful specialised skill, but it’s not the same as logic.  In a similar way, manipulating probabilities symbolically is a useful specialised skill, but it’s not the same as understanding risk.

When it’s just a game, as in the story, this isn’t a big deal. But when you have a real question, communicating it so that it’s easy to answer rather than pointlessly hard does matter.


July 21, 2016

The ‘breakthrough’ story

This is the front page of The Age, Melbourne’s serious newspaper, today:


As Jack Scanlan observed on Twitter, it’s great to see science on the front page. On the other hand, the story is an example of how the ‘breakthrough’ narrative dominates science stories (as Scanlan himself wrote in Lateral magazine back in February).

The description of the research itself is fine, but the impact is a bit overplayed

“The idea is to screen people who aren’t displaying symptoms,” Dr Cheng said. “We can then identify their risk of developing Alzheimer’s disease and intervene earlier.”

Eventually that’s going to work, but right now we don’t know how to intervene and so there’s not much point in doing it earlier.

From the viewpoint of journalism, though, there’s another issue. Just in New Zealand papers over the past few years we have:

  • Has a 15-year-old found a way to test for Alzheimer’s? (Herald, 7/2015)
  • Blood test could detect dementia (Herald, 3/2014)
  • Blood test could give ten year warning of Alzheimer’s (Herald, 6/2015)
  • Alzheimer’s blood test hope (Herald, 7/2014)
  • Excitement over Alzheimer’s discovery (Otago Daily Times, 4/2016)

The last one even uses the same approach, measuring microRNAs in blood samples.  It’s a good idea; it’s good science; it may eventually be useful. It’s not a unique breakthrough.

July 20, 2016

Another set of rugby predictions

The Herald has a new set of rugby team ratings going back into history, with pretty graphs as well, based on work by UoA student Wil Undy.  These are ‘Elo’ ratings in the modified sense that uses the term. The original Elo method was for chess, where you only get a winner, not a margin of victory, but it’s been updated to use the extra information from the winning margin.

So, how are these different from the StatsChat ratings?   The methods are fairly similar: there’s a rating for each team, which is updated using the results of each game, and there’s a tuning parameter that controls how much each new game is allowed to change the rating.

The primary difference is how the ratings are calibrated. In David Scott’s system the difference in ratings estimates the margin; in an Elo system the difference in ratings can be converted into a predicted probability of winning.

Just based on crude probability of getting the right winner, the StatsChat predictions may be very slightly better — for the last three seasons of Super 15, David Scott has got 65%, 66%, and 68% right, and the Herald claims 64-65% for Will Undy’s model.  On the other hand, if you actually want to bet, a predicted probability could be more useful than a predicted margin.

The graph for the Crusaders shows one interesting feature of the model


The Crusaders’s rating has improved through the season in every season for the past 15 years, suggesting that the between-season correction is too strong, or that memory for more than one year into the past might be helpful.


Rugby fans will be able to find other interesting patterns and places where tweaks could be made. What’s interesting about both Wil Undy’s new method and David Scott’s approach is how well you can do with a formula that knows nothing about rugby or rugby players and only remembers one number for each team.  These models are most interesting as a baseline: how much better can you do by following the news and taking advantage of actual rugby knowledge?