Archive for the ‘Politics’ Category

Was the EU Referendum Random?

Monday, September 5th, 2016

One of the claims that I saw on social media in the aftermath of the recent EU referendum here in the UK was that the result (52% to 48%) was so close that it was little different from tossing a coin.

Without getting bogged down in the politics of that referendum, or the various campaigns that led up to it; I want to consider whether this claim holds any water. How similar to millions people each tossing a coin and voting accordingly was the result?

According to the BBC, there were 17,410,742 votes to leave and 16,141,241 votes to remain, giving a total of 33,551,983 votes. If we were to make each of these people toss a coin and count up the results, the ratio of heads/tails or remains/leaves could be anywhere between all heads and all tails. However, we would expect the counts to be about equal if the coins were all fair. Of course, any ratio is possible, but if we were to run the coin tossing game repeatedly, we would expect to mean ratio to converge on 1:1. How likely would a 52:48 ratio be?

The leave side got a share of the vote equal to 0.51891842. Therefore, their absolute deviation from the expectation (the mean, or 0.5) is 0.01891842. The difference between the two counts is 1,269,501. Would we expect to see a deviation of this magnitude in a coin tossing competition?

Being a computer programmer rather than a mathematician, I’m going to look at this using a simple program.

WriteLine("heads, tails, flips, heads share");
var runs = 1000;
// Taken from
var flips = 33551983;
var randomNumberGenerator = new Random();
for (var run = 0; run < runs; run++)
    var heads = 0;
    for (var coinToss = 0; coinToss < flips; coinToss++)
        var toss = randomNumberGenerator.Next(2);
        if (toss > 0)
    WriteLine($"{heads}, {flips - heads}, {flips}, {(0.0 + heads) / flips}");

This program simulates 1,000 coin tossing competitions with 33,551,983 players and writes the counts as comma separated values.

Putting the output into Excel, the largest deviation was 0.000275081 (or a difference between counts of 18,459) and the smallest was 1.49022E-08 (which was 16,775,992 heads and 16,775,991 tails. This happened twice in 1,000 runs!) The largest difference between heads and tails was 69 times smaller than the result from the referendum.

Plotting the shares in decreasing order, we see how quickly larger deviations fall off:


Putting the deviations into bins and counting the competitions by deviation from the expectation, we see that smaller deviations are more common:


Whatever else we might say about the result, we cannot seriously claim that the result was random.

The full program can be found here:

The Excel file can be found here:

Paying People not to be Bad

Saturday, August 15th, 2009

An idea that has been working its way around my head for a few days is to do with paying people not to do bad things. We are generally confortable with the idea of punishing people who commit crimes. Rewarding people who do good deeds and are successful is also popular. However, rewarding people who are likely to commit a crime but choose not to is controversial. It is unfair to those who are not likely to commit the crime, as they receive no reward but are equally innocent.

One example of paying people not to commit a crime is a publicly subsidised taxi service intended to reduce drink driving. Somebody goes to a bar and drinks alcohol. They might decide to drive home or take a taxi. Their decision to drive, and commit a undoubtedly serious crime, might be based on the risk of having an accident (which many foolishly ignore), the risk of being stopped by the police and the price of a taxi fare.

The government can try to solve this issue by promoting awareness of the risks of drink driving, increasing the importance of the first consideration in the drinker’s mind. Many countries have gut-wrenching adverts showing the harrowing effects of accidents that have resulted from drink driving. This puts the dangers to the front of people’s minds and makes drink driving less socially acceptable. However, alcohol is a notorious judgement inhibitor. Putting aside the thought of danger and feeling contempt for do-gooders are all too easy when drunk.

With regard to the second consideration, the state can put more police on the roads and make the penalties more severe. Of these, more police might be more effective. In my opinion, a criminal commits a crime because he or she assumes that they will not be caught, rather than the assumption that the punishment will be bearable. I doubt that drinkers about to drive say to themselves “Oh well, it’ll only be a year without a driving license.” The ‘Bring back flogging and hanging’ brigade get a grim pleasure from seeing ne’er-do-wells being punished. Such braying for blood is mere sadism. However, a higher probability of being arrested might have an effect.

The third consideration could be to subsidise the taxi companies in an attempt to reduce the cost of fares. If the money comes from general taxation, teetotalers and stay-at-home drinkers might balk at paying for a service that they do not use. The money could also come from a tax levied on bars. Again, customers who stroll tipsily but harmlessly back home from a pub might begrudge having to pay for others. They should console themselves with the no doubt decreased likelihood of being run over.

Is the proverbial stick preferable to the carrot? Tax payers might broadly agree to their money being spent on schemes that reward others for not commiting crimes, which they themselves never intended to commit, because the benefits outweigh the costs. But what are the consequences? Does a subsidised taxi service not encourage people to drink more? Is it not more prudent to make drinkers fully take moral, legal and financial responsibility for getting themselves home?

King Canute got his feet wet

Monday, July 6th, 2009

In an article to do with G8 leaders and climate change

G8 leaders to set emissions goals

the journalist reports that “Leaders of G8 nations are to set a target to cut greenhouse gases by 80% by 2050”. This seems like something that is difficult but possible. It is something that can be controlled by humans. I doubt that the leaders of the G8 actually have such power. They might represent the populations that emit the greatest amount of carbon dioxide, and measures that they take might reduce carbon dioxide emissions in their countries. However, their power does not extend to every other nation on the planet, which will probably produce a greater share of the world’s carbon dioxide emissions by the middle of the century. However, global carbon dioxide emissions are controllable by humans.

The article goes on to say that “[the G8 leaders] will also call for any human-induced temperature rise to be held below 2 degrees Celsius”. Is this going to be a legally binding limit? What sanctions will they take against the earth’s climate if it disobeys they proclamations? Xerxes once had the Hellespont whipped after a storm washed away a bridge, will future leaders resort to such tactics? King Canute order the tides to stop but ended up getting his feet wet.

I do not want to appear defeatist. I think that there are measures that we can take in order to reduce the impact of human activity. There are clearly much better ways of producing energy than burning coal and petrol. Governments have a role to play in moving to newer technologies. But politicians are no more able to ban global warming than they are able to set the ration the circumference of a circle to its diameter.

burning up huge amounts of carbon dioxide

Monday, June 22nd, 2009

I read the Guardian every day. I don’t think that I will ever have the stomach to take without feeling a little nauseous. The self-loathing of middle class lefties and defeatism inherent in an ideology that holds that levelling down is a price worth paying for aiming for equality makes me feel more than a little bit sick.

Another problem with the paper is that it’s not always very accurate. In this article:

the writer complains about “air conditioning systems burning up huge amounts of carbon dioxide”. How much does this guy know about climate change, electricity production or even high school level chemistry? If a/c systems burned up CO2, then climate change could be solved in about five minutes. We would simply need to turn them all on, burn up the excess CO2 and not worry about the coal power stations belching out CO2. The only conclusion that I can draw from this article is that the journalist knows next to nothing about chemistry and has probably read very little on climate change, the science, as opposed to climate change, the social phenomenon. However, we read articles by such people arguing about draconian measures to combat climate change. Such measures might have a drastic impact on the quality of life whether we take them (in terms of lost productivity) or if we don’t (in terms of environmental chaos). If we get our news from such uneducated fools, what hope have we?

How not to fight global warming

Monday, May 4th, 2009

Above is a link to an article on the carbon footprint of the internet. In the comments, we can find the normal luddite opinions. If only people didn’t like the modern world, we could live in pre-industrial simplicity.

It seems embarrassingly obvious to me that if we have any hope of survival, it is in moving forward, rather than backwards. If we think that we can solve the world’s environmental problems by rejecting technology, then we’re sunk. Do the troglodyte commenters on the Guardian really think that the world is going to be able to implement the sort of engineering projects that are going to be necessary for a revolution in the world’s energy industry without the internet? How do they imagine engineers study and design things like solar panels, wind turbines or smart electricity grids? Using pencils, recycled paper and 30 year old text books?

Bankers’ Bonuses

Wednesday, February 11th, 2009

Ordinarily, I do not concern myself with the way that private companies remunerate their staff. If a jockey can make a horse run fast, or a rock star can fill a stadium, it has always seemed fair to me that they should take home a large share of the proceeds.

Occasionally, I have heard people talk with disgust about the salaries of footballers and about how unfair it is that someone can get paid so much for kicking a leather ball, compared to the amount paid to a teacher or a nurse. Unsurprisingly, these arguments usually come from representatives of those fine and noble professions. I need not trouble myself with discussing this sort of unhidden jealousy.

If they insist that they are not jealous, one can always ask if they would prefer the money to go to Rupert Murdoch or another of his ilk.

And then, there are contemporary bankers.

For a long time, ordinary people have been complaining about the size of their pay packets. They are not like the jockey, or the rock star, or the footballer. As executives, they have more control over their pay. They are like a shop manager with his hand in the till. A fine analogy, we may say. Like the shop owner whose manager is robbing from the store, the owners of these companies (the shareholders) need to take control of the executives and stop the theft. It is their responsibility to make sure that bonuses are paid at the levels where they achieve their purpose (to attract and retain the services of the most competent). I never saw any reason why I should concern myself with or be scandalised by the bonuses paid to executives by companies whose shares I did not own.

In this era of government handouts, the issue of bonuses become a lot more fiery. When the government owns large proportions of some banks, we all become shareholders. It becomes our responsibility that the bonuses are paid out effectively.

People are right to be shocked by bankers pocketing government money intended to prime the lending markets. Such behaviour seems criminal. Governments have to do something to avoid this sort of thing, and are introducing caps.

The argument against the caps that has sprung up from those of a classical liberal bent (Oh! How I loathe to have to qualify the word “liberal” with “classical”. Damn you, American socialists! At least have the conviction to describe yourselves honestly.) is that the best bankers will leave the failing banks (in which we are all now shareholders) in order to seek higher bonuses in banks that have not received state funds. A divided banking industry where one half consists of whiz kids in privately owned banks, and the other consists of venal parasites in failing banks propped up by ever increasing government handouts sounds like something out of “Atlas Shrugged”, and it’s in all of our interest to avoid that.

Can we avoid such an outcome? Possibly. Imposing blanket caps (no cash bonuses over fixed amounts for example) runs the risks of causing the flight of any talent left at the top of the banking industry. A better approach might be for all bonuses to be put before all the shareholders of the banks for their approval. This should be the way that large bonuses are always handled anyway. Bonuses from banks that have been part nationalised will obviously have to be scrutinised by the government, which is a major shareholder, as publicly as possible. Other shareholders should have fair voting rights as well.

Whether such a scheme is workable is questionable. It certainly lacks the headline grabbing populism of a fixed cap.

Of course, the argument that the “talent” will go elsewhere presupposes that there are banks ready to pay them and that there is a shortage of top flight bankers looking for work. At this point, I doubt that either of those conditions are true.

How much efficiency is lost in a recession?

Tuesday, December 16th, 2008

Many in the car industry are suffering because of the current global recession. Understandably, politicians are reluctant to let manufacturers go under. For example, some of the French manufacturers are turning to the state for aid (in French):…la-filiere-automobile-francaise-.php

Unsurprisingly, one of the conditions of the French bailout is the car makers should not relocate any jobs to factories outside France.

Has anyone done a calculation of the total loss of efficiency of the global economy that is caused by decisions about how companies are run being made for political rather than financial reasons? Am I wrong to assume that it would be a loss in efficiency? Do such measures really increase efficiency?

Marcus Aurelius’ Meditations

Thursday, November 27th, 2008

I am reading Marcus Aurelius’ Meditations at the moment. He had a rather Spartan outlook on life (to say the least), but his thinking is attractive nonetheless. I cannot say that it will change the way that I live my life, or that I feel compelled to live like a true stoic, but it does remind me to ignore the less important ephemera.

I should admit that I have come to this book from a brief reference in “The Silence of the Lambs” and the character in the movie “Gladiator”, rather than as a result of some learned classical education. I find the character in the second movie particularly amusing.

The final line of “Gladiator” is something along the lines of “What we do in life echoes in eternity.” I guess that the slave rebellion story and the early democracy were to flatter a modern western audience: the way we live now is similar to the way it was then. Transporting modern values to a previous age in fiction is at worst dishonest propaganda and at best boring; if I wanted to know about today, I could look out of my window.

I have not found much like that in Marcus Aurelius’ writing. The opposite is to be found in fact. He repeats over and over how the events and trials of our lives are insignificant compared to the eternities before and after our lives and how everything gets washed away in the flood.

A Hollywood movie that made that the central point of the plot might be interesting, but I doubt that the hardness of the Stoic philosophy would sell as well as schmaltz and being told that our current system of government is in some way universal and eternal.


Sunday, November 16th, 2008

Everyone that I meet who cares to share their opinion seems to be very excited about Barrack Obama. This is understandable, he appears to have the potential to be a great president. However, effervescently singing the praises of anyone in power is never a sane thing to do.

The most dangerous part of the Obama cult seems to be the way that people project whatever they want on to him. He said that he would be prepared to send troops and planes over the border from Afghanistan into Pakistan in order to chase suspected terrorists. This has made him unpopular in Pakistan. However, some of his supporters insist that this threat was just empty rhetoric to convince conservatives that he is not a pussy. If you question his fondness for protectionism, people will insist that it just rhetoric to attract blue collar voters.

A politician who has been singing his praise even when they think that he is lying seems like a very great danger.

He promises to create 5 million green jobs by spending 15 billion dollars per year for 10 years on his Green New Deal. How anyone can create that many jobs for 3000 dollars each is beyond me, but we shall see if it has some of the desired effects.

A country that is galvanised by hope for a peaceful, prosperous, and green future is a beautiful sight, and I don’t want to be a party pooper. Big government projects have achieved great things in the past. They’ve also been wasteful. The worst consequence of an environmental Keynesian package (e.g. government money being spent on solar panels in cloudy and lefty Portland, Oregon) are probably not as bad as doing nothing. However, a package that spends billions of tax dollars and makes people feel good about themselves without having any measurable impact on carbon dioxide emissions would be ghastly.

Salsa in Schools

Monday, October 20th, 2008

I went to a Salsa bar in Itaewon on Saturday night.

Once again, I was struck by just how bad a dancer I actually am.

I also realised that the government could probably go a long way in with reducing the problems of binge drinking if they introduced compulsory dance lessons in school. I was once in Costa Rica and there, everyone seemed to be an amazing dancer (at least those that I saw in bars). They didn’t seem to need a drink to loosen themselves up and shake their funky stuff on the dance floor. I wonder how many needless drinks are downed every weekend in England just because people are self-conscious and can’t dance until they’ve had a few.