Posts written by Thomas Lumley (2566)

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

April 4, 2025

Bike data

Tim Welch has produced a nice Auckland Cycleways Dashboard (it’s a draft at the moment, or ‘beta’ as we nerds say).

Here are some of the University-relevant routes (click to embiggen, as usual)

These are based on the Auckland Transport cycle counters, which are good for the city centre and major bike paths, but less informative for, say, people commuting in from the south, where there aren’t bike lanes or bike counters.

April 3, 2025

Tariff co-incidence

The tariffs announced by President Trump are based on what he describes as tariffs imposed by other countries on the US. These don’t bear any obvious relationship to the numbers that ordinary economists would describe as tariffs

However, a poster on Twitter, @nonagonono, found there is a strong relationship between the claimed tariff and the countries import/export balance with the US

We want to be a little sceptical of relationships that come just from data-dredging, with no real theory, but this relationship is tight enough that it probably isn’t just a coincidence, and probably does tell us something about the definition of ‘tariff’ the President is using.  If so, the ‘tariff’ of 20% that New Zealand allegedly imposes is actually a trade deficit of 20%, which is not quite what I get from NZ trade figures (24%) but is close enough that some slight changes in definition might explain it.

Food bank demand and supply

One News had a story based on a press release from NZ Food Network.  NZFN are a very worthwhile organisation. They coordinate donations and purchasing of bulk food for food banks, which they same amounts to about 45% of  the food being distributed.   If you were looking to donate to an organisation that helps feed people in this country, they look like a cost-effective choice. NZFN also run a food bank survey and a food security snapshot to find out about national needs and supply by food banks.

The headline figure in the press release is that the food banks “provided food to over 500,000 individuals each month”, based on the current survey. That’s a lot.

One News, but not the press release, said this was an all-time high.  Looking at previous annual reports and information sheets from NZFN, it doesn’t seem to be.  NZFN reported 454,000 in the first half of 2024, but their 2024 Annual Report said 655,152 for the second half of 2023 and the 2023 annual report says 480,104.  The number has been close to 10% of the New Zealand population ever since NZFN really got going. The scandal isn’t that the number is up, it’s that the number has been high for years!

What has changed noticeably is the total amount of food NZFN has been able to distribute.  The 2022 annual reports says about 8.6 million kg, the 2024 annual report says 5.6 million, and the 2024/2025 summer newsletter says 6.3 million.  They lost some government funding to purchase food, even as demand was increasing.  (If you look at the current press release you see a higher number that that for total food distributed, but I think that’s total distributed by the food hubs, rather than by NZFN)

I said “the number” is close to 10% of the population.  It’s a bit hard to find out exactly what this number means: is it genuinely unique people fed per month? Do the food hubs actually count how many people each recipient is feeding, and track individual visitors?  The reason I’m a bit suspicious about the number is a 2023 press release

Over half a million people are now being supported by NZFN food hubs each month but there is still a growing need. That works out to 1,868,491 more people being supported by NZFN, than they were in January 2020.

It’s not possible to get a total number of extra people from a monthly number, because you’d need to track individual people over the whole year; you can only get total number of visits.  Given this, it looks possible that that the 500,000 per month might also be total number of visits rather than unique monthly visitors.  It would still be a lot, either way.

You might think that I should answer this question by contacting NZFN rather than guessing.  I’m not sure I (as a One News reader) should have to, but I did actually try that.

March 31, 2025

Bogus polls are bogus even for the good guys

Nature magazine (yes, that one) has a headline 75% of US scientists who answered Nature poll consider leaving.

This is a more honest phrasing that one usually gets in bogus poll headlines, but it’s still bogus.  The ‘poll’ was

Responses were solicited earlier this month on the journal’s website, on social media and in the Nature Briefing e-mail newsletter. Roughly 1,650 people completed the survey.

The other problem with the poll is that ’emigrational ideation’, as one might call it, is a very low bar. Lots of people consider doing things. Many fewer actually do them. People having been claiming they are considering leaving the US for a long time, and we don’t know from the ‘poll’ how the current numbers compare to the usual state of affairs. Remember this cartoon, from 2006:

In fact, I think it’s quite likely that there are more scientists than before actively looking into leaving the US.  Anecdotally, we are getting more enquiries here and more US applicants to advertised positions.  You might think this sort of anecdata is a pretty weak basis for conclusions . You’d be right, but it’s still better than a bogus poll.

March 26, 2025

Ebikes for brains

Q: Did you see ebikes are good for your brain? If you’re old.

A: How old?

Q: Over 50

A: That’s not… Ahem. That’s a very inclusive definition of  ‘old’, isn’t it?

Q: Does it work?

A: Who knows? It might.

Q: Does this research show it works?

A: What would we want to check?

Q: Mice or people?

A: Good. People, not mice.

Q: Random allocation of people or just correlations?

A: Yes, that’s right.  This one is … somewhere in between.

Q: What’s in between randomly allocating people and just seeing what they choose? You flip a coin, but with your eyes closed?

A:  Well…

Participants were pseudo-randomly assigned to one of three groups: pedal cycling, e-bike or non-cycling control groups. Priority was given to filling the cycling spots then controls were recruited to match sample characteristics. The control group were recruited after the experimental groups had started to be run so that we could match age and gender in the control group with those participants in the experimental groups. The control group were aware that they would not be cycling during the trial and those in the experimental group were all re-engaging with cycling.

Q: So, comparing people who signed up to do cycling with people who signed up to avoid cycling and other exercise.

A: Yes, but in the context of cycling research, not just random people asked to not do any extra exercise.

Q: And did the cycling group have better brains?

A: They measured a whole lot of things. Eight different multi-question assessments. Some of those improved and some didn’t

Q: Is that what they expected?

A: Not really, no. They expected improvements in a lot of the things that didn’t go up

In line with our predictions, we found trends for improvement in executive function in the Stroop task and letter updating task in both cycling groups compared to baseline and the non-cycling controls. We also found improvement in speed of processing for go trials in the Stop-It signal task only for e-bike participants during the intervention. Measures of memory and spatial functioning did not show an effect of cycling. Furthermore, we found increases in self-reported mental health on the SF-36 health survey for only the e-bike cycling group. Despite strong evidence from previous studies for an increase in well-being after exercise and the impacts of the outdoor environment on this aspect of mental health, we did not find increases on the PWB, SL or PANAS questionnaires.

Q: Could it just be the study was too small to give reliable conclusions?

A: Well, if that’s the explanation, then the study is too small to support press releases and media attention.

Q: So e-bikes are bad?

A: E-bikes are a good form of low-carbon transport, especially in hilly cities with nice climates, and let you get some, but not too much, exercise.   I don’t think they need special effects on the brain to be popular.

Bogus Tesla Polls Are Bogus

Via the US website Electrek, which does news about electric vehicles and adjacent subjects, a story about bogus polls.

A bogus online clicky poll in Germany got 100,000 clicks and found that 94% of the time that a button was clicked, it corresponded to “absolutely not willing to buy a Tesla”.  Electrek calls this “100,000 Germans”, based on very little evidence.

The poll kept running.  By the time it had 470,000 clicks, only 29% of the clicks corresponded to “absolutely not willing to buy a Tesla”.  Quite a lot of these clicks — 253,000 — came from just two IP addresses in the US. A bit of maths shows that the clicks from the two US addresses made up about three-quarters of the pro-Tesla clicks.

The magazine, T-Online, was forced to the shocking conclusion that its meaningless customer-engagement exercise had been manipulated by someone else’s meaningless customer-engagement exercise.

March 25, 2025

If you see a fork in the road

From Pew Research, a bizarre error

A few Reddit users shared screenshots from a variety of surveys, where questions that should have offered answer options of “yes” and “no” instead offered the choices “forks” and “no.”

In summary: web browsers may offer you the option to translate web pages automatically from languages you don’t read to languages you do read.  That is, they have the option to silently rewrite web pages before showing them to you. They aren’t 100% reliable either in guessing which web pages are actually in a foreign language and need translating or in translating those pages to, as it might be, English.

March 23, 2025

Briefly

Screen time

In the Herald this week

New Zealanders are spending more time online than ever, with 50% of respondents spending four or more hours of their leisure time on the internet each day, according to a study commissioned by InternetNZ.

But that doesn’t necessarily mean doom-scrolling TikTok.

The result is partly because of the changing way that more traditional media is delivered.

Watching a couple of hours of TVNZ+ on the smart TV in your lounge or listening to Spotify during your commute counts towards your total.

That’s a nice start — giving the headline result and then contextualising it.  I was hoping then to see whether streaming more traditional media did in fact account for the increase. No more mention.

If we look at the report itself, there’s a good description of the survey: a sample of 1001 people, sampled and weighted to be representative of the subset of the NZ population who are online.  What does the report say about the increase?

Half of New Zealanders* (50%) spend four or more hours a day on the internet for personal
use.
This is a slight, but not statistically significant, rise from 2023 findings.

In 2023 the number was 46%, and a four percentage point change is relatively unimpressive compared to the sampling uncertainty.  The report doesn’t estimate how long we spend doing each activity on the internet, but the proportion of people who use the internet for streaming is about the same this year as last year or maybe slightly higher (42% vs 39%)

The report is generally interesting and useful, with the usual caveat that it’s self-reported — people may not be entirely accurate when you ask them how much time they spend online or how much they know about AI or whatever.

March 18, 2025

Good news graph

The Washington Post writes about cervical cancer: the vaccine works.  This isn’t new news: we know the vaccine stops infection with cancer-causing strains of the human papillomavirus (that’s why it was approved). We know the vaccine stops cervical cancer: the first reliable data came out a few years ago.  Now the first cohort of vaccinated girls is old enough that we’re seeing the reduction in cervical cancer deaths.

Using data from the National Center for Health Statistics, researchers looked at cervical cancer deaths in three-year blocks of time. Between 1992 and 2021, there were 398 cervical cancer deaths reported among women younger than 25. During the period of 1992-1994 to 2013-2015, mortality from cervical cancer gradually declined 3.7 percent each year. The period of 2013-2015 to 2019-2021 saw an even greater drop to 15.2 percent annually, according to the study.

The number of deaths decreased from 55 in 1992-1994 to 35 in 2013-2015 to 13 in 2019-2021.

“Assuming that the trend from 1992-1994 to 2013-2015 would have continued, an estimated 26 additional cervical cancer deaths would have been expected to occur between 2016 to 2021, based on projected mortality rates,” the authors wrote.

That description seems like a hard way to present this graph from the article in JAMA (perhaps copyright is the problem?)

The squares are what happened in reality. The orange line shows the downward trend we were seeing before the vaccine, due to better testing and treatment.  As you can see, the last two squares, post-vaccine, are dramatically below the orange line. Below is good.