Posts from February 2013 (44)

February 23, 2013

Buy low, sell high?

From the Herald

Expectations of house price inflation continue to climb in ASB’s latest quarterly survey and are close to their all-time high 10 years ago.

The same seller’s market is reflected in a drop in the net balance of people who consider it a good time to buy a house

That doesn’t make sense to me.  If people expect house prices to keep rising, ie, that houses now are cheaper than in the future, they should want to buy.  Is the market confused, or is it the Herald (or, of course, me)?

When in doubt, randomise.

There has been (justified) wailing and gnashing of teeth over recent year-9 maths comparisons, and the Herald reports that a `back to basics’ system is being considered

Auckland educator Des Rainey, who did the research with teachers to test his home-made Kiwi Maths memorisation system, said the results came as a shock to the teachers and made him doubt his programme could work.

But after a year of practising multiplication and division on the Kiwi Maths grids for up to 10 minutes a day, the students more than doubled their speed.

This program looks promising, but why is anyone even talking about implementing a major nationwide intervention based on a small, uncontrolled before/after comparison measuring a surrogate outcome?

That is, unless you believe teachers and schoolchildren are much less individually variable than, say, pneumococci, you would want a randomised controlled comparison, and since presumably Des Rainey would agree that speed of basic arithmetic is important primarily because it’s a foundation for actual numeracy, you’d want to measure the success of the program based on numeracy tasks rather than on arithmetic speed. The results being reported are what the medical research community would call a non-randomised Phase IIa efficacy trial — an important stepping stone, but not a basis for policy.

Of course, that’s not how education works, is it?

February 22, 2013

Drug safety is hard

There are new reports, according to the Herald, that synthetic cannabinoids are ‘associated’ with suicidal tendencies in long-term users.  One difficulty in evaluating this sort of data is the huge peak in suicide rates in young men.  Almost anything you can think of that might be a bad idea is more commonly done by young men than by other people, so an apparent association isn’t all that surprising.  There is also the problem with direction of causation — the sorts of problems that make suicide a risk might also increase drug use — and difficulties even in getting a reasonable estimate of the denominator, the number of people using the drug. Serious, rare effects of a recreational drug are the hardest to be sure about, and the same is true of prescription medications.  It took big randomized trials to find out that Vioxx more than doubled your rate of heart attack , and a study of 1500 lung-cancer cases even to find the 20-fold increase in risk from smoking.

In this particular example there is additional supporting evidence. A few years back there was a lot of research into anti-cannabinoid drugs for weight loss (anti-munchies), and one of the things that sank these was an increase in suicidal thoughts in the patients in the early randomized trials.  It’s quite plausible that the same effect would happen as a dose of the cannabinoid wears off.

In general, though, this is the sort of effect that the proposed testing scheme for psychoactive drugs will have difficulty finding, or ruling out.

February 21, 2013

Super 15 Predictions, Round 2

Team Ratings for Round 2

This year the predictions have been slightly changed with the help of a student, Joshua Dale. The home ground advantage now is different when both teams are from the same country to when the teams are from different countries. The basic method is described on my Department home page.

Here are the team ratings prior to Round 2, along with the ratings at the start of the season.

Current Rating Rating at Season Start Difference
Crusaders 9.03 9.03 0.00
Chiefs 6.98 6.98 -0.00
Sharks 4.57 4.57 0.00
Hurricanes 4.40 4.40 0.00
Stormers 3.34 3.34 0.00
Bulls 2.55 2.55 0.00
Brumbies 0.30 -1.06 1.40
Reds -0.90 0.46 -1.40
Blues -3.02 -3.02 0.00
Highlanders -3.41 -3.41 -0.00
Waratahs -4.10 -4.10 0.00
Cheetahs -4.16 -4.16 -0.00
Kings -10.00 -10.00 0.00
Force -10.16 -9.73 -0.40
Rebels -10.21 -10.64 0.40

 

Performance So Far

So far there have been 2 matches played, 2 of which were correctly predicted, a success rate of 100%.

Here are the predictions for last week’s games.

Game Date Score Prediction Correct
1 Rebels vs. Force Feb 15 30 – 23 1.60 TRUE
2 Brumbies vs. Reds Feb 16 24 – 6 1.00 TRUE

 

Predictions for Round 2

Here are the predictions for Round 2. 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 Highlanders vs. Chiefs Feb 22 Chiefs -7.90
2 Rebels vs. Brumbies Feb 22 Brumbies -8.00
3 Bulls vs. Stormers Feb 22 Bulls 1.70
4 Hurricanes vs. Blues Feb 23 Hurricanes 9.90
5 Reds vs. Waratahs Feb 23 Reds 5.70
6 Cheetahs vs. Sharks Feb 23 Sharks -6.20
7 Kings vs. Force Feb 23 Kings 4.20

 

February 20, 2013

Is there a 3-strikes law for piecharts?

The Herald-Sun pie chart saga continues (thanks to @danfairbairn and @PeteHaitch on Twitter).   Can we get their piechart license suspended pending training and re-examination?

Can we revoke their piechart license?

 

This example further complicates the question of how they actually make these graphs.  In this one, the angle is at least approximately right, the percentages are right apart from being incorrectly rounded, but the graph is backwards.  We’ve also seen examples where the angles were completely wrong, but the two groups were correctly identified. It’s hard to see how an automated system could cause such a bewildering variety of problems, but it’s also hard to see how a real person could be so totally clueless about pie charts.

 

 

We can haz margin of error?

Generally good use of survey data in a story from Stuff about the embattled Education Minister.  They even quote a competing poll, which agrees very well with their overall statistic.

The omission, though, relates to the headline figure: “71pc want Parata gone – survey”.  That’s a proportion “among voters from Canterbury”.   Assuming that they don’t mean “voters” in any electorally-relevant sense, just respondents, we would expect about 120 of the 1000 respondents to be from Canterbury. The maximum margin of error is a little under 10%.

The fact that one region has 71% wanting Ms Parata gone when the overall national average is 60% would actually not be all that notable on its own. Since we already expect her to be less popular in ChCh, the difference is worth writing about, but if it’s worth a headline, it’s worth a margin of error.

February 19, 2013

Terminology

Most of the Stats department is currently moving from the leafy park-like north end of campus back to the glass and concrete Tower of Science. While we’re in transit, here’s a bogus poll on statistical terminology.

Distributions can be classified as to whether they produce more outliers or fewer outliers than a normal distribution. The terms are “platykurtic” (same Greek root as platypus, meaning “flat”) and “leptokurtic” (Greek root meaning “thin”)

Update: answer, and potentially discussion, in the comments

International cooperation

Ben Goldacre mentions the current UK discussion over whether Members of Parliament go to prison at a higher rate than people in general.  He points out that age, gender, and social class distributions are different for MPs, and suggests someone does an adjustment.

Here’s a preliminary attempt. Firstly, note that the data (and the claims) have been about prevalence rather than incidence — MPs as a fraction of the UK prison population, not as a fraction of sentences.  I got prison population data from a Parliament briefing paper, and MPs in prison data from Channel 4’s Factcheck

  • I don’t have detailed age data for MPs, though it could certainly be determined, but at least we can restrict from the whole British population to adults (51 million)
  • The UK adult population is very close to 50:50 on gender, 502/648 MPs are male, 63318 out of 66818 (adult) prisoners

So, 0.79% of male MPs were in prison, compared to 0.24% of adult males in the UK. No female MPs, compared to 0.01% for the female population. Gender-standardised, that’s a relative rate of 3.0

The other important variable is social class.  The briefing paper on the prison population says that `almost three-quarters’ of prisoners were on benefits immediately before entry, and Factcheck says 5.5 million people in Britain are on benefits (and presumably MPs aren’t). I don’t have data on how this varies by gender, either for prisoners or for the population, so I’ll do it separately from the gender standardisation

We have 0.61% of MPs (not on benefits) in prison, and one-quarter of 68818 prisoners out of (51 million – 5.5 million) people not on benefits in prison, which comes to 0.037%, for a relative rate of 16.

So, among adults not on benefits, (people who would otherwise be) MPs are 16 times more likely to be in prison.

User fees and road costs

Last month, there was an interesting report from a US group called The Tax Foundation  on the fraction of US state and local road costs contributed by registration fees, tolls, petrol taxes, and other charges for road users.  It turned out to average about 1/3 — that’s just actual monetary costs, not the costs that drivers impose on others through congestion or carbon emissions.

In New Zealand, the fraction for local roads seems to be higher — if you look at the Funding Assistance Rates that say how much the NZ Transport Agency pays toward council road maintenance, operation, and renewal, it varies around roughly 50% (for Wellington, it happens to be 44%). According to NZTA, the rest of the money comes through mechanisms that don’t specifically target drivers, such as council rates.

So, why did I single out the 44% for Wellington? Well, that’s where anyone not at the wheel of a car is apparently a `guest’ on the roads. Or, with unsettling plausibility, `roadkill’.

February 18, 2013

Colour schemes

Two more colour-scheme producers

  • I Want Hue: takes random colours from a user-specified range and uses Science k-means clustering to make them more distinct. Has nice demonstrations on colour theory. 
  • Colorscheme Designer: standard colour-space patterns, user-adjustable. Can show the impact of all the important types of impaired colour vision.

From Twitter #rstats