Formal analysis

June 18, 2011

Keynes is rather dismissive of what he calls ‘“mathematical” economics’. The following passage is from chapter 21 of The General Theory:

The object of our analysis is, not to provide a machine, or method of blind manipulation, which will furnish an infallible answer, but to provide ourselves with an organised and orderly method of thinking out particular problems; and, after we have reached a provisional conclusion by isolating the complicating factors one by one, we then have to go back on ourselves and allow, as well as we can, for the probable interactions of the factors amongst themselves. This is the nature of economic thinking. Any other way of applying our formal principles of thought (without which, however, we shall be lost in the wood) will lead us into error. It is a great fault of symbolic pseudo-mathematical methods of formalising a system of economic analysis, such as we shall set down in section vi of this chapter, that they expressly assume strict independence between the factors involved and lose all their cogency and authority if this hypothesis is disallowed; whereas, in ordinary discourse, where we are not blindly manipulating but know all the time what we are doing and what the words mean, we can keep “at the back of our heads” the necessary reserves and qualifications and the adjustments which we shall have to make later on, in a way in which we cannot keep complicated partial differentials “at the back” of several pages of algebra which assume that they all vanish. Too large a proportion of recent “mathematical” economics are mere concoctions, as imprecise as the initial assumptions they rest on, which allow the author to lose sight of the complexities and interdependencies of the real world in a maze of pretentious and unhelpful symbols.

There is much truth in the above, I think, and it is truth that applies not only to “economic thinking” but to any kind of thinking that relies on formalization. Statistical analysis is plagued with this kind of problems. Keynes does lay too much stress on the matter of interaction between factors. The problem with formal methods is not particularly with neglecting various effects – it is that they simply are false in various ways (neglecting various effects is only one of the sources of falsehoods). Informal methods have the same problem, of course – and in addition have problems associated with informality.

Read the rest of this entry »


The proportions of Americans who are politically affiliated with one of the two major parties has been very stable over the last 20 years, at about 60% with a slight downward trend (+ marks and thick trend line in the chart below). Over the same period, the general outlook of the public has fluctuated wildly, with those who say the country is “going in the right direction” reaching over 50% at one point and falling 5 years later to 20% (circles and thin trend line). The public mood seems to be optimistic immediately following presidential elections (vertical dashed lines), and pessimistic immediately before them.

Data source: New York Times/CBS poll, April 15-20, 2011.

The following C++ code takes a sequence of n elements, a1, a2, …, an, and outputs a sequence of n – k + 1 elements. The i-th output element is a maximal element in the subsequence ai, ai + 1, …, ai + k – 1. The runtime complexity of the code is O(n).

template <typename T>
void insert(std::list< std::pair<T,unsigned int> > &l, T v)
    unsigned int sp = 0;
    while (!l.empty() && l.back().first < v)
    l.push_back(std::pair<T,unsigned int>(v,sp));

template <typename T>
void advance(std::list< std::pair<T,unsigned int> > &l)
    if (l.front().second > 0)

template <typename T>
void max_in_window(T const *in, T *out, size_t n, size_t k)
    std::list< std::pair<T,unsigned int> > l;
    unsigned int i;
    for (i = 0; i < k - 1 && i < n; i++)

    for (; i < n; i++)
        out[0] = l.front().first;

Interestingly, an algorithm for the median in a sliding window will have runtime of at least O(n log k), since such an algorithm can be used to sort O(n / k) sequences of length O(k) each:

Let a1, a2, …, an be a sequence of numbers in a known interval, say (0, 1). Create a sequence of length 3n – 2 by padding the sequence with a prefix of (n – 1) 0‘s and a suffix of (n – 1) 1‘s. Now execute the sliding window median algorithm with the padded sequence as input, and with k = 2n – 1.

The i-th output element will be the median of a sequence that is made of the entire sequence a1, a2, …, an, n – i zeros, and i – 1 ones. That median is a(i), the i-th smallest elements of the sequence a1, a2, …, an. Thus, the output of the algorithm will be the sorted sequence a(1), a(2), …, a(n).

The number of Medical Doctor degrees conferred in the U.S. has remained unchanged since 1985 – about 15,000 degrees a year. Therefore, the number of MD degrees conferred per U.S. resident has fallen since 1985 by the same rate as the growth of the population – about 25% cumulatively.

That period has also seen a significant increase in the median MD earnings, as measured by the BLS (Current Population Survey – CPS, Weekly & Hourly Earnings): In the decade between 2000 and 2010, physicians and surgeons have seen their nominal median income increase 51%, while lawyers saw an increase of 37%, and the average worker saw an increase of 30% (series LEU0254541000, LEU0254536800, LEU0252881500). The 30% increase, incidentally, represents a 2.5% inflation-adjusted increase according to the BLS.

Data source: Statistical Abstract of the U.S. 2011 edition, Table 300 (spreadsheet); 1980 edition, Table 293.

Ricardo offers us the supreme intellectual achievement, unattainable by weaker spirits, of adopting a hypothetical world remote from experience as though it were the world of experience and then living in it consistently. With most of his successors common sense cannot help breaking in — with injury to their logical consistency.

John Maynard Keynes,
The General Theory of Employment, Interest and Money, Appendix to Chapter 14

Deaths breakdown by cause

February 28, 2011

Data source: CDC, National Vital Statistics Reports, Volume 58, Number 19. Deaths: Final Data for 2007. May 20, 2010. Table 10. Number of deaths from 113 selected causes and Enterocolitis due to Clostridium difficile, by age: United States, 2007.

First part here.

Book II

P. 85:

Since cities were founded and survive for no other reason than for the benefit of their inhabitants, which is based principally in preserving the common good, this cannot be restricted to one particular person or individual except at the expense of all the others. So what, I ask you, could be more pernicious or contrary to the essence of a city than for one part of it to be, quite unjustly and for no reason, excluded from all or part of the public benefits and consequently made to suffer greater disadvantages and burdens more than the other?

P. 103:

[A]lthough it [the Venetian government] has a different name from the one we want to use, because it is called a government of nobles and ours will be called a popular government, it is not for this reason of a different type, since it is simply a government in which everybody who is qualified for office participates, making no distinction either for wealth or for family, as happens when the ottimati rule, but all are equally admitted to everything, and they are very numerous – perhaps more so than in ours. And if the plebs don’t participate, the don’t in ours either, since infinite numbers of workers, newcomers to the city and others, do not belong to our Council. And although it is more difficult in Venice for the ineligible to be qualified for office than with us, this is not because the type of government is different, but because within the same type they have different institutions. […] So if we were to call our citizens gentlemen and reserved this title for those who were qualified for office, you would find that the government of Venice is as ‘popular’ as ours and that ours is no less a government of optimates than theirs.

Read the rest of this entry »

Minor party entry barrier

February 8, 2011

Elections are first and foremost a mechanism for eliminating non-elite competitors for power – their role as an inter-elite arbitration mechanism is merely a derivative of their primary function. The filtering function is most severe in first-past-the-post systems, where there are often just two credible competitors, and rarely more than 3.

[ Due to typesetting constraints, I am using [ … ] as shorthand for the reciprocal of the expression in the square brackets. That is [ x ] = 1 / x. ]

Within the Tullock contest model, the entry barrier for minor parties can be calculated. The Tullock contest model specifies the chance of party k winning power as pk = xk [ tk ] [ x1 / t1 + … + xn / tn ], where xi is the amount of resources spent by party i, and ti is the (in)effectiveness of the party’s campaign efforts.

Each party is characterized by its campaign effectiveness and its fund raising effectiveness fi. Given the benefits of power, G, the expected return for party k is:

Uk = pk G – xk [ fk ] = xk [ tk ] [ x1 / t1 + + xn / tn ] G – xk [ fk ].

The model assumes that parties spend the amount that maximizes their expected returns. Under the model assumptions there will always be at least two parties with non-zero expenditures, since a party that finds itself without a spending opponent reduces its spending, until the derivative of the expected return for a competitor becomes positive at 0.

Let zi = xi [ ti ] [ G ], Z = z1 + + zn, and ri = ti [ G fi ], i = 1, …, n. Then,

Uk = G ( zk [ Z ] – rk zk ),


d Uk [ d zk ] = G ( (Z – zk) [ Z2 ] – rk ).

An equilibrium with n parties 1, …, n exists if there exists a solution to the n simultaneous equations,

d Ri [d zi] = 0, i = 1, …, n,

such that zi > 0, i = 1, …, n.

If the solution exists, then, summing the n equations:

Z = (n – 1) [ R ],

where R = r1 + + rn.


zk = Z (1 – rk Z).

Then zk > 0 if rk > [ Z ] = R [ n – 1 ], which is true if and only if

rk > (R – rk) [ n – 2 ].

Thus, a solution exists if

mink rk = r(n) > (r(1) + + r(n – 1)) [ n – 2 ],

and the number of parties at equilibrium will be the maximum number n such that

r(n) ≥ (r(1) + + r(n – 1)) [ n – 2 ].

In particular, this implies that any party which has r > r(1) + r(2) will have negative benefit from engaging in an election campaign.