Sunday, 30 December 2012

Making maths easier to follow in sociology

One issue I have when I read a maths-heavy social science paper is that it's difficult to skim through them. Some people might think this is because they are denser and more complex. This is certainly true in some cases but I don't think that's actually the main issue. The key requirement for skimming is that you can start reading the text at any point. If I'm familiar with a topic I can usually jump into an interesting looking patch of text in a paper and go from there. It's good to have the additional definitions and background at the start of the piece for those who are new to the area but it can be safely skipped by anyone already aware of the issues.

Unfortunately this is rarely possible with maths as the symbols used are defined throughout the piece, so any skimming soon requires flicking back through the article to find the definition of each symbol. Some notation is used consistently enough for its meaning to be inferred from context but its pretty rare and the point of using mathematical notation is not to create a system of hieroglyphs that each cover a unique concept. What this inevitably means is that I have to start at the very beginning of a paper and work through in order to make sure I don't miss any definitions. I've read econometrics textbooks that use notation they defined three chapters earlier!

I think there might be a better way to do this.

What if every mathematical symbol in a paper could have its definition brought up by rolling the mouse over it or clicking on it.

I envision a latex package for it working something like the following:

\definemathsymbols{i}{An individual survey respondent.}
\definemathsymbols{\epsilon_{uik}}{The uniform component of measurement error.}

Any subsequent use of the symbol would insert the mouseover text on the right so that a reader who is skimming can easily find out what your idiosyncratic notation means.

Then if you wanted to redefine a symbol you would just use the command again:

\definemathsymbols{i}{The currently selected ego in the simulation.}

These definitions are not designed to give a complete understanding of what's being done in the paper but they should allow a casual reader to skim a few equations and work out whether it's worth diving deeper into.

Not sure of the technical difficulties in implementing this but I think it could make a reader's job much easier.

If anyone wants to collaborate on writing a package or pointing in the direction of an existing one I'd be interested to hear from you.

Thursday, 1 November 2012

How an Obama Victory Could End the Electoral College

By most measures the popular vote for the presidential election is  almost tied (with perhaps a slight edge for Obama). Nonetheless, electoral college predictions, such as FiveThirtyEight, give Barack Obama a high probability of retaining the White House due to a lead in swing states, particularly Ohio.

This means there's a non-trivial possibility that we'll see the reverse situation of Al Gore's 2000 loss of the electoral college, even while winning nearly half a million more votes than George W. Bush. This year, Obama could well win Ohio, and therefore the electoral college, while gaining the support of fewer Americans than Mitt Romney.

If this does happen, it raises interesting prospects for constitutional reform. Despite strong public support, it's very unlikely that electoral college reform would passas a constitutional amendment - with a two-thirds majority support through both houses of Congress and then the support of three-fourths of the States required to ratify it. But it could put new momentum into a quieter approach to electoral college reform that has been slowly making progress -the National Popular Vote Interstate Compact (NPVIC).

This approach to reform takes advantage of the constitutional clause allowing states to appoint electors in the manner of their choosing. The NPVIC approach is to make states pass laws to give all their electoral college votes to the winner of the national popular vote, but this only goes into effect if states with a combined 270 electoral college votes – the number of electoral votes required to win the presidency - also pass laws promising to do so. This would guarantee that the popular vote would always determine the presidency. 

So why might we expect an Obama win to push the NPVIC plan over the 270 threshold? It turns out that states making up 132 electoral votes have already passed the bill: Maryland, New Jersey, Illinois, Hawaii, Washington, District of Columbia, Vermont, Massachusetts and California. The first thing that's obvious about this list is that it's heavily skewed towards Democratic states still smarting from Gore's 2000 defeat.

But if Obama wins it's not Democrats but Republicans who will be decrying the illegitimacy of the president (as they sometimes do already), and passing the NPVIC might seem the perfect way to push that agenda.

So if Obama wins, which states might be most likely to pass the NPVIC? At the moment the electoral college rewards several things:

Small States: the extra two electoral college votes that each states receives due to its Senate delegation go a long way for small populations. Wyoming has just 0.2% of the US population but 0.6% of its electoral college votes. This bias leads candidates to campaign more heavily in small rural states than would make sense tootherwise.

Swing States: the other major beneficiaries of the current system are swing states. If a state could plausibly swing to either party there's a very good chance that the candidates will find lots of enticing things to offer its voters.

With that in mind, the likeliest candidates for passing the NPVIC would be large Republican states. Perhaps Texas (38), Georgia (16), Tennessee (11), Arizona (11), South Carolina (9), Alabama (9), Louisiana (8) and Kentucky (8). In total that gives us an extra 110 electoral votes bringing us to 242 total. Close, but still 28 votes short of the magic 270 required to pass the proposal.

From here we'll either need a lot more small Republican states or one or two additional large states.

For the small states approach we would need to convince Oklahoma (7) Mississippi (6), Arkansas (6), Kansas (6) and Nebraska (5) for an extra 30 votes pushing us to 272. But some of these would probably be reluctant to undermine the attention paid to rural states by candidates.

Florida or New York alone would be sufficient. But New York is heavily Democratic and unlikely to want to undermine Obama at the start of his second term. Florida meanwhile might be reluctant to give up the political attention that comes with its decisive role in presidential elections.  Outside of these, two states would be needed to seal the deal. One of these might be North Carolina. While it went for Obama in 2008, it has looked solidly Republican throughout this electoral cycle and is controlled by Republicans at the state level. With North Carolina's 15 electoral votes, it would then only take a few more votes to push the NPVIC reform through.

So the NPVIC might just become viable if Obama wins a second term despite a loss in the popular vote. But even with support from large Republican states, NPVIC reform will still require some help from the beneficiaries of the current system.

Given the huge impact of the electoral college on American history, a change in this system could end up being the biggest legacy of Obama's second term.

Tuesday, 3 July 2012

The Sociology Paper Title Generator

After noticing a trend towards quite generic naming of papers in sociology I decided to write a quick script to generate new ones. I took some components of some recent working papers and combined them at random. Initially, I thought it would generate some hilariously ridiculous sounding papers. More worryingly, it generates lots of very plausible sounding research topics. Here are the first 11 it generated:
A spatial analysis of cooperation and end of life care : in Eleven European countries 
The social determinants of Labour market outcomes and Class mobility : in Eleven European countries 
Revisiting Class mobility and part-time working : new perspectives for European research 
Measuring Fertility history and UK immigration policy : recent evidence from Germany 
Understanding employers' gendered hiring preferences and wives' earnings : assessing government responsiveness to public opinion 
Gender inequalities in part-time working and Employment change : recent evidence from Germany 
Long term trends in extreme right party membership and corruption : Does money matter? 
The effects of democracy on extreme right party membership and Class mobility : Does money matter? 
The social consequences of child mortality and Labour market outcomes : assessing government responsiveness to public opinion 
The effects of democracy on educational expansion and education :  revisiting the welfare state conundrum 
A spatial analysis of conflict and maternal education : in Eleven European countries

With the exception of Measuring Fertility history and UK immigration policy : recent evidence from Germany, none of these papers sound implausible and I really want to hear more about Long term trends in extreme right party membership and corruption. 

There's a serious side to this. Part of the problem with moving social science forwards is the difficulty in dismissing alternate explanations with limited data. If we really can connect any two variables together into a plausible hypothesis, how can we hope to dismiss all alternate explanations of any finding?

What's so great about storable votes?

A few weeks ago I read a post on the Monkey Cage blog about storable votes by Casella and Turban. It is an interesting new idea for solving deadlock in legislatures:
The central idea is the possibility of shifting one’s own votes from one contest to another, of storing votes not spent on decisions that are low priorities for use on decisions that matter more. 
So there are a fixed set of proposals to vote on (let's say 10) and each senator gets 10 votes to divide between the proposals as she sees fit. The idea is that a minority will sometimes be able to push through a prized piece of legislation by saving up its votes from other contests. 

The motivation seems reasonable (protecting minority interests and preventing deadlock) but I see a few problems with this:

Minority success as majority error: The majority have enough votes to stop everything the minority wants to do. Therefore, if the minority passes something that the majority doesn't want it is because the majority hasn't correctly calculated how many votes the minority would put on each proposal. To see this just imagine that the minority votes first: splitting their votes between the proposals according to their priorities. The best strategy for the majority (assuming they oppose the minority's goals) is to allocate just enough votes to beat each of the minority's totals. Therefore, if we don't see this it is the result of miscalculation by the majority in how they think the minority will act. The majority's actions won't reflect their priorities but what they perceive the priorities of the minority to be. 

Agenda setting. A much bigger problem is the immense power that setting the agenda will have in these contests. In fact, if the minority has agenda power they may be able to push through any legislation they want. So let's go back to the example: 10 proposals and the minority gets to set the agenda. For instance, the president (D) making judicial nominations to a senate controlled by the opposite party (R). The senate is divided 55-45 against the president (hypothetical example- for now). So R have 550 votes and D 450. In normal circumstances R should succeed in blocking most, if not all of the president's nominees. 

However, the president decides to nominate two utterly unacceptable nominees (-1000 payoff to R, +10 payoff to D): Ariana Huffington and Michael Moore, as well as eight normal candidates (-50 payoff to R, +50 payoff to D). D then announce that they randomly will put 275 votes on one of the two candidates (assume simultaneous voting for now). R now has the choice of how to respond. If they don't use all their votes against the two unacceptable candidates, they will be guaranteed a -1000 payoff compared to a -400 payoff if they let the other eight nominees past. So after the first two candidates are voted on, R have used all their votes up whilst D still have 175 votes remaining and can comfortably pass their eight candidates (+400).   
The minority has essentially given itself complete power by having control over the agenda. 

You might say that a party that did this would be punished by the voters. But that would assume that the public pay any attention to senate procedure