June 20, 2018

Surprising lotto wins

The Herald has an annoyingly uncritical story about someone who claims to have a mathematical formula for winning the lottery, rather than just being lucky.

Much more interesting: BBC’s More or Less had a story about multiple lottery wins and how they might come about.

Briefly

June 19, 2018

NRL Predictions for Round 16

Team Ratings for Round 16

The basic method is described on my Department home page.
Here are the team ratings prior to this week’s games, along with the ratings at the start of the season.

Current Rating Rating at Season Start Difference
Storm 9.51 16.73 -7.20
Dragons 4.78 -0.45 5.20
Rabbitohs 4.39 -3.90 8.30
Panthers 3.72 2.64 1.10
Roosters 3.46 0.13 3.30
Raiders 2.66 3.50 -0.80
Sharks 2.46 2.20 0.30
Broncos 0.58 4.78 -4.20
Cowboys -1.09 2.97 -4.10
Warriors -1.31 -6.97 5.70
Wests Tigers -3.46 -3.63 0.20
Bulldogs -4.20 -3.43 -0.80
Sea Eagles -4.87 -1.07 -3.80
Titans -5.21 -8.91 3.70
Eels -6.28 1.51 -7.80
Knights -7.45 -8.43 1.00

 

Performance So Far

So far there have been 116 matches played, 68 of which were correctly predicted, a success rate of 58.6%.
Here are the predictions for last week’s games.

Game Date Score Prediction Correct
1 Eels vs. Rabbitohs Jun 14 24 – 42 -6.00 TRUE
2 Cowboys vs. Warriors Jun 15 16 – 23 6.60 FALSE
3 Roosters vs. Panthers Jun 15 32 – 6 -1.10 FALSE
4 Bulldogs vs. Titans Jun 16 10 – 32 8.20 FALSE
5 Dragons vs. Sea Eagles Jun 16 32 – 8 10.80 TRUE
6 Sharks vs. Broncos Jun 16 16 – 20 6.30 FALSE
7 Knights vs. Storm Jun 17 10 – 28 -13.30 TRUE
8 Wests Tigers vs. Raiders Jun 17 12 – 48 2.20 FALSE

 

Predictions for Round 16

Here are the predictions for Round 16. The prediction is my estimated expected points difference with a positive margin being a win to the home team, and a negative margin a win to the away team.

Game Date Winner Prediction
1 Dragons vs. Eels Jun 28 Dragons 14.10
2 Warriors vs. Sharks Jun 29 Warriors 0.70
3 Roosters vs. Storm Jun 29 Storm -3.10
4 Panthers vs. Sea Eagles Jun 30 Panthers 11.60
5 Knights vs. Bulldogs Jun 30 Bulldogs -0.20
6 Broncos vs. Raiders Jun 30 Broncos 0.90
7 Wests Tigers vs. Titans Jul 01 Wests Tigers 4.70
8 Rabbitohs vs. Cowboys Jul 01 Rabbitohs 8.50

 

June 14, 2018

AA study causes drug headlines

Journalists are often reluctant to attribute causes for individual events — the journalistic use of ‘after’ and ‘amid’ leads readers to conclusions in a much more deniable way — but less reluctant for groups.

Today, there’s an interesting range of descriptions of some research

HeraldAutomobile Association study finds drugs cause more fatal crashes than alcohol

StuffDrug-impaired drivers now involved in more fatal crashes than drink-drivers

Radio NZDrugged driving fatalities outnumber drink driving deaths

NZ Autocar: AA FINDS MARKED INCREASE IN DRUG DRIVING FATALITIES

None of these link to the actual study report, and when I first looked, the report was on the AA website or on Scoop, but it the results table is in the NZ Autocar story. (Scoop has a press release from 10:49am; it’s still not on the AA website, where the most recent media release is dated 21 May)

None of the headlines is supported all that well by the data.

The data are based on what’s recorded in the ‘Crash Analysis System’, and is based on blood alcohol above the legal level and on presence of illegal drugs or prescription drugs that might have impaired the driver.  It’s not based on actual impairment (which is obviously hard to measure after the crash). The Crash Analysis System is set up to record anything that might be a contributing cause, because if some factor doesn’t make it into the database there’s no way to go back and check it later. Back in 2015 when the data were public and I looked at them, the system averaged about 2 1/4 causes per crash.

We pretty much know that most crashes where the driver is not far above the legal blood alcohol limit are not caused by alcohol — that’s the whole point of setting the threshold where it is.  For some illegal drugs — notably, cannabis — there isn’t a good test for impairment in regular users.

The AA says that other countries are using roadside testing. They are, and that’s partly because some countries regard the false positives  — catching someone who has used illegal drugs but isn’t impaired at the time — as a feature, not a bug.  The combination of alcohol and cannabis does seem to be a real problem, and US expert Mark Kleiman has suggested a blood alcohol threshold of zero for people who use cannabis.

But on top of that, as the NZ Autocar story says

While the numbers suggest drug driving has suddenly skyrocketed, the AA believes the big jump is likely down to more thorough testing being done following crashes.

That’s also in the press release. But it’s not in the other stories.

NRL Predictions for Round 15

Team Ratings for Round 15

The basic method is described on my Department home page.
Here are the team ratings prior to this week’s games, along with the ratings at the start of the season.

Current Rating Rating at Season Start Difference
Storm 9.18 16.73 -7.60
Panthers 5.61 2.64 3.00
Dragons 3.86 -0.45 4.30
Rabbitohs 3.55 -3.90 7.40
Sharks 3.18 2.20 1.00
Roosters 1.56 0.13 1.40
Raiders -0.02 3.50 -3.50
Broncos -0.14 4.78 -4.90
Cowboys -0.14 2.97 -3.10
Wests Tigers -0.79 -3.63 2.80
Bulldogs -2.08 -3.43 1.30
Warriors -2.27 -6.97 4.70
Sea Eagles -3.94 -1.07 -2.90
Eels -5.44 1.51 -7.00
Knights -7.12 -8.43 1.30
Titans -7.33 -8.91 1.60

 

Performance So Far

So far there have been 108 matches played, 65 of which were correctly predicted, a success rate of 60.2%.
Here are the predictions for last week’s games.

Game Date Score Prediction Correct
1 Raiders vs. Panthers Jun 08 22 – 23 -2.90 TRUE
2 Titans vs. Rabbitohs Jun 08 16 – 18 -8.80 TRUE
3 Sea Eagles vs. Warriors Jun 09 14 – 34 6.50 FALSE
4 Knights vs. Roosters Jun 09 16 – 18 -6.30 TRUE
5 Eels vs. Cowboys Jun 09 20 – 14 -3.70 FALSE
6 Sharks vs. Wests Tigers Jun 10 24 – 16 6.80 TRUE
7 Storm vs. Broncos Jun 10 32 – 16 11.70 TRUE
8 Bulldogs vs. Dragons Jun 11 16 – 18 -3.10 TRUE

 

Predictions for Round 15

Here are the predictions for Round 15. The prediction is my estimated expected points difference with a positive margin being a win to the home team, and a negative margin a win to the away team.

Game Date Winner Prediction
1 Eels vs. Rabbitohs Jun 14 Rabbitohs -6.00
2 Cowboys vs. Warriors Jun 15 Cowboys 6.60
3 Roosters vs. Panthers Jun 15 Panthers -1.10
4 Bulldogs vs. Titans Jun 16 Bulldogs 8.20
5 Dragons vs. Sea Eagles Jun 16 Dragons 10.80
6 Sharks vs. Broncos Jun 16 Sharks 6.30
7 Knights vs. Storm Jun 17 Storm -13.30
8 Wests Tigers vs. Raiders Jun 17 Wests Tigers 2.20

 

June 13, 2018

Briefly

June 11, 2018

Who gets counted?

Last week, Microsoft (who you’ve probably heard of) bought GitHub (who you may well not have heard of) with $7.5 billion in Microsoft stock.  Github is a site that cross-bred version-control software (‘track changes’ for programmers) with social media, providing a place to share and promote code.

Stuff and the Herald quoted the same number

More than 28 million developers around the world use GitHub, with Microsoft ranking as the most active organisation on GitHub.

You might wonder what proportion of developers use GitHub. If you search a bit on Google, you’ll find that the total number of developers is estimated at about 21 million, so roughly 130% of them use GitHub.

Obviously there’s something wrong there.  The problem is how to define ‘developers’.

In the US, the Bureau of Labor Statistics reports how many people do each job. They say, currently,  that there are 1,617,400 “Software Developers and Programmers”.  The figure of 28 million worldwide is actually based on a subset of those, the 1.2 million “Software Developers, Applications” and “Software Developers, Systems”.  This sort of official classification has to be narrow, because the goal is for  every job to end up in exactly one category.

Lots of people in the US who are developers in the GitHub sense aren’t developers in the Bureau of Labor Statistics sense. Some of them write software only in their spare time. Others write software as part of their jobs, but their jobs are classified somewhere else in the BLS system. The same is true in New Zealand. Stats NZ reports 31,860 jobs in ANZSIC06 category 7000 “Computer Systems Design and Related Services”, which is a bit broader than the US category.  Even though I’m a developer in the GitHub sense, I’m not one of them. I’m in 8102, “Higher Education”.

Other people who probably in the 21 million count include statisticians, data scientists, computational biologists, ornithologists, journalists, linguists, and many more.

Official statistics are usually pretty accurate, but they are only accurate for what they are trying to measure, which might not be what you are looking for.

June 7, 2018

Looking at the numbers

The new QS university rankings are out, and there’s a story in the Herald.  It starts

Staff cuts despite growing student numbers have dragged most New Zealand universities down in the latest world rankings.

The biggest six of the country’s eight universities have all tumbled in the London-based QS rankings, which are regarded as the most important for attracting international students.

“Tumbled” is an exaggeration — for example, the University of Auckland has ‘tumbled’ from 82nd to 85th in the rankings. But the message that it’s staff numbers does seem to be backed up with a quote from QS

“The increase in enrolments – and the decrease in faculty numbers – reported by the country’s universities sees all eight receive a lower score for faculty/student ratio,”

QS don’t make it easy to find older numbers, but an archive of their webpage in March last year said there were 29,930 students and 2025 academic staff, and a ranking of 81. The current figures are  29,641  students (ie, fewer) and 2,047 academic staff (ie, more), for an improvement in staff:student ratio from 14.8 to 14.5. 

That’s over a two year period, but last year, the story at Stuff said

New Zealand universities performed well in research outputs – Waikato ranked 133rd, Otago 174th and Canterbury 178th – but showed “uniformly deteriorating” faculty to student ratios. The exception was Lincoln University, which featured among the top 200 universities globally in that measure.

So, cumulatively over this two year period the staff:student ratio at UoA (as measured by QS) improved, but the reporting said it worsened in both years.

My guess as to what’s going on is that these rankings are rankings. What they mean by “lower score for faculty/student ratio” isn’t that the ratio got worse here, but that it got better here by less than it did at some competing universities.

The other strange thing in the Herald story is this:

The worsening staff/student ratio in NZ universities was entirely due to cuts of 203 academics at Massey and 74 at Lincoln.

It could be true that these are the only NZ universities with a worsening staff/student ratio — the other universities could be seeing the same sort of change that UoA did — but if it is, the apparent contradiction with the lead should have been noticed.

June 6, 2018

Super 15 Predictions for Round 17

Team Ratings for Round 17

The basic method is described on my Department home page.
Here are the team ratings prior to this week’s games, along with the ratings at the start of the season.

Current Rating Rating at Season Start Difference
Crusaders 15.52 15.23 0.30
Hurricanes 12.56 16.18 -3.60
Lions 8.48 13.81 -5.30
Highlanders 7.90 10.29 -2.40
Chiefs 7.64 9.29 -1.60
Waratahs 1.05 -3.92 5.00
Sharks 0.78 1.02 -0.20
Jaguares 0.62 -4.64 5.30
Stormers -0.58 1.48 -2.10
Bulls -2.90 -4.79 1.90
Blues -2.99 -0.24 -2.80
Brumbies -3.06 1.75 -4.80
Rebels -8.00 -14.96 7.00
Reds -9.21 -9.47 0.30
Sunwolves -15.24 -18.42 3.20

 

Performance So Far

So far there have been 99 matches played, 69 of which were correctly predicted, a success rate of 69.7%.
Here are the predictions for last week’s games.

Game Date Score Prediction Correct
1 Highlanders vs. Hurricanes Jun 01 30 – 14 -3.50 FALSE
2 Blues vs. Rebels Jun 02 10 – 20 11.60 FALSE
3 Chiefs vs. Crusaders Jun 02 20 – 34 -3.10 TRUE
4 Reds vs. Waratahs Jun 02 41 – 52 -6.20 TRUE
5 Brumbies vs. Sunwolves Jun 03 41 – 31 17.00 TRUE

 

Predictions for Round 17

Here are the predictions for Round 17. The prediction is my estimated expected points difference with a positive margin being a win to the home team, and a negative margin a win to the away team.

Game Date Winner Prediction
1 Blues vs. Reds Jun 29 Blues 10.20
2 Rebels vs. Waratahs Jun 29 Waratahs -5.60
3 Highlanders vs. Chiefs Jun 30 Highlanders 3.80
4 Brumbies vs. Hurricanes Jun 30 Hurricanes -11.60
5 Sunwolves vs. Bulls Jun 30 Bulls -8.30
6 Sharks vs. Lions Jun 30 Lions -4.20
7 Jaguares vs. Stormers Jun 30 Jaguares 5.20

 

Briefly

    • According to the Daily Mail “Brisk ten-minute walk, around 1,000 steps, can increase mortality by 15 per cent.”  They mean decrease.
    • Wikipedia thinks Amanda Cox, the data visualisation expert from the New York Times, isn’t “notable”. They are wrong and they should feel bad. But also, published evidence that she is notable would be useful.
    • The FDA has issued guidance on how to include pregnant women in clinical trials.
    • A monthly collection of the best data visualisation from around the web
    • Black cats are less popular