Monday, April 27, 2015

Personal copies and the law

The law was recently changed to officially permit what had already been happening since time immemorial. The Copyright and Rights in Performances (Personal Copies for Private Use) Regulations 2014 says that
The making of a copy of a work, other than a computer program, by an individual does not infringe copyright in the work...
There are restrictions - it must be for the personal use of the person making the copy, who can't gain commercially from it, and they must own the original from which the copy was made. But making back-up copies and copies in different formats are all legitimate now.
This means that you can legally convert CDs to MP3 files for your own collection, or put them on iTunes or Google Play. Converting your own LPs into MP3 files or burning them to a CD is also now officially legitimate. You can make your own compilations to listen to in the car. In principle, if you wish to make an electronic version of a book to study on a computer, this is also okay.
However, the law doesn't permit the giving or receiving of mix tapes or mix CDs - a copy would be going to a person who doesn't own the original.
An interesting question
There's a section that follows the regulations, with the heading:

Remedy where restrictive measures prevent or restrict personal copying

As far as I can tell, this argues that, if a copyright owner has in place a mechanism to prevent someone from making personal copies, this person can complain to the Secretary of State. The Secretary of State can then intervene if he or she decides that the person is being prevented from making a personal copy, the right to which is provided by this regulation.
This has little bearing on listening to music; most obvious forms of personal copying are achievable. However, one of the areas where I suspect this has interesting implications relates to video cassettes. Commercial video cassettes have copy protection schemes, and  VHS/DVD combination recorders won't bypass them, meaning that people have not been able to transfer the content of commercial VHS video cassettes to DVDs. The implication of these regulations seems to be that this is likely to face a legal challenge, and copyright holders of copy protected videos could, in theory, be forced by the government to provide a means whereby owners can obtain personal copies without restriction.

Sunday, April 19, 2015

An election model - part 4 - some evaluation

In my previous posts, I explained about the model I had constructed from the 2010 election results, and the headline output I obtained from it with one set of input data. I say "headline" as this is very much just the summary - the actual output includes details of every seat that changed hands (both Wolverhampton South West and Worcester were Labour gains from Conservative, for example, in this run of the model), plus votes for every candidate in each of the main parties. Clearly, the closer you look at results, the less likely it is that there is a correspondence with what actually happens.

We are here very much drifting towards the realm of psychohistory - the fictional academic discipline which is the basis for Asimov's Foundation series of books. It is possible to describe the behaviour of people in large scale, and this is what opinion polling seeks to do anyway. The reason for wanting to model the outcome of the election rather than simply making reference to opinion poll percentages is that reducing election results to total votes cast for each party (which is in effect what an opinion poll invites you to do) has actually offered very little insight into the number of MPs who end up sitting in parliament - see the table at the start of my post linked to above, to compare the percentage votes per party and the number of seats obtained. It is commonly thought that this effect will be even more pronounced after the next election - at the moment, UKIP and the Greens are likely to collect over 20% of the votes and are quite likely to have less than 5 MPs (out of 632) between them. (With a bit of luck, the proportion of people who believe in PR will take another bump upwards after the next election.)

The trouble is that, as with psychohistory, the model can't deal with details and individuals - for example, a very charismatic candidate in one constituency; an issue that polarises local populations. In effect, I make the assumption that on a national level the impact of such things is likely to be small over a five year period. There will be local variations, but as far as the model is concerned, they can be ignored, as what I am trying to get out of the model is not so much a forecast for each individual constituency but an estimate of how large-scale changes in political opinion might impact the size of parties in the House of Commons.

One of the things that I find quite pleasing about the approach I have taken is that, rather than the values obtained from an opinion poll being used as inputs ("What would 34% of the electorate supporting both Labour and Conservative mean?") it actually becomes one of the outputs - in effect, a correspondence between the opinion poll results and the total votes cast per party in the model provides a validation of the assumptions that I have made about how the votes have been redistributed. The downside is that it gives a misleading sense of confidence. A reminder of the results that came out of the model run above:

PartyVotes 2015% votes 2015SeatsPoll standing 16/4/15
Conservative8,895,06637.325434
Labour9,199,87538.629134
Lib-Dem2,519,72910.6378
SNP1,004,7744.242
PC313,4331.37
Green1,785,5167.516
BNP112,8640.50
UKIP3,282,87213.8014

The problem is that, even assuming that I get close to being right about the number of votes, the number of ways of arranging those votes is indefinitely large. The opinion poll output is very low in information: the size of parties in parliament much higher. Is it possible to determine how reasonable any specific arrangement is?

Incidentally, I have no doubt that there's nothing terribly unusual about this model - political parties and media organisations almost certainly do the same thing. I was just interested in the fact that it could be put together in about an evening using nothing more than spreadsheet software.

I'd like next to spend some time refining the model. I think that a more general matrix for transfer of allegiance can be constructed, though I'm not sure how much it would add. I would like to get closer to the actual poll standings - though this is quite scary, I hammered the Lib-Dem vote even to get it down to 11%, and I still have some votes to lose from Conservative and Labour. And maybe I should be trying to look at "Other" or something, more usefully than BNP. And would it be possible to determine which constituencies actually have a Green candidate standing in them? And then, just how varied could the size of parties in the House of Commons be and still return the headline poll figure? And is the poll figure representative of people's voting intentions? All for future posts ...!

Saturday, April 18, 2015

An election model - part 3 - inputs

Having settled on a methodology for modelling the 2015 election (see last post) it was time to see whether the model would produce anything that looked interesting. First, a reminder of the 2010 "baseline":

PartyVotes 2010% votes 2010SeatsPoll standing 16/4/15
Conservative10,726,61436.130734
Labour8,609,52729.825834
Lib-Dem6,836,82423.0578
SNP491,3861.76
PC165,3940.63
Green285,6161.016
BNP564,3311.90
UKIP919,5463.1014

Source for 2010 data

Notes:

  • This was not the same source as the one I obtained the figures for my model for.
  • Although I have excluded the Northern Ireland parties and "others", this covers 97.2% of the votes and 632 seats. Thus, this is a substantially complete and comprehensive model of the parliamentary election for Great Britain
  • Percentages for SNP and PC aren't specified, and in any case as they only relate to a small number of seats, are not meaningful. The BNP will not be a factor at a national level in this election. "Others" at that date was 4%.


My model permits me to apply changes to voting patterns across the country. I can use this to determine what proportion of the vote each party would get as a result, and what that would mean in terms of seats obtained. It suggests the political party of the MP returned

Next, what changes to votes would be applied? One change that has been anticipated pretty much since the Lib-Dems became part of the coalition with the Conservative party has been that their support would fall drastically. However, on the basis that incumbent MPs might be better regarded by their constituents, I applied a different and significantly smaller correction to those constituencies which had an incumbent Lib-Dem MP. I then assumed that these 2010 Lib-Dem voters would divide their votes between other parties - Labour, Green, UKIP and the nationalist parties.

There seems also to have been a strengthening of nationalist opinion, particularly in Scotland. So I assumed that a proportion of all Con/Lab/Lib votes would transfer to nationalist votes. This would have a most significant effect on Labour.

I assumed that a proportion of the Conservative vote would be lost to UKIP, but also that a smaller proportion of the Labour vote would be lost to them as well. I assumed that half the BNP votes would be transferred to UKIP. This was before I had realised just how much weaker BNP had become in this election. And finally, as the Green party is now standing in 90% of constituencies, I assumed that in any constituency in which they didn't have a candidate in 2010, they would pick up a percentage of Labour votes in addition to the Liberal defection.

Here, then, is what I came up with after a little fiddling around with the proportions:


Defection Con-UKIP - 0.17
Defection Lab-UKIP - 0.08
Loss of votes for Lib when not incumbent - 0.7
Loss of votes for Lib when incumbent - 0.2
Lib transfer votes to UKIP - 0.1
Lib transfer votes to Labour - 0.35
Lib transfer votes to nationalist - 0.15
BNP transfer votes to UKIP - 0.8
Lib transfer to nationalist that go to labour if no nationalist candidate - 0.5
Swing Lab/Con/Lib-SNP - 0.25
Swing Lab/Con/Lib-PC - 0.1
Greens standing in 90% - assume all. Defection Lab-Green for new candidate - 0.06



PartyVotes 2015% votes 2015SeatsPoll standing 16/4/15
Conservative8,895,06637.325434
Labour9,199,87538.629134
Lib-Dem2,519,72910.6378
SNP1,004,7744.242
PC313,4331.37
Green1,785,5167.516
BNP112,8640.50
UKIP3,282,87213.8014

I will discuss these results in the next post.

Friday, April 17, 2015

An election model - part 2 - how?

In the previous post, I talked about why I was interested in attempting to model the outcome of the election. The starting point would be a spreadsheet containing the results of the 2010 election - not just the winner of each constituency, but the number of votes cast for each candidate - at least for those candidates who represented parties at a national level. I found a suitable dataset here.

In actual fact, it was more than suitable:
The data-set includes the British constituency results with the 2005 and 2010 share of the vote for each party, the candidates for each party (sex and race), the vote swing, seat changes, and constituency census data.
So I trimmed it down so that it only had the data I needed - basically, the votes for the main candidates in 2010. More specifically, it was the votes cast for the candidates of:

  • Conservative
  • Labour
  • LibDem
  • Scottish National Party
  • Plaid Cymru
  • Green Party
  • British National Party
  • UKIP
in all of the constituencies in Great Britain - that is, England, Scotland and Wales, but not Northern Ireland. The Northern Ireland constituencies weren't included in the table. With the exception of BNP, these conveniently represented all the parties which took part in the televised leaders' debate in March. I also ignored the Speaker's constituency.

In using this as a model to generate results, I made further assumptions.
  • The number of votes cast in a constituency would remain the same in the 2015 election as the 2010 election - in other words, the model would aim to redistribute the votes, rather than assuming a substantial disaffection with voting, or conversely an upsurge in voting, or even a significant change in the electorate.
  • Local processes within a constituency would be irrelevant - or more accurately, would average out across the country as a whole. A constituency might have a particularly good candidate for one party, but this would be balanced by the same party having a ropy one elsewhere.
  • Changes in voting patterns would apply in the same way across the whole country. Note that this can nonetheless be fairly specific - I assumed that there would be greater disaffection with the Liberal party where they did not have an incumbent MP, for example; and changes to popular feelings about then nationalist parties (SNP, PC) would only be relevant in Scotland and Wales, where candidates were standing. I also ignored the Speaker constituency.
I then specified a number of political changes of sentiment, along with the fraction of voters for particular parties that they represented. These can be tailored by changing a coefficient (ie. a number) in the spreadsheet representing this fraction - eg. "Proportion of Conservative voters switching to UKIP", "Proportion of Lib-Dem voters switching away from Lib-Dem without incumbent MP". All these coefficients are applied to the votes from 2010, to redistribute them. Obviously, the party with the largest number of votes following this redistribution wins that seat. The number of seats obtained by each party can be added up, to determine the shape of the House of Commons after this modelled election, and additionally, the total number of votes can be added up, to determine the percentage of people voting for each party, which can then be compared with returns from opinion polls.

So my aim, then, in trying to use the model, would be to specify a set of changes to voting intentions that would result in an outcome of vote percentages that correspond to the results of opinion polls. It would then be possible to look at what impact these changes might have on the size of parties in the House of Commons. Furthermore, the set of changes that I specified should have some resemblance to what seems to be going on in the real world ....

An election model - part 1 - why?

Like any reasonably politically engaged person, I have an interest in the outcome of elections. I suspect, along with various other people, that the 2010 election may have represented a turning point in the nature of British democracy, as it seems hard to imagine how we can return to the situation of having one party with an overall majority. It's a little ironic that people having voted "no" to any introduction to proportional representation - to obviate creating "weak, coalition government" - they may now discover that it has become a feature of our first-past-the-post system.

But how can you get any idea of what the outcome might be? How can you move from the sort of percentage support figures that are published as the results of opinion polls to guessing at the shape of a future parliament? The era of the red/blue "swingometer" is long gone. It sounds like the sort of problem that would require a dedicated team of analysts, banks of computers and a round the clock operation to incorporate up-to-the-minute results from every constituency. And yet, a prediction of the actual shape of the parliament, in terms of the number of seats for each party and what that might mean in terms of the horse-trading required to build a government after the election, is far more interesting than trying to guess a relationship between percentages in opinion polls and numbers of seats.

Here is one small aspect of the complexity of the situation. Conventional wisdom says that the Lib-Dems are going to have a severe battering in the polls, and lose lots of seats. But another facet is that UKIP is likely to take votes off the Conservatives, and also Labour. Let's take a simple but imaginary seat, from the 2010 election:

Con - 35%
Lib - 30%
Lab - 20%
Green - 8%
UKIP - 7%

Conservatives have a margin of 15% over Labour, and Liberals are going to lose lots of votes. But suppose 10% of the electorate go from Liberal to Green, 5% go from Liberal to Labour, 10% go from Con to UKIP. None of those are really wild figures; none are really big red/blue political swings. But look at the impact this has on the result this time:

Con - 25%
Lib - 15%
Lab - 25%
Green - 18%
UKIP - 17%

All five of these parties end up with a significant share of the vote. The actual result I've put there is less important than the general principle that relatively small shifts have the potential to drastically alter the political landscape.

I wondered how feasible it would be to produce a model, and if feasible, whether it might generate outputs which would look anything like the real world. I was convinced that it was probably not possible to produce a model which examined what was going on in every constituency - that really would require complex analysis. But it occurred to me that if I had information from every constituency from 2010, and assumed that the same political processes applied to each one, then I could infer what effect that might have in each constituency in the 2015 election. And to verify whether my guess at the political process was reasonable, I could add up the votes for each party, and compare them with the results of current opinion polls ....