New blog on visualisations

For a while now I’ve been commenting on visualisations on Twitter, pointing out the good (and especially bad) graphs. I also have a “chart of the edition” section in my newsletter.

Recently, the legendary Krish Ashok suggested that I collect all these bad visualisations in a Tumblr, and I decided to oblige.

You can follow it here.

I like Tumblr as a medium (no pun intended) for collecting pictures. The UI is not great (compared to WordPress), but in some way it encourages short posts, and that’s a great thing from the perspective of what I want to do. Go follow off!

Why I don’t like standup comedy

The other day, the wife was watching some standup comedy on Netflix when I walked by, and she asked me to stop and watch for a couple of minutes. Apparently the joke was funny.  Maybe it was, but those two minutes also taught me why I don’t like the genre. It’s the low “bit rate”.

Recently I read this book called The Design of Everyday Things. Among other things, it talked about why most people prefer reading to listening – because reading is much faster. We read at approximately 300 words per minute, while we can listen to a maximum of 50 words per minute. So minute-for-minute, you get a lot more information (in terms of words) from reading.

Which is why podcasts are hard to listen to unless you’re combining them with another activity, such as driving or commuting or exercising. If you’re only listening to a podcast and doing nothing else, you’ll get bored. Because the rate of information flow is low. In that sense, a good podcast offers much more than words – there will be information embedded in the voices, tones, any accompanying music, etc. so that more information can be transmitted to compensate for the low bit rate.

The same thing applies to video as well – the rate of flow of words is much lower than text, but the visuals more than compensate for it. In fact, good movies and shows (in my view) are those that overwhelm your senses with a high rate of flow of information that they keep you engrossed and occupied, and deliver “high information”.

So coming to standup comedy – the reason I don’t like it is because of its low bit rate. Most standup comics speak at a rate slower than Atal Behari Vajpayee, possibly because they want (canned) laughter during each of their pauses. So standup usually goes at well under 50 words per minute.

And there is nothing to compensate for this low bit rate. Visuals are flat – just a person standing on a stage and talking. There is very little action. In the samples that I’ve sampled, the jokes are nice but nothing extraordinary. And there is no information content – it’s just jokes for the sake of it. Finally, you are expecting to be told jokes all the time, and so there is no surprise in the timing of jokes.

So if it were up to me (I’m no standup comic, so it would be never up to me), how would I change it to make it more interesting? The first thing would be to convey additional information through the visual. The low verbal bit rate seems to be endemic to the genre, so that might be hard to change. So adding further information through better visuals can help.

Props might be a good first addition (from my experience with NED Talks, lecture demonstrations were very very well received). Better sets, maybe. Maybe some music (Shekhar Suman already had this with the “rubber band” on Movers and Shakers all those years ago). Anyway, I’m least qualified to comment on this except as a non-customer!

There’s one thing I’ve never understood about standup comics, though – why do they never use collar mikes?

The popularity of nicknames and political correctness

It is a rite of passage in an institution such as IIT (Indian Institute of Technology) that a first year student be given a potentially embarrassing nickname following “interaction” with senior students. The profundity of these nicknames varies significantly, with some people simply being given names that correspond to body parts in different languages, which others have more involved names.

Based on a conversation yesterday, the hypothesis is that more profound nicknames which are embarrassing only in a particular context are more likely to propagate, and thus stick, while the more crass names are likely to die out more easily.

The logic is simple – the crass names (a few examples being “lund”, “condom” and “dildo” – there is at least one person with each of these names in every hostel of every batch at IIT Madras) are potentially embarrassing for an “outsider” to use, and to be used in public. So when the bearer of such a name graduates and moves on to a new setting, the new people he encounters make a prudent choice to not use the embarrassing word, and the nickname dies a quick death.

When the nickname is embarrassing or derogatory for more contextual reasons, though, the name quickly loses its context and becomes incredibly simple for people to use. Take my own name “Wimpy”, for example – not too many people know it has an embarrassing origin, and it is a perfectly respectable word to shout out in public, or even in an office setting. And so it has propagated – in at least two offices I worked in, everyone called me “Wimpy”.

It is similar for lots of other “benign” names. But it is unlikely that a name like “condom” or “dildo” will propagate, and it is in fact more likely that even the people who bestowed such names upon the unsuspecting will stop using them once everyone graduates and moves on to a more formal environment.

There are exceptions, of course, a notable one being “Baada“. It is a cuss-word representing a body part, except that it is in a non-standard (though not small by any means) language, but everyone I know calls Baada Baada. He used to be my colleague, and people at work also called him Baada. It is unlikely that his nickname would’ve propagated, though, had it been the synonym in English or Hindi.

Thanks to Katpadi Katsa for discussions leading up to this post. In a future post, I’ll talk about models for propagation of nicknames across institutions.



Songs for sleeping

As I write this, Berry is fast asleep next to me. It took a long time, and a fair amount of effort, to get her to sleep, as has become the routine everyday. Finally, she fell asleep as Pink Floyd’s Comfortably Numb was playing. This was no coincidence. This is part of a careful sleeping routine I’ve developed over the last month.

It started with a bit of what I can describe as “reinforcement learning”. We were on the way to the airport sometime last month and Berry was getting cranky in the cab, so I started singing to her. On a whim I started singing Pink Floyd songs (maybe because I know the lyrics of a lot of them). She passed out halfway through Wish You Were Here. A couple of hours later on the flight, she felt drowsy during the same song, and then slept when I started singing Comfortably Numb.

So every time I found that she would sleep to a particular song, I started singing that the next time I was putting her to sleep. Obviously it didn’t work like that – her falling asleep was a random event, which I chose to infer was a cause of my singing. And I’m someone who gives lectures on not mistaking correlation for causation.

Singing got tiring, so soon enough I had created a playlist. The playlist to which she invariably falls asleep every day nowadays is called “lullabies“.

Here is what it looks like.

Now, you might just think that it’s a random list of Pink Floyd songs, with one LedZep song thrown in. It’s not. The songs have all been carefully selected.

The first set of songs have been chosen because they are heavy on lyrics, don’t have long instrumentals and are easy to sing along to. These are songs that play when Berry is about to fall asleep, and I sing them while patting her. And invariably she falls asleep during this time.

The next few songs are long soothing songs, that will keep her asleep until she gets into deep sleep. As I write this, Atom Heart Mother is playing.

But getting Berry to sleep is not easy. I don’t start the evening with these lullabies – they come in only when I know that Berry is sufficiently sleepy and will sleep in the next 10-15 minutes (like the closer in Baseball). When she comes into the bedroom, I start with this playlist that I created a couple of months back, and which I had then named as “Berry’s Education“. 

As you can see, Black Sabbath’s Iron Man heads this list. It is Berry’s favourite song. In fact, when she gets on to the bed, she says “has he lost his mind, appa”.

This playlist is not intended for sleeping, and I randomly choose a few songs to play. When Berry gets into the next stage of her slumber, where she is now ready to sleep, but not sleepy enough, she needs some lullabies. And it’s the time for Iron Man again, except this time it’s the version by RockaBye Baby.

This is the song she used to fall asleep to when she was a baby, from the time when she was barely a couple of days old. And from there I let the album play for a while until she is really ready to sleep. Which is when the lullabies playlist takes over.

As you might imagine, having multiple playlists is a pain. I normally use the kinda old iPad4 to play, and changing playlists means entering my passcode, going up one folder and then going into another playlist. You might wonder why I haven’t created one integrated playlist.

The reason is randomness, on two counts. The amount of time Berry takes to pass each stage of sleepiness is variable. So I don’t know how long I will have to play each kind of music. Also, she is moody and the way she reacts to each kind of music is a bit random. So I need to switch back and forth between the kinds of music, and so having multiple playlists is better.

On good days, I will have my phone with me, which makes it easier to switch playlists (one hand operation, touch ID to login etc) – though it’s invariably the iPad that plays the music.

So as you might have figured out, putting babies to sleep is not an easy task, which is why I’m sharing my method with you, in the hope that it might help you. What do you do to make your baby sleep?


The utility of utility functions

That is the title of a webinar I delivered this morning on behalf of Kristal.AI, a company that I’ve been working with for a while now. I spoke about utility functions, and how they can be used in portfolio optimisation.

This is related to the work that I’ve been doing for Kristal, and lies at the boundaries between quantitative finance and behavioural finance, and in fact I spoke about utility functions (combined with Monte Carlo methods) as being a great method to unify quantitative and behavioural finance.

Interactive Brokers (who organised the webinar) recorded the thing, and you can find the recording here. 

I think the webinar went well, though I’m not very sure since there was no feedback. This was by design – the webinar was a speaker-only broadcast, and audience weren’t allowed to participate except in terms of questions that were directly sent to me.

In the first place, webinars are hard to do since it feels like talking to an empty room – there is no feedback, not even nods or smiles, and you don’t know if people are listening. In most “normal” webinars, the audience can interject by raising their hands, and you can try make it interactive. The format used here didn’t permit such interaction which made it seem like I was talking into thin air.

Also, the Mac app of the webinar tool used didn’t seem particularly well optimised. I couldn’t share a particular screen from my laptop (like I couldn’t say “share only my PDF, nothing else” which is normal in most online chat tools), and there are times where I’ve inadvertently exposed my desktop to the full audience (you can see it on the recording).

Anyways, I think I’ve spoken about something remotely interesting, so give it a listen. My “main speech” only takes around 20-25 minutes. And if you want to know more about utility functions and behavioural economics, i recommend this piece by John Cochrane to you.

Linearity of loyalty rewards

So I’ve taken to working a lot in cafes nowadays. This is driven by both demand and supply. On the one hand I’ve gotten so used to working for my current primary client from home that I’m unable to think about other work when I’m at home – so stepping away helps.

Also on the demand side is the fact that this summer has been incredibly hot in London – houses here are built to trap in the heat, and any temperature greater than 25 degrees can become intolerable indoors. And given that cafes are largely air-conditioned, that’s an additional reason to step away from home to work.

On the supply side, there are three excellent hipster cafes within 200 meters of my house. Yes, I live in a suburb, though my house is very close to the suburb’s “town centre”. And all all these cafes make brilliant coffee, and provide a really nice ambience to work.

So far I’ve discovered that two of these cafes offer loyalty cards, and given my usage, neither makes a compelling reason to be loyal enough. The “problem” (in terms of retaining my loyalty) is that the loyalty card at both these places offer “linear rewards”.

Harris+Hoole has an app, which offers me a free drink for every six drinks purchased. Electric Coffee has a physical card, which offers me a free drink for every ten drinks I purchase. Now, the rate of reward here (I’m writing this sitting in Electric) is lower, which suggests that I’m better off patronising Harris+Hoole, but some variety doesn’t hurt – also I’m queasy about ending up and parking in the same cafe more than once in a day.

Even when I was writing my book in Barcelona two years ago, I would never go to the same cafe more than once a day, alternating between Sandwichez, Desitjos and this bar whose name I could never figure out.

Ordinarily, if I were a low intensity user, one drink for every N drinks ($math 6 \le N \le 10 $) would have been a sufficient reason to be loyal. Given my rate of consumption, though, and the fact that I go to both these cafes rather often, the incremental benefit in staying loyal to one of these cafes is fairly low. I can peacefully alternate knowing that sooner or later the accumulated ticks on my card or app are going to provide their reward.

It wasn’t like this last year, when I was briefly working for a company in London. Being extremely strapped for time then, I hardly patronised the cafes near home, and so the fact that I had an Electric card meant that I stayed loyal to it for an extended period of time. At my higher level of usage, though, the card simply is not enough!

In other words, rewards to a loyalty program need to be super-linear in order to retain a customer beyond a point. The current linear design can help drive loyalty among irregular customers, but regulars get indifferent. Making the regulars really loyal will require a higher degree (no pun intended ) of rewards.

PS: Given the amount of real estate hours I occupy for every coffee I buy, I’m not sure these cafes have that much of an incentive in keeping me loyal. That said, I occasionally reward them by buying lunch/snacks or even a second coffee on some visits.

PS2: As a consumer, loyalty card versus app doesn’t make that much of a difference – one clutters the wallet while the other clutters the phone (I don’t like to have that many apps). A business, though, should prefer the app, since that will allow them to know customers better. But there’s a higher fixed cost involved in that!


Scott Alexander, Bryan Caplan and Nitin Pai on fighting crime (feat. Matt Levine)

The basic idea is that coming down hard on a small number of high-profile crimes can have disproportionate effects in terms of curbing crime

It all started with the pseudonymous blogger Scott Alexander, in what seemed like a justification of outrage. Or maybe it started earlier – with a post by Bryan Caplan deploring outrage. Caplan was commenting about the propensity of people to jump on to bandwagons deploring seemingly minor crimes while not caring enough about worse crimes that were not in the public spotlight already. Caplan had then written:

I can understand why people would have strong negative feelings about the greater evil, but not the lesser evil. But I can’t understand why people would have strong negative feelings about the lesser evil, but care little about the greater evil. Or why they would have strong negative feelings about one evil, but yawn in the face of a comparable evil.

Now, while “Alexander”‘s response seems to justify outrage (and I’m no fan of online outrage), he did so with an interesting analogy, on how to curb crime when the police has limited resources. He writes:

[…] the police chief publicly commits that from now on, he’s going to prioritize solving muggings over solving burglaries, even if the burglaries are equally bad or worse. He’ll put an absurd amount of effort into solving even the smallest mugging; this is the hill he’s going to die on.

Suppose you’re a mugger, deciding whether or not to commit the first new mugging in town. If you’re the first guy to violate the no-mugging taboo, every police officer in town is going to be on your case; you’re nearly certain to get caught. You give up and do honest work. Every other mugger in town faces the same choice and makes the same decision. In theory a well-coordinated group of muggers could all start mugging on the same day and break the system, but muggers aren’t really that well-coordinated.

The police chief’s public commitment solves mugging without devoting a single officer’s time to the problem, allowing all officers to concentrate on burglaries. A worst-crime-first enforcement regime has 60 crimes per day and solves 10; a mugging-first regime has 30 crimes per day and solves 10.

And then it is again Caplan’s turn to respond. I’m bad at detecting satire, so I’m not sure if he is being serious (I don’t think he is). But he proposes a “sure fire way to end all crime”:

Step 1: Credibly announce that all levels of government will mercilessly prosecute the firstcrime committed in the nation each day.

Step 2: There is no Step 2.

But then, I’m sure that Nitin Pai is being serious in proposing a similar method to curb the spate of violent crime in India based on WhatsApp forwards. In his piece for the Quint, he writes:

the Home Ministry ought to use its considerable powers to tackle the problem. It’s not hard either. One well-advertised arrest, prosecution and sentencing will deter the cowards that comprise lynch mobs. Three high profile arrests and prosecutions – and see how quickly lynchings stop. The smallest police station in the remotest village can stop lynchings if the local sub-inspector has received clear political messages against it.

Finally, the reason why I figured Caplan’s “solution” is satire is because of this passage from Matt Levine’s excellent Money Stuff newsletter (likely it’s behind a Bloomberg paywall, but it’s free if you subscribe by email). Commenting about high frequency trading, Levine writes:

But the answer in actual U.S. market structure is, come on, there is no such thing as “the same time.” Do you know how many nanoseconds there are every single second? (A billion.) The odds that each of us would hit the “Buy” button at the exact same nanosecond are infinitesimal. So if I put in my order to buy the stock at 10:45:06.543210876 a.m., and you put in yours at 10:45:06.543210987 a.m., then I got there first and I win.

Is this a good answer? It has a simple appeal. It just gets rid of the question “who gets the stock if we put our orders in at the same time?” It replaces an economic question about how to allocate the stock with an empirical question of who got there first.

So the problem with fighting the first crime of the day, or year, or whatever, is that a criminal will know fully well, given a reasonably high enough crime rate, that the probability of his crime being recorded as the first in the year or day or whatever is less than one. And the higher the crime rate, the lower the probability that his crime will be recognised as the first one. And so there is a high chance he can get away with it.

And that is where Nitin’s idea scores. Rather than going after the “first crime”, pick a few crimes arbitrarily and “go after them like hell”. Since in this case most of the people who are forwarding dangerous forwards are “ordinary people”, this will likely shake them up, and we’ll see less of these dangerous forwards.

Cross posted from Pragati Express