August 17, 2015

More diversity pie-charts

These ones are from the Seattle Times, since that’s where I was last week.

IMAG0103

Amazon.com, like many other tech companies, had been persuaded to release figures on gender and ethnicity for its employees. On the original figures, Amazon looked  different from the other companies, but Amazon is unusual in being a shipping-things-around company as well as a tech company. Recently, they released separate figures for the ‘labourers and helpers’ vs the technical and managerial staff.  The pie chart shows how the breakdown makes a difference.

In contrast to Kirsty Johnson’s pie charts last week, where subtlety would have been wasted  given the data and the point she was making, here I think it’s more useful to have the context of the other companies and something that’s better numerically than a pie chart.

This is what the original figures looked like:

amazon-1

Here’s the same thing with the breakdown of Amazon employees into two groups:

amazon-2

When you compare the tech-company half of Amazon to other large tech companies, it blends in smoothly.

As a final point, “diversity” is really the wrong word here. The racial/ethnic diversity of the tech companies is pretty close to that of the US labour force, if you measure in any of the standard ways used in ecology or data mining, such as entropy or Simpson’s index.   The issue isn’t diversity but equal opportunity; the campaigners, led by Jesse Jackson, are clear on this point, but the tech companies and often the media prefer to talk about diversity.

 

Stat of the Week Competition: August 15 – 21 2015

Each week, we would like to invite readers of Stats Chat to submit nominations for our Stat of the Week competition and be in with the chance to win an iTunes voucher.

Here’s how it works:

  • Anyone may add a comment on this post to nominate their Stat of the Week candidate before midday Friday August 21 2015.
  • Statistics can be bad, exemplary or fascinating.
  • The statistic must be in the NZ media during the period of August 15 – 21 2015 inclusive.
  • Quote the statistic, when and where it was published and tell us why it should be our Stat of the Week.

Next Monday at midday we’ll announce the winner of this week’s Stat of the Week competition, and start a new one.

(more…)

August 14, 2015

Briefly

  • “As the polar ice caps melt and the earth churns through the Sixth Extinction, another unprecedented phenomenon is taking place, in the realm of sex,” says Vanity Fair. “Yeah, nah” says New York magazine. If you only talk to top Tindr users, (especially in New York) you’re going to get strange ideas about sex.
  • “How Statistics guided me through life, death, and ‘The Price is Right'” by Elisa Long, in Washington Post. Dr Long writes about her breast cancer and her appearance on the famous US game show.
  • At Vox EU, an analysis of the environmental benefits or otherwise of electric cars. The cars don’t emit any pollution as they run, but the power has to come from somewhere. In about half of the US, enough of the electricity comes from coal to make electric cars worse than efficient petrol or diesel cars. In NZ my impression is that a predictable night-time load would largely come from hydro, so electric cars would be green. In Australia, probably not.
    holland fig1 7 aug
  • You probably saw the Herald story on speeding by NZTA staff. A nice example of using data (obtained under the Official Information Act) to show the extent of an issue

Sometimes a pie chart is enough

From Kirsty Johnson, in the Herald, ethnicity in the highest and lowest decile schools in Auckland.

CMUU_JjUYAAsWbG

Statisticians don’t like pie charts because they are inefficient; they communicate numerical information less effectively than other forms, and don’t show subtle differences well.  Sometimes the differences are sufficiently unsubtle that a pie chart works.

It’s still usually not ideal to show just the two extreme ends of a spectrum, just as it’s usually a bad idea to show just two points in a time series. Here’s the full spectrum, with data from EducationCounts

ethdec

 

[The Herald has shown the detailed school ethnicity data before in other contexts, eg the decile drift story and graphics from Nicholas Jones and Harkanwal Singh last year]

I’ve used counts rather than percentages to emphasise the variation in student numbers between deciles. The pattern of Māori and Pacific representation is clearly different in this graph: the numbers of Pacific students fall off dramatically as you move up the ranking, but the numbers of Māori students stabilise. There are almost half as many Māori students in decile 10 as in decile 1, but only a tenth as many Pacific students.

If you’re interested in school diversity, the percentages are the right format, but if you’re interested in social stratification, you probably want to know how students of different ethnicities are distributed across deciles, so the absolute numbers are relevant.

 

August 12, 2015

ITM Cup Predictions for Round 1

Team Ratings for Round 1

Here are the team ratings prior to Round 1, along with the ratings at the start of the season. I have created a brief description of the method I use for predicting rugby games. Go to my Department home page to see this.

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
Tasman 12.86 12.86 0.00
Canterbury 10.90 10.90 0.00
Counties Manukau 7.86 7.86 0.00
Taranaki 7.70 7.70 0.00
Auckland 5.14 5.14 0.00
Hawke’s Bay -0.57 -0.57 0.00
Manawatu -1.52 -1.52 0.00
Northland -3.64 -3.64 0.00
Wellington -4.62 -4.62 0.00
Otago -4.84 -4.84 0.00
Southland -6.01 -6.01 0.00
Waikato -6.96 -6.96 0.00
Bay of Plenty -9.77 -9.77 0.00
North Harbour -10.54 -10.54 0.00

 

Predictions for Round 1

Here are the predictions for Round 1. 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 Southland vs. Auckland Aug 13 Auckland -7.20
2 Waikato vs. Tasman Aug 14 Tasman -15.80
3 Bay of Plenty vs. North Harbour Aug 14 Bay of Plenty 4.80
4 Taranaki vs. Wellington Aug 15 Taranaki 16.30
5 Otago vs. Canterbury Aug 15 Canterbury -11.70
6 Counties Manukau vs. Manawatu Aug 16 Counties Manukau 13.40
7 Hawke’s Bay vs. Northland Aug 16 Hawke’s Bay 7.10

 

Currie Cup Predictions for Round 2

Team Ratings for Round 2

The basic method is described on my Department home page. I have made some changes to the methodology this year, including shrinking the ratings between seasons.

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
Western Province 5.31 4.93 0.40
Lions 3.65 3.04 0.60
Sharks 3.04 3.43 -0.40
Blue Bulls 0.96 0.17 0.80
Cheetahs -2.54 -1.75 -0.80
Pumas -6.08 -6.47 0.40
Griquas -8.18 -7.81 -0.40
Kings -10.05 -9.44 -0.60

 

Performance So Far

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

Here are the predictions for last week’s games.

Game Date Score Prediction Correct
1 Griquas vs. Western Province Aug 07 19 – 43 -9.20 TRUE
2 Pumas vs. Sharks Aug 07 33 – 24 -6.40 FALSE
3 Kings vs. Lions Aug 08 14 – 51 -9.00 TRUE
4 Cheetahs vs. Blue Bulls Aug 08 19 – 57 1.60 FALSE

 

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 Lions vs. Pumas Aug 14 Lions 13.20
2 Blue Bulls vs. Griquas Aug 14 Blue Bulls 12.60
3 Western Province vs. Cheetahs Aug 15 Western Province 11.30
4 Sharks vs. Kings Aug 15 Sharks 16.60

 

NRL Predictions for Round 23

Team Ratings for Round 23

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
Roosters 10.79 9.09 1.70
Cowboys 6.60 9.52 -2.90
Broncos 6.14 4.03 2.10
Rabbitohs 4.40 13.06 -8.70
Sea Eagles 4.25 2.68 1.60
Storm 3.62 4.36 -0.70
Bulldogs 2.08 0.21 1.90
Dragons 1.86 -1.74 3.60
Sharks 0.01 -10.76 10.80
Raiders -1.62 -7.09 5.50
Warriors -3.56 3.07 -6.60
Panthers -3.58 3.69 -7.30
Wests Tigers -6.05 -13.13 7.10
Eels -6.13 -7.19 1.10
Knights -7.45 -0.28 -7.20
Titans -10.02 -8.20 -1.80

 

Performance So Far

So far there have been 160 matches played, 91 of which were correctly predicted, a success rate of 56.9%.

Here are the predictions for last week’s games.

Game Date Score Prediction Correct
1 Broncos vs. Bulldogs Aug 07 16 – 18 8.60 FALSE
2 Sea Eagles vs. Rabbitohs Aug 07 28 – 8 0.10 TRUE
3 Warriors vs. Dragons Aug 08 0 – 36 3.90 FALSE
4 Sharks vs. Cowboys Aug 08 30 – 18 -6.10 FALSE
5 Eels vs. Panthers Aug 08 10 – 4 -0.50 FALSE
6 Storm vs. Titans Aug 09 36 – 14 15.70 TRUE
7 Knights vs. Roosters Aug 09 22 – 38 -15.10 TRUE
8 Raiders vs. Wests Tigers Aug 10 18 – 20 9.00 FALSE

 

Predictions for Round 23

Here are the predictions for Round 23. 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 Cowboys vs. Rabbitohs Aug 13 Cowboys 5.20
2 Broncos vs. Dragons Aug 14 Broncos 7.30
3 Wests Tigers vs. Knights Aug 15 Wests Tigers 4.40
4 Panthers vs. Warriors Aug 15 Panthers 4.00
5 Roosters vs. Eels Aug 15 Roosters 19.90
6 Raiders vs. Sea Eagles Aug 16 Sea Eagles -2.90
7 Bulldogs vs. Titans Aug 16 Bulldogs 15.10
8 Sharks vs. Storm Aug 17 Storm -0.60

 

August 10, 2015

Stat of the Week Competition: August 8 – 14 2015

Each week, we would like to invite readers of Stats Chat to submit nominations for our Stat of the Week competition and be in with the chance to win an iTunes voucher.

Here’s how it works:

  • Anyone may add a comment on this post to nominate their Stat of the Week candidate before midday Friday August 14 2015.
  • Statistics can be bad, exemplary or fascinating.
  • The statistic must be in the NZ media during the period of August 8 – 14 2015 inclusive.
  • Quote the statistic, when and where it was published and tell us why it should be our Stat of the Week.

Next Monday at midday we’ll announce the winner of this week’s Stat of the Week competition, and start a new one.

(more…)

August 8, 2015

Sampling error and measurement error

There’s this guy in the US called Donald Trump. You might have heard of him. He currently has a huge lead in the opinion polls over the other candidates for the Republican nomination.

Trump’s lead isn’t sampling error. He has an eleven percentage point lead in the poll averages, with sampling error well under one percentage point. That’s better than the National Party has ever managed. It’s better than the Higgs Boson has ever managed.

Even so, no serious commentator thinks Trump will be the Republican candidate. It’s not out of the question that he’d run as an independent — that’s a question of individual psychology, and much harder to answer — but he isn’t going to win the Republican primaries.

At the moment, Trump is doing well because people know who he is and because they aren’t actually making decisions. The question is something like:

If the Republican primary for President were being held today, and the candidates were Jeb Bush, Ben Carson, Chris Christie, Ted Cruz, Carly Fiorina, Jim Gilmore, Lindsey Graham, Mike Huckabee, Bobby Jindal, John Kasich, George Pataki, Rand Paul, Rick Perry, Marco Rubio, Rick Santorum, Donald Trump, and Scott Walker, for whom would you vote?

or

I know the 2016 election is far away, but who would you support for the Republican nomination for president if the candidates were…

 

We know from history that the answer to this sort of question at this time in the campaign doesn’t correspond to anything about the election.

There’s a temptation to believe that something you can measure very precisely must exist. There are always two other explanations to consider: your measurement process might always give precise results regardless of any reality, or you might be measuring something real but different from what you’re trying to measure.

August 6, 2015

Feel the burn

Q: What did you have for lunch?

A: Sichuan-style dry-fried green beans

Q: Because of the health benefits of spicy food?

A: Uh.. no?

Q: “Those who eat spicy foods every day have a 14 per cent lower risk of death than those who eat it less than once a week.” Didn’t you see the story?

A: I think I skipped over it.

Q: So, if my foods is spicy I have a one in seven chance of immortality?

A: No

Q: But 14% lower something? Premature death, like the Herald story says?

A: The open-access research paper says a 14% lower rate of death.

Q: Is that just as good?

A: According to David Spiegelhalter’s approximate conversion formula, that would mean about 1.5 years extra life on average, if it kept being true for your whole life.

Q: Ok. That’s still pretty good, isn’t it?

A: If it’s real.

Q: They had half a million people. It must be pretty reliable, surely?

A: The problem isn’t uncertainty so much as bias: people who eat spicy food might be slightly different in other ways.Having more people doesn’t help much with bias. Maybe there are differences in weight, or physical activity.

Q: Are there? Didn’t they look?

A: Um. Hold on. <reads> Yes, they looked, and no there aren’t. But there could be differences in lots of other things. They didn’t analyse diet in that much detail, and it wouldn’t be hard to get a bias of 14%.

Q: Is there a reason spicy food might really reduce the rate of death?

A: The Herald story says that capsaicin fights obesity, and the Stuff story says bland food makes you overeat

Q: Didn’t you just say that there weren’t weight differences?

A: Yes.

Q: But it could work some other way?

A: It could. Who can tell?

Q: Ok, apart from your correlation and causation hangups, is there any reason I shouldn’t at least use this to feel good about chilis?

A: Well, there’s the fact that the correlation went away in people who regularly drank any alcohol.

Q: Oh. Really?

A: Really. Figure 2 in the paper.

Q: But that’s just correlation, not causation, isn’t it?

A: Now you’re getting the idea.