Wednesday, November 30, 2011


1. Old issues of Quantum, the magazine of math and science, and paper with the shortest abstract ("Probably not.") (H/T Mathematics under the Microscope) While the abstract is cute, it reads more like a conclusion than an abstract.

2. A talk by Marten Mickos (former CEO of MySQL). I enjoyed the part where he explains why working from home is harder than working at an office, because you can simply BS your way.

3. Daniel Kahneman at Google Talks.

Monday, November 21, 2011

Matlab: Profiler and parfor

Two videos on extremely-useful-but not-so-frequently-used features in Matlab.

1. Profiler: While "profiling" may be a bad word in common parlance, it is a good word in software. It helps you identify potential areas in your program that may be targets for optimization.

2. Parallel "for" loops: An easy way to exploit multicore (or distributed cores) machines for task-parallel computations. Useless trivia: I went to grad school with the person doing the video (Jiro Doke).

Saturday, November 19, 2011

Weekly LinkFest: Econ Edition

1. Steven Keen's lecture on the Great Recession. If you are interested in Behavioral Finance, you should check out the entire YouTube playlist.

2. While on the subject of behavioral economics, check out Dan Ariely's talk on "Money Changes Everything".

3. Michael Mauboussin is an amazing thinker. He works at Legg-Mason, despite the fact that his writing feels very academic (I mean that in a good way). Here is very nice collection of his articles, which are well-researched and neatly presented.

4. Surge in rich Chinese who want to come to the US.

Tuesday, November 15, 2011

Elite Institutions and Career Earnings

I finished reading Charles Wheelan's interesting book called "Naked Economics: Undressing the dismal science". It is a highly entertaining book for anyone with even a passing interest in how the world around us works. In tone, it resembles Freakanomics, but in terms of span, it feels much wider and more comprehensive, perhaps because it is not merely a collection of vignettes.

In one of the chapters, he points out to an interesting study by Krueger and Dale (2002). Graduates of highly selective schools earn higher salaries later in life than graduates of less selective schools. This does not seem very surprising.

Next, they examined the outcomes of students who were admitted to both a highly selective school, and a moderately selective school. The outcome (also the title of their 2002 paper) was that "Children Smart Enough to Get into Elite Schools may not need to Bother."

There is a more recent follow-up to that study, essentially reiterates the same conclusion.

The average SAT score of the most selective school a student applies to, is the best predictor of his or her future (monetary) success.

There is an important caveat. Minorities and other disadvantaged students gain the most from choosing an elite school over a less selective one.

Here's an interesting summary of what that means in practical terms:
Mr. Krueger gets the last word: 
My advice to students: Don’t believe that the only school worth attending is one that would not admit you. That you go to college is more important than where you go. Find a school whose academic strengths match your interests and that devotes resources to instruction in those fields. Recognize that your own motivation, ambition and talents will determine your success more than the college name on your diploma.
My advice to elite colleges: Recognize that the most disadvantaged students benefit most from your instruction. Set financial aid and admission policies accordingly.

Saturday, November 12, 2011

Bystander Psychology

Recent events at Penn State have no doubt been troubling.Time has an interesting article on bystander pschyology (subtitled: why some witnesses of crime do nothing). For those not in the know: the current wide-receiver's coach and a janitor saw Jerry Sandusky (an extraordinarily celebrated coach at Penn State) in compromising situations over a decade ago, but never called the police. From the article:
(We) would like to believe that no matter how small or scared we were, if we saw a child being raped, we'd step in and stop it, or at the very least call 911 immediately. But social psychology research on "bystander" behavior suggests that many of us might actually turn away.

The most famous instance of witness apathy involves the 1964 murder of 28-year-old Kitty Genovese in New York City. News accounts — and later, social psychology texts — said the victim and her screams were ignored by 38 witnesses as she was stabbed to death on a Queens street. (Genovese's killer was denied parole this week.)

But while research has shown that many such witnesses do fail to intervene, in part because they assume others around them will do so, it turns out that the popular account of the Genovese case is largely urban legend. There were not in fact 38 witnesses, but many fewer, and most onlookers said they did not see or hear the full assault; many of the witnesses did call police.

Still, says Mark Levine, a social psychologist at Lancaster University in the U.K., the Genovese story is a "very powerful parable. It taps into something people feel about human psychology, probably mistakenly: that somehow, when we're with other people, we lose our rational capacity or personal identity, which controls our behavior."

Wednesday, November 9, 2011

Tips on Plotting with Grace

Grace is a nice program to make journal-quality graphs. A while ago, I blogged about how to use it to make inset plots.

If you are a regular user of Grace, the following tips (which I gathered from here and here) can improve your productivity:

1. Make a template plot:

You can make default settings by opening Grace, making your adjustments, and saving the file as Default.agr in


If the .grace/templates folder doesn't exist, create it in your home directory.

I like to make my axes labels larger (usually fontsize 150) so that they are readable even when shrunk to fit a single column of a journal article. You can choose the font you like (I use Times-Bold).

In similar vein, I like my tickmarks and legends to be fontsize 125. I also like my symbols "filled".

Once you make a Default.agr, these settings are used anytime you open a blank Grace plot.

2. Default Printer:

I usually like to "print" ("export" in Grace) my graphs out in EPS format. While it would be nice to be able to do it in the Default.agr above, you cannot. However, you can create a file "~/.grace/gracerc.user" that simply contains the line


3. Font Tool:

Everytime you have to write a complex symbol in a textbox (while labeling an axis for example), you can press Ctrl + E, which opens up a Font ToolBox that lets you choose the symbol from a palette.

Short Cuts:
"\x a" produces "alpha" (\x is a proxy for \font{Symbol})
"\f{}" goes back to default font
"\2" is "\font{Times-Bold}"
"\S" is for superscript
"\s" is for subscript

Sunday, November 6, 2011

Weekly LinkFest

1. Roger Lowenstein on MF Global: I enjoyed his book "When Genius Failed: The Rise and Fall of Long-Term Capital Management", which informs this perspective.

2. The Divided Brain (RSA Animate)

3. Addiction is about the anticipation of reward: An interesting video. "Dopamine is about the pursuit of happiness." Watch it!

Friday, November 4, 2011

Bruce Lee

I was recently on a plane with a very entertaining colleague from Physics. He was talking with great animation (volume?) about some of his work, when a lady in front of us turned around and said with noticeable exasperation, "Sshhhh. I can't hear myself think!".

My friend quickly looked at her with feigned irritation, and said, "Think? Do you know what Bruce Lee said?".

"Don't think," he said, closing his eyes.

"Feel!", while he exhaled out a deep breath.

I couldn't help a chuckle.

Here's the (YouTube video) scene from "Enter the Dragon."

Wednesday, November 2, 2011

Two GNU Octave Tips

1. Changing directories 

The standard command looks very much like the *nix "cd".

cd NameOfDirectory;

But if "NameOfDirectory" was stored in a variable (DirName  = "NameOfDirectory";), then trying something like,

cd DirName;

would fail because Octave would try to literally look for a directory named DirName. In *nix command lines one would circumvent this issue by "cd $DirName", but this does not work in Octave.

The solution is to use parenthesis. So the following does the trick:

cd (DirName);

2. Quotes: One can use the system command to issue instructions to the shell from within a Octave program. So to list the files in the present working directory one would say:


However, if one wanted to use a Unix program or utility that itself uses quotes, then there are problems in parsing. So something like,

system('awk '{print $0}' infile > outfile')

would not work. The solution is again quite simple. Use double quotes which cause the argument within the double quotes to be interpreted. Hence,

system("awk '{print $0}' infile > outfile")

does what one would expect it to do.