Archive for the ‘Uncategorized’ Category

Simulating abrupt political change

A person’s political opinion is influenced by opinions of those in their network of associates. Networks overlap, and therefore a person’s politics is also influenced indirectly by opinions of those far beyond their immediate network. It is known from statistical physics that collective effects and phase transitions are commonplace in systems with large numbers of discrete interacting elements. For this reason, it is possible that abrupt changes in political opinion might arise in response to small external changes.

q-state Potts models are a simple type of interacting spin (discrete state) model. Each site i on a graph or lattice has state s_i in 0,1 \cdots ,q-1. The site ‘energy’ is determined by the number of neighbours j which agree with s_i. The total energy of a configuration \{ s_i \} is,

(1)   \begin{equation*}H=-\beta \sum_{\langle i,j \rangle } \delta_{s_i s_j}\end{equation*}

where \delta_{s_i s_j} =1 if s_i=s_j and 0 otherwise. The sum is over “neighbours” \langle i j \rangle. According to the simple rules of statistical physics, the probability of a particular configuration \{ s_i \} follows Boltzmann’s law,

(2)   \begin{equation*}P\big(\{ s_i \}\big) \propto e^{-H(\{ s_i \}) } \end{equation*}

Instead of spins, the states can be re-interpreted as representing q flavours of political opinion. The coupling \beta determines how strongly associates influence each others’ opinions. If \beta is close to zero, then opinions are independent and randomly distributed. When \beta >> 1 groupthink dominates. In a population of economists or social misfits who like to disagree with one another, \beta <0. However \beta \sim 1 is probably the most relevant and certainly most interesting case.

Much is known about Potts models and equations (1) & (2) are easy to simulate using Gibbs sampling (results below were obtained in C++ linked to R using Rcpp). For simplicity, I took the case of a square lattice with nearest-neighbour coupling. This means that each opinion-holder has four associates, and each person’s network overlaps with four other networks. Results for the average agreement (i.e. the average number of associates with whom each person agrees, a number between 0 and 4) on 50\times50 and 100\times100 lattices are shown below. The coupling \beta was slowly increased from -2 to +2 with up to 60,000 thermalisation sweeps at each step. At \beta = 1.342\ldots there is a sharp jump in the level of agreement (from about 2 to 3).

pottsagreement

The transition can also be seen in opinion percentages. Below, opinion favourable to the blue candidate jumps from 12.5% to over 50% at the transition. All other candidates follow the pink line.

pottsorder

There is no model bias favouring the blue candidate. Their selection is a case of “spontaneous symmetry breaking”. The jump is already very sharp at N=10000 and becomes a true mathematical discontinuity when N\to\infty.

In this model an opinion poll carried out at \beta =1.33 has nothing to say about which candidate would emerge if \beta increased to 1.36 by election day. Is this one reason why opinion polls often turn out mysteriously wrong?

 

Global weather in a Pierce Quincuncial projection

I recently came across Peirce’s Quincuncial map projection, invented by the philosopher C. S. Peirce in 1879. Pierce projected each hemisphere of a spherical earth on to a square in such a way that lines of longitude and latitude cross at right angles. His projection is not used very much, perhaps because it is absent from standard mapping libraries such as Proj.4. Jason Davies’ elegant tessellated version (below) reproduces Peirce’s original.

pq

 

The Peirce Quincunx (PQ) has nice features for the display of global weather and climate data. Firstly, as a conformal map, it does not distort the shapes of relatively localized objects such as the cyclones present in global weather patterns. The Mercator projection is also conformal, but is notorious for it’s large scale distortion. PQ scale distortion is generally smaller, becoming large only near the four equatorial singular points.

Secondly, PQ is pole-friendly. The poles are special points in the climate system because the jet streams circulate about them. It seems perverse to display climate information using map projections (such as geographic) which are singular at the poles. Other examples of pole-friendly projections include transverse Mercator and oblique cylindrical equal area.

The video shows 850mb PQ wind speed raster maps for October 2015 based on 6-hourly 0.25o resolution gdas data. 1 video second corresponds to two days of weather data.

There is a nice discussion of PQ implementation in R here. To create raster maps, both forward and inverse projections were required. These functions are available in tcl‘s mapproj library and can be called from R. More details later.