Wednesday, December 28, 2011

Copy/improve/paste, part 3

It's only the third installment of my series about great songs with even better covers, and I'm already about to break my own rules. In this case, I don't really think the cover is better than the original--but it is just as good, which is an accomplishment in its own right. I'm talking about Dolly Parton's I Will Always Love You, remade by Whitney Houston. It's funny how much both versions differ in mood: Dolly Parton's song is intimate and heartbreaking, Whitney Houston's is epic and magnificent. And then there's Houston's voice, holy shit.

Tuesday, December 27, 2011

The clash of two anthems

In just over six months, my hometown will be hosting the national soccer teams of Italy and Spain as part of the 2012 UEFA European Football Championship. I'm always very excited when those two national teams play each other, not only because they're both chock-full of players who are legends of the trade, but also because those countries' national anthems are my favorite ones of them all (of those two I like the Italian one better). Both songs are energetic and melancholy at the same time. I'm looking forward to hearing them in close succession on June 10, 2012. Below the fold, you can take a quick listen yourself.

Friday, December 23, 2011

Way to complicate something that isn't

A New York City video store called Kim's categorizes its movie collection alphabetically by director's last name. Great idea, right? You can't just walk in and locate, say, "Blue Valentine" on the shelf; instead, you have to ask a staff member who directed "Blue Valentine," and then wait for said staff member to look it up on their computer (because, most of the time, they don't know who directed the damn movie either. I'm not criticizing them; no one in their right mind would expect anyone to know off the top of their head who directed every movie in the store. Oh wait...) and point you to "US Directors, Derek Cianfrance." That's right: just when you thought it couldn't get any stupider, you're in for a surprise: movies are also categorized geographically according to the nationality of the director. Let's say you're looking for "Dangerous Liaisons." In order to locate it without having to waste time asking people and waiting for them to ask their computers, not only do you have to know it was directed by Stephen Frears, but also that Stephen Frears happens to be British, which means that the damn thing is filed under "UK Directors." Even though it's a Hollywood movie, made in America, funded by American producers, with American cast.

Tuesday, December 20, 2011

A big, happy family. Maybe not that happy, but really huge

Speaking of arguments against Polish central bank lending 5 billion euros to the IMF, here's an additional piece of hilarity. In an essay titled Don't Touch Our Currency Reserves, one Tadeusz Swiechowicz goes through the reasons why it's a bad idea for Poland to do this. Here's one of the reasons he lists:
Italians are capable of paying down their government debts themselves. The average household income in Italy is equivalent to 2 million PLN annually. [PLN is code for zloty, the unit of Polish currency--przemek]
A mind-boggling figure indeed, as made up figures tend to be. CIA World Factbook tells me that GDP per capita in Italy is currently around $30,000. Right now, 1 USD buys 3.4 PLN, which means Italian GDP per capita expressed in PLN is 102,000. So apparently, Mr. Swiechowicz believes that the average household size in Italy is almost 20 people.

Sunday, December 18, 2011

Consider knowing what you're talking about

This is yet another post in which I decry the depressing stupidity of public debate in Poland, especially when it comes to matters of economics and finance. The recent EU summit, aside from making a large (though rather back-door) policy breakthrough with respect to bailing out illiquid governments, has also proposed that the central banks of EU countries guarantee a loan to the IMF, with the aggregate value of some 200 billion euros. The funds are presumably going to be set aside in order to be used to help eurozone governments facing liquidity problems.

Poland's share in that guarantee is supposed to be somewhere in between 5 and 10 billion euros, and it's going to be funded through Polish central bank's currency reserves (which really means foreign government bonds held by the bank). At any rate, what prompted this note was an argument I've heard from a politician of the opposition party, debating against Poland's participation in this loan: namely, that even though on the face of it we're lending to the IMF, "everyone knows" we'll really be lending to Greece and Italy in order to save the euro, and it is a violation of the constitution to use the central bank of Poland to defend a non-Polish currency.

This was said with a straight face, by someone who used to be a Foreign Minister, about a loan to the IMF. Whose main (and at the time of its birth, only) function is pooling funds from central banks of many countries in order to provide their participants insurance against speculative attacks on their currencies.

Let me rephrase that again: the argument is that we can't be lending this money to the IMF because everyone knows they will use it to protect a foreign currency from speculative attack.

Wednesday, December 14, 2011

Not one existing and one perceived

We begin with an example. While walking, I see a stone by the road and kick it. (...) Years after the event, I remember the scene of my kicking the stone. 
Two features of this example are relevant. In the first place, there is the fact that I kick, imagine, see the same stone. In the second place, when I remember the stone I kicked, my evidence for remembering the same stone is beyond question. (...) I may recall at will the event of my kicking the stone, and the stone remains the same every time I recall it. (...) Anything I see, anything I think, anything I deal with carries the possibility of being seen, thought or dealt with again. (...) With each and every act of seeing I presentify an item. In every presentification, the item maintains its identity. The stone I remember is the same stone I kicked. (...) It is a mistake to believe that what I kick is a material stone. If the stone were a material object, then I could not remember "it," because there are no stones in my brain. Nor does it make sense to assert that after kicking "the" stone, I retain an "image" of the stone. Such an image would have to relate to the stone I kicked, and in order to account for this relationship we are forced into infinite regression. The radical realism of phenomenology consists in admitting that the stone I kick is the very same stone I remember. It is neither a material object nor an imprint in my brain. It is an item that has an identity.
--Gian-Carlo Rota


The world is given to me only once, not one existing and one perceived. Subject and object are only one. The barrier between them cannot be said to have broken down as a result of recent experience in the physical sciences, for this barrier does not exist.
--Erwin Schrödinger

Thursday, December 8, 2011

To-morrow, and to-morrow, and to-morrow

The illusion of the passage of time arises from the confusing of the given with the real. Passage of time arises because we think of occupying different realities. In fact, we occupy different givens. There is only one reality.
--Kurt Gödel, quoted by Rudy Rucker

Wednesday, December 7, 2011

God's name

I contend that the sum total of individual consciousness is the bare feeling of existence, expressed by the primal utterance, I am. Anything else is either hardware or software, and can be changed or dispensed with. Only the single thought I am ties me to the person I was twenty years ago. 
The curious thing is that you must express your individual consciousness in the same words that I use: I am. I am me. I exist. (...) What conclusion might one draw from the fact that your essential consciousness and my essential consciousness are expressed in the same words? Perhaps it is reasonable to suppose that there is really only one consciousness, that individual humans are simply disparate faces of what the classic mystic tradition calls the One.
--Rudy Rucker, Infinity and the Mind

When does poverty look like poverty

Not too long ago a friend of mine traveled to Ecuador and Cambodia in a span of just a few months. She said Ecuador looked to her like a much poorer place than Cambodia. It's interesting because, according to GDP per capita statistics, Ecuador is almost four times richer than Cambodia (regardless of whether you're looking at official exchange rate or purchasing power parity). So why does it appear the other way around? I can think of three possible explanations (which are not mutually exclusive):

  • Biased sample. Perhaps she just saw the poorer parts of Ecuador and richer parts of Cambodia.

  • Appearances can be deceiving. Urban poverty, for example, generally looks much more desperate and miserable than rural poverty, and Cambodia is mostly rural. If you visit Czech countryside first and then the West Side of Baltimore City, you may very well walk away with an impression that Czech Republic is richer than the US.

  • GDP statistics get the story wrong. Perhaps Cambodia's "shadow economy" is very large.

  • Suggestion from a comment by Funding Your Analyst: Cultural differences. For example, Ecuador is a former Spanish colony whereas Cambodia is a former French colony. I'd be very surprised if that played no role in this case--and it's just one possibly relevant cultural difference.

If you have other ideas, please share them. 

Tuesday, December 6, 2011

And no one there seems to have anything to say

A new deal is in the works in order to save the eurozone. Judging by rumors, it's not a very good one. No mention of a possibility of establishing the ECB as lender of last resort; no mention of the possibility of eurobonds; plans of establishing credible commitment mechanisms to keeping budget deficits below 3% of GDP; some sort of risk-sharing agreement in the form of an overall debt guarantee; and - last but not least - plans of some sort of credible commitment to not force private sector bondholders to take any losses on any future eurozone bailouts. Now how is a market supposed to work if lenders are sheltered from experiencing negative consequences of bad lending decisions? (The question is rhetorical.) Also, how is the debt guarantee supposed to work? The eurozone doesn't have enough funds to guarantee the debt of, say, Italy without that debt having gone some serious restructuring; and a restructuring of Italian debt under the assumption that private creditors must get 100 eurocents on the euro is economically and politically impossible--the necessary austerity measures would be so severe that it would make much more sense for Italy to simply suffer the consequences of defaulting and leaving the eurozone unilaterally.

So, the Polish government supports the deal unreservedly. On the domestic front, the arguments it offers in favor of it are nothing short of inane. The inanity of them, however, will have to wait until another post. What irks me even more at this moment is the fact that the opposition's response to those shallow arguments are arguments that are generally much, much stupider than what they're criticizing. Here's a small sample.

In a TV interview, the leader of the largest opposition party argued that concerns about the devastating effects a severe recession in the eurozone would have on Polish economy are much exaggerated because "Poland's exports aren't large in relation to its GDP". (The ratio is about 35%, in case you're wondering. And this was said by a guy who was at one point a prime minister, for Pete's sake. Also, below the fold you can find a chart that shows where that 35% locates Poland among OECD countries.)

In another interview, that same guy said that the government's plans of increasing the retirement age for women to 67 years is a terrible idea because Germany is doing the same thing and being Germany's copycats shows our government's "psychological dependence" on our neighbors. How's that for a policy rule: The Germans are doing it, so we can't.

Or how about this: the main economic writer in Poland's largest opposition media outlet begins his essay about the eurozone crisis with the following:
Germany's annual trade surplus of 130 billion euros has to come from somewhere. It comes at the expense of deficits, debt, and eventual bankruptcy of Greece, Portugal, Ireland, Spain and Italy.
In other words, he reveals that he doesn't know what trade surplus is, and can't tell the difference between current account deficit and public debt (hey, genius: how come Germany is in debt to about 84% of its GDP even though it's running all these surpluses?).

These arguments aren't just misguided. They're laughably ignorant.

And then another annoying one: we can't have a fiscal union because that would mean member countries would lose some of their sovereignty. True enough, but then again, countries give up some of their sovereignty left and right, lots of times voluntarily and to their own benefit. Entering a free trade agreement means losing a bit of your sovereignty (namely, sovereignty to set tariffs to whatever you damn well please). And losing that bit of your sovereignty happens to make you better off. I also find it interesting that those same politicians who decry the loss of independence that comes with a voluntary contractual agreement, never seem to have a problem with any type of policy that increases public debt (at least in Poland they don't). Hey, genius: when you take out a loan, what do you think happens to your sovereignty?

Anyway, rant's over for now. The chart I was talking about is below the fold.


Suboptimal equilibrium

Let's not kid ourselves: the software most widely used for statistics is Excel.
--Brian D. Ripley (one of the developers of R)

Sunday, December 4, 2011

Speaking of euphemisms

I know it's nowhere near in the same league of euphemisms, but Herman Cain's announcement that he's "suspending" his presidential campaign "because of the continued distractions" made me think of that famous quote from Emperor Hirohito's Imperial Rescript on the Termination of War (August 15, 1945): "The war situation has developed not necessarily to Japan's advantage".

Friday, December 2, 2011

Elevator pet peeves

If you live or work in Manhattan where there's no way to build but up, chances are that crowded elevators are a big part of your life. Chances are also that your routinely encounter some extremely annoying elevator-related behavior. Here's some that I've encountered:

  • Getting in an elevator in order to travel not just one single floor, but one floor down. Come on!

  • Pushing one's way inside without even stopping to look whether anyone wants to get off, then bumping into you with a shocked expression that says 'What!? You mean people come out of elevators too?'

  • Getting into an extremely crowded car full of people leaving work at 5:02 pm and then immediately pushing towards the control panel to make sure you press the button for first floor. Do you really think the thought of doing that hadn't occurred to anyone who got in before you?

Wednesday, November 30, 2011

Yikes, Europe


(I took these numbers from Megan McArdle, though she is not the original source. I forget who the source is.)

Tuesday, November 29, 2011

Because it lies

Some excerpts from an interesting essay:
On Nov. 21, Newt Gingrich, who is leading the race for the Republican presidential nomination in some polls, attacked the Congressional Budget Office. In a speech in New Hampshire, Mr. Gingrich said the C.B.O. “is a reactionary socialist institution which does not believe in economic growth, does not believe in innovation and does not believe in data that it has not internally generated.”  
[...] 
Mr. Gingrich has long had special ire for the C.B.O. because it has consistently thrown cold water on his pet health schemes, from which he enriched himself after being forced out as speaker of the House in 1998. In 2005, he wrote an op-ed article in The Washington Times berating the C.B.O., then under the direction of Mr. Holtz-Eakin, saying it had improperly scored some Gingrich-backed proposals. At a debate on Nov. 5, Mr. Gingrich said, “If you are serious about real health reform, you must abolish the Congressional Budget Office because it lies.” 
This is typical of Mr. Gingrich’s modus operandi. He has always considered himself to be the smartest guy in the room and long chaffed at being corrected by experts when he cooked up some new plan, over which he may have expended 30 seconds of thought, to completely upend and remake the health, tax or education systems.

Because Mr. Gingrich does know more than most politicians, the main obstacles to his grandiose schemes have always been Congress’s professional staff members, many among the leading authorities anywhere in their areas of expertise. To remove this obstacle, Mr. Gingrich did everything in his power to dismantle Congressional institutions that employed people with the knowledge, training and experience to know a harebrained idea when they saw it. When he became speaker in 1995, Mr. Gingrich moved quickly to slash the budgets and staff of the House committees, which employed thousands of professionals with long and deep institutional memories.
Note that all this love is coming from Bruce Bartlett, who served as a policy analyst in the Reagan and George H. W. Bush administrations.

Monday, November 28, 2011

Bad logic, but good game theoory

John D. Cook writes:
Ad hominem arguments are bad logic, but good (Bayesian) statistics. A statement isn’t necessarily false because it comes from an unreliable source, though it is more likely to be false. (...) Some people are much more likely to know what they’re talking about than others, depending on context. You’re more likely to get good medical advice from a doctor than from an accountant, though the former may be wrong and the latter may be right.
This is true, but I don't think it's the most important reason why ad hominem arguments persist. After all, they are used also (and perhaps mostly) against reliable sources of information. The reason is game theory. Most interactions we face are signaling games of partial conflict. We talk not just to transmit information, but also to influence other people's beliefs and actions in ways that are beneficial to us. We talk to persuade more than to inform. (Of course, communicating information is a necessary condition of persuasion. You cannot persuade anyone by talking to them if they do not understand what you're saying. Language could not evolve if all human interactions were zero-sum--there wouldn't be enough coordination to establish a common understanding of messages.) Persuasion consists of sending messages of the form "given your preferences, you should do X because Y." The logical validity of such message is of course completely independent of the sender's identity; however, the truth value of the conclusion (that doing X is good for you) is not. If someone gives you a logical argument for why it's good for you to do X, it's perfectly rational for you to wonder why they want you to believe that. Perhaps it's good for them, not so much for you. In other words, it matters who it is that's telling you this, for strategic reasons. Their preferences are relevant information in terms of assessing the likelihood of the conclusion being true.

What separates ad hominem as good game theory from ad hominem as fallacy is whether you're using information about sender's identity to update your beliefs about truth value of the conclusion or about validity of the argument. Here's an example. Suppose you are a (benevolent and completely ignorant) dictator of a medium-sized country. You wonder if establishing minimum wage requirements would help low-skilled workers and, in the process of your wondering, you ask the opinion of an expert economist. The expert comes back to you with the standard microeconomic theory argument that enforcing a minimum wage higher than the market rate increases unemployment among low-skilled workers. You then find out that your expert owns a whole bunch of enterprises that depend on low-skilled labor. It's logically valid and perfectly rational for you to use that information to postpone your decision with respect to the minimum wage (for example, until you get more opinions from experts who have no stakes in the conclusion). But, it's a fallacy if that information causes you to conclude that microeconomic theory is wrong.

Sunday, November 27, 2011

Copy/improve/paste part 2

This is part two of the series about great songs with even better covers. It's another instance of a cover that does everything more or less the same as the original. The original being:



I know to some readers it will seem like heresy to think any cover of this song is better than the original, but in this case I am a heretic. No, I don't mean Fiona Apple's version, but hold that sigh of relief: I like Rufus Wainwright's one.

Department of civil engineering

An annoying feature of policy debates: Arguing over issues which are, for all practical purposes, inherently quantitative, as though they were qualitative. For example, we can't have laws that set this or that limiting condition because laws can't "draw completely arbitrary lines in the sand". Sure they can. They have to. How does one deal with issues now dealt with legal concepts of, for example, age of consent or maximum speed limit, without being arbitrary? Here's another one I love: We can't do this because that's "civil engineering". Well, so are stop signs. The entire civil code is an exercise in civil engineering. So is criminal code.

The questions of whether or not we want laws that use arbitrary limits, or whether or not we accept social engineering, are just a waste of time. There's no real choice there. The meaningful questions are where we want to draw this or that arbitrary line, or how we want our civil engineering done in this or that case.

Saturday, November 26, 2011

On dreaming

In 2000, the great musician John Fahey (1939-2001) released a collection of autobiographical stories called How Bluegrass Music Destroyed My Life. I love that title, mostly because of what it's not: it's not How The Lifestyle of a Bluegrass Musician Destroyed My Life or How Drinking Destroyed My Bluegrass Career or whatever. No; it says what it says--that it was the very act of pursuing his dream, not the costs associated with it, that destroyed his life.

It bears remembering that it's John Fahey saying this, so it can't be dismissed as just another case of someone who's delusional and wastes his life trying to become great at something he has no talent towards. Fahey was an incredibly talented musician, and a reasonably successful one as well. Given how great he was at his music, it's hard to believe that there was anything else he could be even better at. Music was his true calling. Following his true calling ruined his life. Despite what your guidance counselor told you, this can happen.

Friday, November 25, 2011

Copy/improve/paste

I want to write a few posts in which I'll show some music clips of original songs together with their covers. The idea is I'll post songs I really like a whole lot which nonetheless have covers that I like even more.

To start it off, here's an old (1970) song called Planet Caravan by Black Sabbath.



A very good song and I've always loved it. So when I heard its 1994 cover by (an otherwise dreadful) band Pantera, I was surprised by how much better it became.



This is an example of a cover that's better even though it's very close to the original; but it's not always the case. I'll post some superior covers that sound almost like the original (only better), as well as some that sound nothing like the source.

Thursday, November 24, 2011

Inflation in the ancient world

In The Montreal Museum of Fine Arts there's a room with an impressive collection of artifacts from ancient Greece and Rome. One of the more interesting of those is a collection of coins minted by rulers of various ancient city-states as well as Roman and Byzantine emperors. There are about thirty coins ordered chronologically in a single row, and as soon as you see it you think, how's that for inflation. As you move forward in time, the coins get progressively smaller and show more visible signs of corrosion. In the younger coins, the corrosion also gets greener, suggesting that the proportion of copper used to make the coins was getting larger. Here's what the oldest coins looked like:


And here are the youngest ones:


Of course, all this could just be coincidence, or bias, either in the sample or in my perception (since they once taught me in school there was massive inflation in the latest years of the Roman empire). Who cares; it's much more fun to think it is what I think it is.

Tuesday, November 22, 2011

Here's my plan people

This is Newt Gingrich's answer to the question of what type of measures he would adopt after repealing President Obama's healthcare plan:
One, you go back to a doctor-patient relationship and you involve the family in those periods where the patient by themselves can't make key decisions. But you relocalize it. Two, as several people said, including Gov. (Rick) Perry, you put Medicaid back at the state level. Three, you focus very intensely on a brand-new program on brain science, because the fact is the largest single out-year set of costs we are faced with are Alzheimer's, autism, Parkinson's, mental health and things which come directly from the brain. And I am for fixing our health rather than fixing our health bureaucracy, because the iron lung is the perfect model of saving people so you don't need to pay for a federal program of iron lung centers because the polio vaccine eliminated the problem.
There you have it, folks. A concise, coherent and well thought-out plan. If you live on Planet Gibberish, that is. I know you'll wonder where I've been for the past two decades but... is this guy for real?

Just because there's a "=" in it doesn't mean it's an equation

Note: One of the reasons for writing this post was to test CodeCogs Online LaTeX Equation Editor as a way of posting LaTeX on Blogger. As you'll see, it actually works (it's not the first thing I've tried, believe me).

A popular science magazine Wired recently featured an interesting blog post briefly introducing 9 Equations True Geeks Should (at Least Pretend to) Know. Of course, the list starts off with Euler's identity


which is often described as "the most beautiful formula ever". Then there's also Boltzmann's entropy formula (engraved on his tombstone):


where k is supposed to be Boltzmann's constant and W is "the number of microstates corresponding to a given macrostate," whatever that means.

Which brings me to my to my next point: After reading the post, you won't really be able to pretend to know those nine equations. The more complicated ones don't even come with explanations of what their terms are (not like it's even plausible to give those explanations in a blog post). For example, if you're not a physicist, stare for a bit at Schroedinger's wave equation and then tell me how you'd go about "pretending to know it":


Piece of cake, right? There's, like, a partial derivative in there, and a second-order one as well. And apparently it has something to do with waves. What, did you ask me what that m term stands for? Well, it's physics, right, so it's probably mass... Or something. Anyway, like I said it's about waves.

Number eight on the list of nine is particularly puzzling. All it says is


where R-nought denotes the average number of people an individual infected with a pathogen will go on to infect. If that R-nought thing is less then one, the disease will die out; if it's greater than one, it will spread.

My problem with equation number eight is that it's not an equation. (If what you're thinking at this moment is something along the lines of "Well duh, of course it's not an equation, it's an inequality," please stop reading this now and just go away. I don't care that it's not literally an equation. If they threw in Bell's inequality there, I wouldn't have a problem with it.) The thing is that the remaining eight equations are something qualitatively different than this one. It's more or less the difference between equality and assignment in computer programming. The other equations (or inequalities) are logical statements; the "=" sign in them is a predicate which can be either true or false. "R-nought is greater than one" is not a logical statement; it's an assignment of a range of values to a parameter. What's funny is that the whole statement "If R-nought is greater than one then the disease will spread" actually is (kind of) an equation.

Respect my analysis!

Here's something quite amusing: a blog post (in Polish) written by an active politician and political science PhD, with some quantitative analysis of the situation in Sejm (a Polish equivalent of the House of Representatives) after recent elections. Or something the author thinks is analysis anyway.

Because he's all analytic and quantitative, the author kicks things off with a graph:


which he explains as follows: "The above graph depicts the distribution of power in Sejm. The percentages shown on the graph are percentages of seats belonging to each party."

So far, so good. Nothing inherently wrong with the graph itself (except maybe for labels; do we really need precision of two decimal places when talking about percentages of parliament seats?) It's the conclusions he draws from this graph that decidedly move his post from merely trivial to utterly ridiculous. He writes:
What are the implications of the above graph? 
First, the overwhelming advantage of PO. Even when compared to the largest opposition party (PiS), PO seems extremely powerful.
All this may very well be true, but it definitely is not a consequence of "the above graph". To make these kinds of conclusions we'd need to know many things that the graph doesn't tell us, like what kind of majority is needed to do what (do you just need plurality? Simple majority? Qualified majority? Maybe it depends on what you're voting on?), or what the likelihood of many possible coalitions is. For example, what if you need more than 50% of seats to do anything at all, and all the other parties hate PO and will never vote with them? Where's the overwhelming advantage?

But that's not all.
Second, the central position of PO. This party not only has the most seats, but is also situated in the most comfortable spot--the very center.
Oh god, where do I start. What is he talking about here, what does "central position" mean? In the center of what? The way he explained the graph, it is a visualization of one variable only: percent of parliament seats. Now he's talking as though the X axis measured another variable, the values of which are used to establish a linear order among parties. What is that variable? Why is is it not explained and why is the axis not labeled? Because according to the explanation, there is no such variable, so if I decide to order parties alphabetically by name, I'll be equally justified in claiming that PO has very little room for maneuver because it's second from the left.

They wouldn't do that, would they?

Let's start off the blog's new incarnation with a fresh installment of the Non Sequitur of the Month.

The largest oppisition party in Poland, called Law and Justice, has recently put forward a vague proposal of a new tax which they call "banking tax". No details are available, but judging from media rumors, it's essentially supposed to be some sort of tax on financial transactions. Predictably, the proposal has been criticized on the grounds that, contrary to Law and Justice's rhetoric, this new tax will be a burden not only on rich financial executives, but also on ordinary customers of banking institutions, since those institutions will most likely respond by raising prices of their services.

Now for the non sequitur part. In a TV interview, Law and Justice's press spokesman responded to this criticism by saying that the whole argument is a "myth," and that the critics must not really trust free markets as much as they say they do because if we have free markets in the banking sector, then banks have to compete for customers and will therefore not try to shift the burden of the new tax on them.

This is exactly like saying that the belief that an increase in world prices of crude oil will drive up prices of gas at the pump is a "myth". After all, car fuel is sold on a free market by multiple distributors who have to compete for customers.

The beauty of this argument is that it's such a pure example of a non sequitur: the conclusion does not follow from the premise. If the Polish banking sector is indeed a competitive free market, then prices of banking services are always equal to their marginal costs. A new tax on a service increases its marginal cost. The end.

Back

Apologies to my readers for taking down my blog from its previous URL without explanation or notice. The cause of this was some sort of a blogger interface glitch that came up completely out of the blue and that I wasn't able to fix. Thus I've resorted to plan B, which was uploading the backup of my blog to a new location, which is right here. There was some loss of information in the process; I've lost quite a few of the most current posts and comments which for some reason did not back up correctly, plus a library of links that my blog used to feature. The last part is all my fault; I didn't keep a separate file with those links. Instead I kept them as part of an XML file with the entire layout of my blog, and now I am of course unable to restore it. Eventually all those links will be back.

Anyway, it's good to be back. I'll keep on trying to stun you with some more non sequiturs.

Friday, August 12, 2011

Albert Camus speaks out about the war on drugs in Mexico

Well, not quite; it's actually the Mexican poet Javier Sicilia. But that's just an unimportant detail.
The politicians are formulating the drug problem as an issue of national security, but it is an issue of public health. If from the very beginning drugs were decriminalized, drug lords would be subjected to the iron laws of the market. That would have controlled them. That would have allowed us to discover our drug addicts and offer them our love and our support. That would not have left us with 40,000 dead, 10,000 disappeared and 120,000 displaced…
The war is caused by puritan mentalities: like those of [Mexican President Felipe] Calderón and [former U.S. President George] Bush. In the name of abstractions—the abstraction of saving youth from drug addiction—they have brutally assassinated thousands of young people, while transforming others into delinquents.
Albert Camus spoke a terrible truth. “I know something worse than hate: abstract love.” In the name of abstract love, in the name of God and Country, in the name of saving the youth from the drug, in the name of the proletariat, in the name of abstractions, our politicians and war policy makers have committed the most atrocious crimes on human beings, who are not abstractions, who are bones and flesh. That is what our country is living and suffering today: in the name of an abstract goodness, we are suffering the opposite: the horror of war and violence, of innocents dead, disappeared, and mutilated.
Source.

Actually, it probably means that...

There actually is a sensible explanation of the markets' behavior during the days immediately following S&P's downgrade. There's no way to know if it's true, but it sure sounds good. Here it is:


While it's hard to figure out what investors are thinking, it's pretty easy to guess what they're not thinking. No one is thinking that the US government defaulting on its debt is even remotely possible. But if no one is afraid of the default risk, why the panic? Well, both the panic and the fact that its main symptom was a rush to buy Treasury bonds can be explained by assuming that S&P's decision convinced a lot of investors that very deep cuts to US federal budget are imminent in the medium run. This means that very soon there might be a shortage of medium-term Treasuries. So if you think those are a good investment, better get them asap.

Monday, August 8, 2011

This must mean that...

Investors around the world reacted to S&P's downgrade of the US credit rating by selling out stocks. They also started buying up a whole bunch of US government bonds (see here how yields on medium to long-term Treasuries were decreasing today). Which makes sense, right? In the time of uncertainty caused by the fact that the US federal government is apparently more likely to default in the medium run than previously thought, it's a good idea to invest in the safest assets around, such as medium-term US government debt.


What, my explanation doesn't make any sense? You tell me then.

Saturday, August 6, 2011

An AAA-rated quote

You know, if you had told me a year ago that on august 5, 2011 S&P would downgrade the U.S, and the 10-year treasury would yield 2.5%, I would have laughed at you. I would have said that while there were possible futures in which each of those things happened, they were disjoint futures.
--Brad DeLong

A statistician walks into a doctor's office

Doctor: I'm afraid you have Type I diabetes.
Statistician: That's a relief. I thought I had diabetes.
HT: GregS.

Friday, August 5, 2011

But what if it's done with a smile?

Imagine you became friends with someone who was born and raised in a different culture. Imagine also that, unbeknownst to you, your friend's culture considers smiling at someone to be one of the most insulting things you can do to a person. (This isn't meant to be a plausible situation. It's a thought experiment.) Anyway, you're friends with that person. They're a decent friend, although not a close one. They've certainly never harmed you in any way. Then, by some accident or other, you find out about this exotic culture, and discover that whenever you thought your friend was smiling at you, he was actually expressing contempt.

Would you feel insulted? Should you feel insulted?

Last time about this I promise

I mean the weasel stuff. Well, last time for at least a little while. Toy models of evolution (even as simple as the weasel) are very cool in that they show you how powerful selection is in "overcoming" the complete randomness of mutations. In particular, it is worth keeping in mind that--despite the misrepresentations of some of the intelligent design crowd--the algorithm never "locks in" a character that happens to be exactly righ. The right characters also mutate, at the same rate as the wrong ones, and yet this is no impediment to evolution.

But toy models that are too simple are vulnerable to one particular line of attack: that even though the execution of the process is unguided, design is nevertheless "smuggled into" it via the fitness function. I think it's important to remember that it's incorrect to defend simple genetic algorithms against this attack. With respect to a lot of them (the weasel included), this objection is accurate. But that's just because they are too simple to capture important parts of the evolutionary process. The objection that design is present in the fitness function is wrong with respect to the actual evolution (and more ambitious genetic algorithms) because fitness function only specifies the goal that competing organisms are supposed to achieve, not the means through which they actually reach that goal. And it's only the latter that can be meaningfully called "design." The weasel is so crude that those two categories are actually indistinguishable in it--the goal is to become a string "METHINKS IT IS LIKE A WEASEL," and the fittest organism is the string "METHINKS IT IS LIKE A WEASEL." The point here is that while the weasel is fun, it's not a good poster boy for evolution. If you want an analogy for the evolutionary process couched in terms of computer code and a Shakespeare phrase, think of it this way. The organisms that evolve are not strings of letters but bits of computer code. Their goal is to evolve into the most efficient weasel program (where efficiency can be defined in terms of minimizing number of generations to convergence, or CPU time, or some linear combination of the two). Now it's easy to see the difference between fitness function and the fittest organism. The goal is simple: produce the string "METHINKS IT IS LIKE A WEASEL" as fast as you can. But stare at the fitness function as long as you want, and you will not be able to tell from it how the actual fittest program is going to work. If someone ran this algorithm, I'm pretty sure the winning program would look unlike anything anyone had expected.

Wednesday, August 3, 2011

An even better one

Here's the new and improved weasel program. It removes a major inefficiency of the version I posted yesterday, in that in any given generation only one string was reproducing. Since in any generation (except of course the last two of them), the content of the fittest string need not be unique, it could speed up evolution a lot if we allow all maximum fitness strings to reproduce. The program below does just that. Now with the number of offspring = 100 and a mutation rate of 5%, it never takes more than 30 generations to achieve convergence. The output of R code below displays all maximum fitness strings from each generation.

# A Version of Dawkins' Weasel in R
# (c) 2011 Przemyslaw Nowaczyk
 
Weasel <- function(phrase,num.copies,mutation.rate) {
  Score  <- function(x,y) {sum(x==y)}
  Output <- function(x,y,z) {cat(x,y,z,"\n")}
  alphabet <- toupper(c(letters," "))
  split.phrase <- unlist(strsplit(phrase,""))
  new.phrase   <- as.matrix(sample(alphabet,size=nchar(phrase),replace=TRUE))
  max.fitness  <- Score(new.phrase,split.phrase)
  generation   <- 0
  while (max.fitness < length(split.phrase)) {
    offspring   <- new.phrase[,rep(1:ncol(new.phrase),num.copies)]
    mutant.flag <- mat.or.vec(nrow(offspring),ncol(offspring))
    mutant.flag <- sample(c(0,1),prob=c((1-mutation.rate),mutation.rate),
                          replace=TRUE,size=(nrow(offspring)*ncol(offspring)))
    offspring[mutant.flag==1] <- sample(alphabet,size=sum(mutant.flag),
                                        replace=TRUE)
    fitness <- apply(offspring,2,Score,y=split.phrase)
    fit.id  <- which(fitness==max(fitness))
    new.phrase  <- as.matrix(offspring[,fit.id[1:length(fit.id)]])
    max.fitness <- max(fitness)
    generation  <- generation + 1
    apply(new.phrase,2,Output,y=generation,
     z=round((max.fitness/nchar(phrase))*100,digits=2))
  }
}
 
# sample run with timing
system.time(Weasel(phrase="METHINKS IT IS LIKE A WEASEL",num.copies=10,
                   mutation.rate=0.01))

Created by Pretty R at inside-R.org

Tuesday, August 2, 2011

Weasel

Dawkins' weasel is a toy model of evolution in which the goal is to write an algorithm that evolves the phrase "METHINKS IT IS LIKE A WEASEL" out of a random string of 28 characters via random mutation and non-random selection. The one constraint on the algorithm is that you're not allowed to "lock in" characters; i.e. if one of your strings happens to contain the right character in the right position, you can't exclude that character from the possibility of mutating.

I wrote a weasel program in R, in which the "evolution" proceeds as follows: you draw a random string of 28 characters; the string "breeds" n "offspring," but each character in each of the offspring strings has a probability m of mutating into any character of the alphabet; each mutated string gets a fitness score which is simply the number of same characters in the same position as in the target string; (one of the) strings with the highest fitness survives and breeds in the next generation while the rest are erased.

Below is a sample run of an R-weasel with the number of offspring = 100 an mutation rate = 0.05 (the number to the right of each string is its fitness score):

1 L Z F Z N Y O F N O Z E B I X N P X H B O P U M L A 1
2 L Z F Z N Y O F N O Z E B I N P X H K O P U I L A 2
3 L Z F Z N Y O F N O D E B I N P X H K O P U I L L 3
4 L Z F Z N Y O F N O D E B I L P X H K O P U I L L 4
5 L Z T Z N Y O F S O D E B I L P X H K O P U I L L 5
6 L Z T H N Y O F S O D E B I L P X H K O P U I L L 6
7 L Z T H N Y O F S O D E B I L P X H K O P U I L L 6
8 L Z T H N Y O F S O D E I I L P X H K O P U I L L 7
9 L Z T H N Y O F S O D E I S L P X H K O P U I L L 8
10 L E T H N Y O F S O D E I S L P X H K O P U I H L 9
11 L E T H N N O F S O Q E I S L P X H K O P U I H L 10
12 L E T H N N O S S O Q E I S L P X H K O P U I H L 11
13 L E T H N N O S S O Q E I S L P K I K O P U I H L 12
14 L E T H N N O S S O Q E I S L P K I A P U I H L 13
15 L E T H N N O S S A T E I S L P K I A P U I H L 14
16 L E T H N N O S S A T E I S L P K I A P U M E L 15
17 L E T H N N O S S A T X I S L P K I W P U M E L 16
18 L E T H N N O S S A T X I S L P K I W P U M E L 16
19 L E T H N N O S U A T X I S L P K I W P U M E L 16
20 L E T H N N O S U A T X I S L P K A W P U M E L 17
21 L E T H N N O S U B T X I S L P K A W P U M E L 17
22 L E T H I N O S U B T X I S L P K A W P U M E L 18
23 L E T H I N O S U N T X I S L P K A W P U M E L 18
24 L E T H I N O S U N T G I S L P K A W P U M E L 18
25 M E T H I N O S U N T G I S L P K A W P U M E L 19
26 M E T H I N K S U N T G I S L P K A W P U M E L 20
27 M E T H I N K S U I T G I S L P K A W P U M E L 21
28 M E T H I N K S I T G I S L P K A W P U M E L 22
29 M E T H I N K S I T U I S L I K A W P U G E L 23
30 M E T H I N K S I T U I S L I K E A W P U G E L 24
31 M E T H I N K S I T U I S L I K E A W P U G E L 24
32 M E T H I N K S I T U I S L I K E A W P U G E L 24
33 M E T H I N K S I T U I S L I K E A W P U G E L 24
34 M E T H I N K S I T U I S L I K E A W P U G E L 24
35 M E T H I N K S I T U I S L I K E A W P U G E L 24
36 M E T H I N K S I T U I S L I K E A W P U G E L 24
37 M E T H I N K S I T I S L I K E A W P U G E L 25
38 M E T H I N K S I T I S L I K E A W I U G E L 25
39 M E T H I N K S I T I S L I K E A W M A G E L 26
40 M E T H I N K S I T I S L I K E A W E A G E L 27
41 M E T H I N K S I T I S L I K E A W E A G E L 27
42 M E T H I N K S I T I S L I K E A W E A G E L 27
43 M E T H I N K S I T I S L I K E A W E A G E L 27
44 M E T H I N K S I T I S L I K E A W E A G E L 27
45 M E T H I N K S I T I S L I K E A W E A G E L 27
46 M E T H I N K S I T I S L I K E A W E A G E L 27
47 M E T H I N K S I T I S L I K E A W E A G E L 27
48 M E T H I N K S I T I S L I K E A W E A G E L 27
49 M E T H I N K S I T I S L I K E A W E A G E L 27
50 M E T H I N K S I T I S L I K E A W E A G E L 27
51 M E T H I N K S I T I S L I K E A W E A G E L 27
52 M E T H I N K S I T I S L I K E A W E A G E L 27
53 M E T H I N K S I T I S L I K E A W E A G E L 27
54 M E T H I N K S I T I S L I K E A W E A G E L 27
55 M E T H I N K S I T I S L I K E A W E A S E L 28
user system elapsed
0.09 0.00 0.10

This is not a typical run; it's on the shorter side (for these parameters the median length is something like 70). Note how fast it converges though; R can be quite fast f you do things in vectors and matrices rather than loops.

The next step is to allow the strings to mate and swap their genes.

R code for the weasel is below the fold.




# A Version of Dawkins' Weasel in R
# (c) Przemyslaw Nowaczyk 2011

score <- function(x,y) {sum(x==y)}

weasel <- function(phrase,no.kids,mutation.rate) {
  alphabet <- c("A","B","C","D","E","F","G","H","I","J","K","L","M","N",
                "O","P","Q","R","S","T","U","V","W","X","Y","Z"," ")
  split.phrase <- unlist(strsplit(phrase,""))
  new.phrase   <- sample(alphabet,size=nchar(phrase),replace=TRUE)
  distance     <- score(new.phrase,split.phrase)
  generation   <- 0

  while (distance < length(split.phrase)) {
    m.newph     <- as.matrix(new.phrase)
    offspring   <- m.newph[,rep(1,no.kids)]
    mutant.flag <- mat.or.vec(nrow(offspring),ncol(offspring))
    mutant.flag <- sample(c(0,1),prob=c((1-mutation.rate),mutation.rate),
                          replace=TRUE,size=(nrow(offspring)*ncol(offspring)))
    offspring[mutant.flag==1] <- 
      sample(alphabet,size=length(mutant.flag[mutant.flag==1]),replace=TRUE)
    scores <- apply(offspring,2,score,y=split.phrase)
    new.phrase <- offspring[,which(scores==max(scores))[1]]
    distance   <- score(new.phrase,split.phrase)
    generation <- generation + 1
    cat(generation,new.phrase,distance,"\n")
  }
}

# sample run with timing
system.time(weasel(phrase="METHINKS IT IS LIKE A WEASEL",no.kids=100,
                   mutation.rate=0.05))
Created by Pretty R at inside-R.org

What's the square root of William Lane Craig?

I heard the following quote in a debate to which one party was a philosopher and Christian apologist William Lane Craig (no link, he's easy enough to find if you're into that sort of thing):
Mathematicians recognize that the existence of an actually infinite number of things leads to self-contradictions. For example, what is infinity minus infinity? Mathematically, you get self-contradictory answers.
Assuming that Craig's premise ("Infinity minus infinity is undefined") is true, his argument is ridiculously wrong. To see this, replace his premise with another (true) one, and watch it lead to an absurd conclusion:
Mathematicians recognize that the existence of a number that represents null leads to self-contradictions. For example, what is zero divided by zero? Mathematically, you get self-contradictory answers.
Craig is confusing coherence with applicability. Yes, the division function is undefined for the pair (0,0); but this doesn't mean that "zero" is a self-contradictory concept. Similarly, the fact that the subtraction function is undefined for the pair (infinity,infinity) does not mean that the concept "infinity" is nonsensical. There doesn't exist a single relation defined for all possible things in the world, so when you're talking about relations, you need to remember to stick to their respective domains. If you don't think this is an important distinction, I have a puzzle for you. It's the title of this post.

Saturday, July 30, 2011

If statistical packages were books

Which books would they be? Here's what I think:

1. SPSS: Dan Brown, The Da Vinci Code (hardcover edition)

Best summed up by a quote from Homer Simpson: "You take forever to say nothing!" There are people out there who actually think this is a great book. The rest of the world thinks those people are crazy and, while no one goes as far as to advocate isolating them, no one lets them babysit their children either. To make up for its fatal flaws in narrative, historical plausibility, character development, and a laughable plot, the book is also very expensive.

2. Microsoft Excel: J.R.R. Tolkien, The Hobbit

This is a book everyone has read and enjoyed, though no one is bragging about it. Despite being so low-brow, however, this is actually a very decent book. As long, of course, as you take it for what it is; some read it as though it were The Lord of the Rings, which can lead to bitter disappointment.

3. Stata: Terry Pratchett, Discworld

It's a niche book that all of its readers for some reason think is mainstream. It's an incredibly fast and entertaining read, but don't let that fool you: it's full of profound insights and reading it can be an unexpectedly powerful experience.

4. SAS: The Bible

Everyone has a copy, but no one remembers how they got it. It's everyone's answer to "What's the greatest book of all time?", but no one is sure why. It's an incredibly hard book to read, but common wisdom claims that if you understand it, you can find in it things that no other book can offer. Those who do understand it and have found these things, however, seem to be unable to effectively communicate their experience; and if you ask them to, they'll usually tell you to go back and read the book yourself. It's written in style that requires four paragraphs to say "Hello." Nothing is what it seems and no one does anything expected. Every once in a while, however, it will offer a passage that will answer one of your deep questions or solve one of your deep problems. And then, as soon as you try to tell someone about what happened, you'll find that they just can't understand.

5. R: Leo Tolstoy, War and Peace

It's long. It's one of the longest books ever. Takes forever to read. It's so damn long that many times you'll be convinced there's no way you can finish it. In addition, Tolstoy fans (as opposed to Pratchett fans) can be quite an annoying and pretentious crowd. Everyone would like their friends to think they've actually read War an Peace. But hey, don't blame Tolstoy for it: the book is great. Sure, it could be simpler and shorter. But it has a lot to offer. It can make you think differently about what you thought you already knew. It can make you notice that things you previously took for solutions to problems are actually nothing more than one-time acts of desperation. And every once in a while, it can even entertain you.

Wednesday, July 27, 2011

The ideal solution would be to starve

Here are brief excerpts of an interview with Mark Meckler, leader of the largest Tea Party group.
Is there any scenario where you think it would be OK to raise the debt ceiling?
No.
What do you think is the ideal solution to this impasse right now?
The ideal solution is to cut spending so that we stop spending beyond our means.
Now the 2011 federal budget is $3.7 trillion, of which about $1.5 trillion has to be borrowed. Correct me if I'm wrong, but it seems to me that Mark Meckler thinks that we should cut federal spending by 40%, this year. Why would anyone take this guy seriously?

Tuesday, July 19, 2011

Innumeracy, big time

A New York City-based organization called the Coalition for the Homeless is currently running a TV public service announcement in which they say:
Which is more disturbing: That each night in New York City, more than 40,000 people are homeless, or that the average age of a homeless person is 9?
(Or something to that effect. I'm paraphrasing, but the figures are quoted accurately.)

If the avarage age of 9 strikes you as implausible, you're right. The very same Coalition for the Homeless lists the following as one of the basic facts about homelessness:
In New York City... Each night more than 40,000 people--including more than 16,000 children--experience homelessness.
This basic fact makes the average age of 9 an arithmetic impossibility. 16,000 is 40% of 40,000; so even if each age category (children and adults) is assumed to have the lowest average age possible (1 and 18, respectively), the average age of a homeless person would be 11. But of course these assumptions are empirically completely implausible, which means that the average age of a homeless person is not only certainly greater than 9, but most likely much more so. Assuming group averages of 3 and 30, for example, gives an overall average of 19. The only nationwide data that I have been able to find is here, from which the average turns out to be about 32 (see Exhibit 5-3 on page 43).

How's that for innumeracy?

Friday, July 15, 2011

The handshake is definitely secret

The way in which the name LaTeX is pronounced often serves as a secret handshake: If you've never used LaTeX but your resume says you did, you'll most likely give yourself away during a job interview by pronouncing the name incorrectly. Is this intentional?

Thursday, July 14, 2011

The 'genetic or voluntary' false dichotomy

It's a very irritating one because it is so glaringly false. Example: in arguments concerning homosexuality, it's often assumed that if this orientation is not genetic, it must mean that it's a "lifestyle choice."

My native tongue is Polish. That's the way I am; I had precisely zero choice in this matter. Are you really telling me that this implies there must be a gene regulating things like that? I assure you there isn't. You can sequence my genome till kingdom come and you will never find a 'Native Tongue' gene with a value set to 'Polish' anywhere in there.

Tuesday, July 12, 2011

Hypocrisy anyone?

I've recently heard one of the leaders of Polish opposition assure voters that if his party wins the elections, they'll change the law so that in the time of a severe economic crisis, the government will be required to create a certain amount of public sector positions and recruit the unemployed to fill them. Those positions, the politician said, should be targeted especially towards recent college graduates in search of their first job.

So let me get a few things straight here. Public education in Poland (including college education) is funded entirely by the state. Politicians (also those from the very same party) defend this status quo fiercely, and one of their main arguments is that investing in human capital makes sense because it reduces unemployment. In other words, they're saying that the state should fund students' college education, because if it doesn't, they'll have trouble finding jobs. And also that if an education that was state-funded because it helps find jobs, doesn't help find jobs, then the state should fund jobs.

Why don't we skip the education silliness altogether and just give everyone a public sector job when they turn eighteen?

Saturday, July 9, 2011

Is ignorance the worst evil?

If we care about the common good, then reason will clearly tell us what moral code to follow: it will tell us to follow the rule utilitarian moral code. But if we have no concern for the common good, then reason cannot tell us to follow this moral code (or any other).
Those are the concluding words of a paper in which John C. Harsanyi, one of the greatest economists and philosophers ever, summarized his groundbreaking game-theoretic research in moral philosophy. It probably was not his intention, but those words I think sum up the reason why all of the moral codes we have ever evolved are essentially irrational. A rational code of ethics, whether utilitarian or some other type, is a luxury that we as species simply could not afford, because reason can guide moral choices only in situations when everyone involved "cares about the common good". For beings who all want to be good but cannot reach a consensus as to exactly what kind of actions make good things happen, rule utilitarianism is indeed the answer. In this type of world, the worst evil is caused by lack of knowledge as to how various possible rules constraining individual behavior affect that behavior in the long run. Religious dogmas are a good example of such ignorance, as are almost all other moral systems of the deontic variety (i.e. those positing that following moral rules is a value for its own sake). In Harsanyi's world, moral rules evolve not because people think they are an unqualified good, but because too much utilitarianism can be a bad thing. If I gain more utility out of using your car than you lose because of my stealing your car, then simple-minded utilitarianism says it's OK for me to steal your car. This leads to less utility in the long run than we'd have in a world where it's not OK to steal a car from someone just because you think you'd enjoy it more than the owner. Hence we should have a moral rule saying it's not OK to steal.

Such concerns, however, are not the main reason why moral rules evolved in our world. In our world, the worst evil is the result not of ignorance but of deceitful malice. In our world, there are those who not only have no concern for the common good, but who actively seek to hurt others while pretending to be good. Harsanyi's world is a coordination game, or at worst a stag hunt, whereas the real world is a prisoner's dilemma. In a repeated prisoner's dilemma, bright line rules are the only way for a society of cooperators to protect itself from cheaters, even though bright line rules have dire side effects such as unforgiving dogmatism and lynch mob mentality. In our situation, those consequences are a price worth paying. Our ethics are indeed irrational; but it's not because we lack insight, but because the worst enemies of our society are not "moral imbeciles" but moral predators.