Jul 20 2016

Book review: The Seven Pillars of Statistical Wisdom by Stephen M. Stigler

sevenpillarsThe Seven Pillars of Statistical Wisdom by Stephen M. Stigler is a brief history of what the author describes as the key pillars of statistics. This is his own selection rather than some consensus of statistical opinion. That said, to my relatively untrained eye the quoted pillars are reasonable. They are as follows:

1 – Aggregation. The use of the arithmetic average or mean is not self-evidently a good thing. It was during the 17th century, when people were taking magnetic measurements in order to navigate, that ideas around the mean started to take hold. Before this time it was not obvious which value one should take when discussing a set of measurement purportedly measuring the same thing. One might take the mid-point of the range of values, or apply some subjective process based on your personal knowledge of the measurer. During the 17th century researchers came to the conclusion that the arithmetic mean was best.

2 – Information. Once you’ve discovered the mean, how good is it as a measure of the underlying phenomena as you increase the size of the aggregation? It seems obvious that the measure improves as the number of trials increases but how quickly? The non-trivial answer to this question is that it scales as the square root of N, the number of measurements. Sadly this means if you double the number of measurements you make, you only improve you confidence in the mean by a factor of a little over 1.4 (that being the square root of 2) . Mixed in here are ideas about the standard deviation, a now routine formulation quoted with the mean. It was originally introduced by De Moivre in 1738, for the binomial distribution, but then generalised by Laplace in 1810 as the Central Limit Theorem.

3 – Likelihood. This relates to estimating confidence that an observed difference is real, and not due to chance. The earliest work, by John Arbuthnot, related to observed sex ratios in births recorded in England and whether they could be observed by chance rather than through a “real” difference in the number of boys and girls born.

4 – Intercomparison. Frequently we wish to compare sets of measurements to see if one thing is significantly different from another. The Student t-test is an example of such a thing. Named for William Gosset, who took a sabbatical from his job at Guiness to work in Karl Pearson’s lab at UCL. As an employee Guiness did not want Gosset’s name to appear on a scientific paper (thus revealing their interest), so he wrote under the rather unimaginative pseudonym "Student".

5 – Regression. The chapter starts with Charles Darwin, and his disregard for higher mathematics. He professed a faith in measurement and “The Rule of Three”. This is the algebraic identity a/b = c/d which states that if you know any 3 of a, b, c and d you can calculate the 4th. This is true in a perfect world, but in practice we would acquire multiple sets of our three selected values and use regression to obtain a “best fit” for the fourth value. Also in this chapter is Galton’s work on regression to the mean in particularly how parents with extreme heights had children who were on average closer to the mean height. This is highly relevant to the study of evolution and the inheritance of characteristics.

6 – Design. The penultimate pillar is design. In the statistical sense this means the design of an experiment in terms of the numbers of trials, and the organisation of the trials. This starts with a discussion of calculating odds for the French lottery (founded in 1757) and providing up to 4% of the French budget in 1811. It then moves on to RA Fisher’s work at the Rothamsted Research Centre on randomisation in agricultural trials. My experience of experimental design, is that statisticians always want you to do more trials than you can afford, or have time for! 

7 – Residual. Plotting the residual left when you have made your best model and taken it from your data is a time honoured technique. Systematic patterns in the residuals can indicate your modern is wrong, that there are new as yet undiscovered phenomena to be discovered. I was impressed to discover in this chapter that Frank Weldon cast 12 dice some  315,672 times to try to determine if they were biased. Data collection can be an obsessive activity. This story from the early 20th century is not in common.

Seven Pillars is oddly pitched, it is rather technical for a general science audience. It is an entertainment, rather than a technical text. The individual chapters would have fitted quite neatly into The Values of Precision, which I have reviewed previously.

Jul 16 2016

A question for Theresa May

Why have you appointed a man as foreign secretary who has:

For ordinary working people a track record like this would send their CV to the bottom of the pile. Apparently things are different for a senior member of the Tory Party.

Jul 10 2016


Benllech is on the north coast of Anglesey, about an hour and a half drive from our home in Chester. This is a bit embarrassing because it means our holiday home has tourists leaflets for excursions to our actual home!

We’re staying at Tinker’s Patch, a seventies bungalow in an estate just 5 minutes walk from Benllech Sands. It’s a very short drive from the main road with straightforward parking. We can see the sea from the living room window. Benllech is nondescript but has a good selection of mini-supermarkets and a rather good chip shop with a spectacular view over the bay. The Sands are great, at high water they just about disappear and at low tide a great expanse of sand is exposed. There are a smattering a rocky bits and at the top of the beach some nicely stratified limestone cliffs. We made a daily trip to the beach, every afternoon. As usual our intuition about when high and low tides occur turns out to be completely wrong, important at Benllech since at high tide the sea comes up to the sea wall and at low tide there is several hundred metres of beach.


Day 1 – Saturday

Our first full day of holiday and we visit Anglesey Sea Zoo which overlooks the Menai Straits. It’s not huge but it has plenty to entertain a small child and the cakes in the coffee shop turn out to be pretty much the best of the week.

The mainland across the Menai Straits, south from the Sea Zoo

Day 2 – Sunday

Beaumaris is a rather fine village, with the castle on one edge. It is an odd sort of a thing, it was never finished and has an air of never having been lived in but there are a fair number of walls to walk along and activities for children.

Beaumaris Castle

In town, the Redboat Gelato icecream parlour is rather fine, we had a nice coffee whilst Thomas had a huge icecream. They offer exotic fare such as cinnamon and white pepper and pear and gorgonzola icecreams. We plan to go back one afternoon because Mrs SomeBeans and I did not consider icecream a morning food. The village has a smart nautical feel with the fine Victoria Terrace looking out over the Menai Straits (designed by Joseph Hansom, of cab fame).

Victoria Terrace, Beaumaris

Day 3 – Monday

We saw Plas Newydd as we arrived from the mainland, looking over the Menai Straits. There are forested grounds with a long frontage on the Straits and a house to explore. The house is the summer home of an old family.


Day 4 – Tuesday

A trip to Copper Mountain and Amlwch, a little north of us on the island. Copper Mountain is a brightly coloured lunar landscape which was once home to much mining activity (and has been for thousands of years). I have never seen such brightly coloured rocks before (and I’ve been to Utah). At the top of the mountain is the shell of a windmill which was used in conjunction with a steam engine towards the end of the mine’s life.

Copper Mountain, Amlwch

Amlwch is just down the road from the Copper Mountain. We saw three museums in the space of 100 yards. The Sail Loft at the harbourside is a cafe downstairs and has a maritime museum upstairs. On the quay is a tiny geological museum. It turns out Anglesey has rocks from pretty much every geological period mashed together. Finally, there is the Copper Mountain Heritage Centre.


Day 5 – Wednesday

To Caernarfon to see the castle today. It’s the most impressive castle I’ve visited, very big with its structure largely intact. There’s a warren of passageways to follow and stairs to climb.

Caernarfon Castle

We didn’t manage to do all of it even in two sessions, broken by a coffee and cake on the Castle Square.


Day 6 – Thursday

Anglesey Sea Zoo again, it’s rainy and the cloud is low. The ticket from our visit on Saturday gets us in for free. In the afternoon the sun breaks through and we have a last trip to the beach with obligatory icecream.

Mrs SomeBeans recreated the cuttlefish in playdoh:


Jul 07 2016

Book review: SPQR–A History of Ancient Rome by Mary Beard

A little diversion for me next: straightforward classical history. I’ve read spqrSPQR: A History of Ancient Rome by Mary Beard. SPQR Senātus Populusque Rōmānus  is the motto of the city, meaning “The Senate and People of Rome”, it has been used since antiquity and is still in use now.

The book starts with the story of Cicero and Catiline in 63 BCE, Cicero revealed Catiline’s plot to overthrow the Roman government. It is presented as the first events where there was significant documentary evidence from multiple sources. Proper history, if you like. Even then what survives should not necessarily be read as gospel truth. Rome prior to this was seen in fragments.

Beard returns to this theme of what the evidence is and how much we can trust it throughout the book. As I read through I discover that the earliest copies of Roman writings date from about 500 AD, anything written before then has been transcribed perhaps several times. Some of this writing sounds like it is in the form of what we would understand as contemporary books but other parts are the selected, edited letters of important people. In neither case are they published and promoted in the way we see modern publishing. In terms of contemporary texts, the inscriptions on tombs and monuments provide a second source of material. In earlier years these inscriptions were limited to the most important but in the first century CE there was a huge expansion of tomb inscriptions from what appear to be relatively ordinary people. There is some writing preserved in wall paintings and less formal graffiti in rare places, like Pompeii. There is some material from the Vindolanda tablets, found at Hadrian’s Wall. We also learn of the books that are lost from references and quotes in other extant works.

The book then returns to cover the history of Rome in chronological order. Starting with the founding myth of Romulus and Remus, purportedly raised by wolves. Subsequently Romulus killed Remus over an argument about where to found the city which was to become Rome. The founding story of Romulus and Remus and fratricide can be seen as a retrospective “justification” for the almost continuous civil war within the Roman Empire. Archaeological evidence shows settlements on the site of modern Rome from around 800BCE. A second theme of the myths of early Rome is the way in which the city grew by assimilating neighbours, you didn’t need to be born in the city to be a Roman, you didn’t even need to live there. The city welcomed incomers.

Rome ran through a sequence of political structures, starting with the Regal Period (of kings) which was replaced with the Roman Republic, where two elected consuls ruled, in 509 BCE. During this period trying to re-introduce a monarchy or calling yourself “king” was seen as anathema. The consuls were finally replaced with Emperors in 44 BCE after the Roman Empire had reached almost its greatest extent. It was experimenting with ways of being a state, in the sense that the prevailing organisations at the time were on a city basis rather than a country. We take the nation-state and its political and bureaucratic structures pretty much for granted these days, for example, we have courts and police forces and so forth. In the years of the Roman Empire these structures were not well-established, and much of SPQR describes Romans feeling their way in establishing political structures.

It’s easy to project the modern world onto the Roman Empire but really it is very different. 20% of the population were slaves, newborn children were fairly casually abandoned. There was no effective system of justice in terms of an established police force or a court system designed to address simple crimes of property or violence against the ordinary person. The great majority of the written record of Rome refers to “Great Men” but Beard writes a couple of chapters on what can be inferred about women and the poor. Strikingly the poor were more likely to "eat out" than the wealthy – they couldn’t afford kitchens of their own.

I pleased to learn that the Emperor Caligula was named for his “Bootikins”, he was taken on military campaigns as a child and dressed in a soldiers uniform with “little soldier’s boots” – caligula. And a Roman writing from Britain writes of the Brittunculi – the Little Britons. Rather relevant to current affairs is the tombstone of a British woman, Regina, born north of London whose husband, Barates from Palmyra in Syria, commissioned the monument, placed near South Shields in the first century CE.

The book ends in 212 CE when the Emperor Caracalla grants everyone in the Roman Empire citizenship. This falls approximately a 1000 years after the founding of Rome, the Roman Empire in the East was to last another millennium but Beard leaves this story to another writer.

At first sight this is an intimidating tome but it reads well, and clearly. It revealed sufficient of the underlying methodology of classical scholars to pique my interest.

Jun 19 2016

The EU Referendum

The 2016 EU referendum is likely to be the most significant event in my adult lifetime, so it seems like a good idea to write something to remind me of how it all happened. I don’t expect many people to read this and I don’t expect anyone to change their mind as to whether we should Remain in the EU or Leave.

Really the EU referendum is all about the internal politics of the Tory party. Since the early 1990s there has been a fanatical eurosceptic rump, they took their party into the wilderness once and they’ve lined themselves up to do it all over again.

To cut to the chase, I’ve always been Remain.

My reasons for Remain are three fold:

Perhaps the most significant is economic, I’ve worked in a large company (Unilever), a small company (ScraperWiki) and I’m now at a medium sized company (GB Group). The first two of these are explicitly Remain. The third has expressed no corporate opinion but internally most of my co-workers appear to support Remain. The reason for this is that the EU is primarily a free trade area. This means that for all three companies we can make products and services which can be sold easily across the EU because they need only comply with one set of standard rules and they cannot face penalties with respect to local suppliers. Furthermore, in the EU we can bring in talent from where-ever it is needed – all three of these companies employed people from across the EU. Employing people within the EU is easy, from outside the EU it is a frustrating nightmare. And that’s not to mention my experiences as an academic where a large fraction of my colleagues and students have been from the EU and beyond.

More directly ScraperWiki benefitted enormously from EU research support from the Horizon 2020 programme, which simply wasn’t forthcoming from UK sources which seem to go to London and an “in crowd” first.

We are being asked to give this up for some fantasy trade deals and the cutting of “red-tape” which would appear to be mostly our employment rights.

The second theme is immigration and free movement. I’ve become used to wafting through Europe since the seventies with scarcely a glance at my passport on internal borders. It’s great. I know the pain of travelling for travellers from outside the EU, from China and from the former Yugoslavia, for whom every foreign trip was an uncertain and inconvenient with trips to London for visas. I don’t want my son growing up with that.

Immigration (and its bedfellow, xenophobia) has been the dirty secret of the Leave campaign. In times of economic stress it’ is easy to point to the foreigner and blame them for your troubles. But it’s a lie. Immigrants are the people who got on their bikes and looked for work, they’re predominately young. If these people are causing stress in the services in our country then it is our services that are the problem. If I build a factory, and a thousand UK workers turn up to work there then whose fault is it if the local schools and hospitals struggle with capacity? Nigel Farage’s latest Leave poster echoes directly the Nazi propaganda of the 1930s in citing a country at breaking point overwhelmed by the feckless foreigner. The UK is a strong, wealthy country which has benefitted from the gift of immigration for centuries.

And more personally, for me, when you abuse immigrants for your political ends you are abusing my friends and colleagues stretching back over a lifetime. Rashmi, Anja, Yann, Eugene, Ruedigger, Cecilia, Wen, Lian, Jyl, …

Finally there is democracy and influence. The most entertaining contributions to the debate for me have been members of the (unelected) House of Lords, complaining about the democratic legitimacy of the EU. In the UK we have an electoral system at local and parliamentary levels which is deeply deficit in representing the wishes of the people. We have a House of Lords which when it isn’t appointed is hereditary and a hereditary head of state. The EU, on the other hand, has a parliament of directly elected MEPs (I believe universally using proportional representation), a council of ministers appointed by the elected governments of the EU and a president appointed by those elected governments. Nobody is there by birthright, nobody is there because of their payments to party coffers.

In the EU we can speak for ourselves on the UN security council and other forums but we can also influence the voice of a bloc of 500 million people. And we have a strong voice in the EU when we chose to use it.

So that’s why I’m going to vote Remain.

The campaign has been pretty unedifying. The Leave campaign knows it can get away with essentially lying through its teeth. The “£350 million per week” going to Brussels is a case in point, this has been frequently debunked – the true figure is closer to £129million. But that isn’t really the point. Both of these figures amount to approximately 1% of the government so they’re pretty much insignificant. The important thing is their lie of a “big number” will likely be the only thing 75% of the voters will remember. They know this, and it is why they have never deviated from repeating the lie. The money the Leave camp has “saved” has been spent on spent again on subjects dear to our hearts such as the NHS, for which the Leave campaigners have little track record of support. There will be no comeback for them. The ASA washes it’s hands of accuracy in political advertising.

I have to say if I were a rational Leaver, I’d be looking around myself wondering how the hell I’d fallen in with my fellow Leave supports. It comes to something when Boris Johnson and Michael Gove are your most palatable fellow travellers. A crowd which includes Britain First (the neo-Nazi group), Donald Trump, Marine Le Pen (French National Front), probably Vladimir Putin (but the Russians are a bit too smart to come out) and Nigel Farage.

On the Remain side its difficult to find a foreign government which doesn’t support us remaining in the EU, its difficult to find an organisation that does not support Remain.

I think Leave will win on Thursday but it is by no means certain. As a Liberal Democrat and pragmatic supporter of AV I’m used to crushing electoral disappointment. A vote to Leave in my mind would be a defeat far more visceral than these, it will deeply effect the remainder of my working life, retirement and the life of my young son.

Erratum: I actually meant to write that I thought Remain would win! See how easy it is for a slip of the pen to mess these things up…

Older posts «