Wednesday, June 24, 2009


A common theme in modern skepticism is how people naturally see causation where none exists. Got cancer and live near a phone tower? Must be evil vibes from the GSM network. Got a child with autism? Must be that damn MMR jab.

"But surely that's just something that crazy people do? Us nice normal skeptical folks would never put the cart before the horse," I hear you cry. Well, I'm sorry to break it to you, but it's a natural human trait. And the thing about natural human traits is they don't just affect the nutters; they apply to everyone...

An example from the world of martial arts. I used to do a lot of Karate, so I have a feel for how to punch, kick and otherwise mutilate an opponent. I haven't trained for years but, as a result of a change of location, I've decided to take up Taekwondo. My first lesson was yesterday.

So a few minutes into the lesson I'm kicking and blocking like mad, but it just doesn't feel right. I'm stiff, I'm tense, my techniques don't flow nicely. This sucks.

Now, one thing I've heard people tell beginners in a whole range of sports is "relax and your technique will improve". So I decide to consciously try this. I systematically unclench my arms and try a few more punches.

And amazingly... it completely failed to work. My arm muscles, not being trained for this kind of task, weren't able to throw my fists forward without over-punching (which bloody hurts). My untensed leg muscles weren't able to lift my feet above hip height.

This turns the old adage on its head. It's not a case of "relaxation leads to improved technique". It's more like "being out of practice leads to poor technique, and your weakened muscles tense up trying to compensate".

So correlation has been confused with causation, and the resulting expert advice turns out to be useless. I wonder how often this happens?

Read the full post

Friday, June 12, 2009

Stalinism ahoy!

As you may have noticed, I've been doing a bit of redecoration round the ol' blog. A new template, proper use of folds, and an upgrade to the new Blogger Layouts, should all combine to make the blog both readable and maintainable.

But that's just Phase 1 of the evil master plan...

For Phase 2, I'll be going back through the blog archives. In true Stalinist fashion, I aim to delete all the blogorrhea that's accumulated over the years: the whiney posts, the inappropriately rude posts, the posts that I clearly wrote after several pints of whiskey (it's amazing how the ability to type is always the last thing to go).

Whilst I'm at it, I'll add these new "tags" that all the cool kids are experimenting with. I'm really just a victim of peer pressure...

Phase 3 needs a bit more thought. Basically, I'll make a list of stuff I know just well enough to post about, and set up a poll or something to see what my - largely nonexistent - readers are most interested in.

Which neatly leads us to Phase 4. If I'm going to put more effort into this blog, it would be nice to know that someone is reading it. I know I'm never going to be Pharyngula, but I worry that if I spend too much time talking to myself I'll wind up in a padded cell. And those things don't even have wifi access.

In thinking about this, I've found that I don't really understand how blogs attract and retain readers. This is something I'll need to consider further.

Read the full post

Monday, June 08, 2009

I'm a weirdo

Today I walked about an hour out of my way to give blood. The sugar rush from the cookies afterwards has to be felt to be believed. I'm now awaiting receipt of that lovely letter they send out: "Thank you for giving blood. Unfortunately we cannot accept your donation because you have HIV, Malaria, Asian Bird Flu and at least two Hepatitis variants. Consult your local undertaker."

On the way home I saw a very small fledgeling bluetit that had apparently fallen out of its nest and waddled into the road. Needless to say, it was a little bit shellshocked. I picked it out of the road and stuck it in the bushes before it could metamorphose into a very wide fledgeling.

I wasn't able to help an old lady across the road, but only due to a regrettable shortage of old ladies in these parts. This being the North of England, where fat is the fifth food group, they probably all die young of coronaries or acquired diabetes...

These acts of madness are not isolated incidents. Only a couple of weeks ago, whilst on camping, I took half an hour of time out from the festivities to help the bloke in the next pitch put up his tent. And I'm no better in this respect (or worse, I hope) than the average guy on the street.

There was no obvious benefit to me from any of these. Apart from the cookies, the blood donation was just a very long-winded way to get mildly dizzy. Bluetits are not known for their gratitude, and this one gave me nothing but a mildly increased risk of Asian Bird Flu. And one of my (young, female, single) co-campers did comment "oh, you're so nice", but sadly she's not otherwise interested in me.

So why do we do this crazy stuff? Needless to say, I have a theory hypothesis . And it allows me to neatly illustrate a misunderstanding that many people have with evolutionary biology.

The key concept I'd like to introduce here is the difference between proximate and ultimate causes. Humans perform a great many activities that - considered in the short term - are daft in the extreme. Consider the well-known spike in mortality rates for people in their early 20s, due largely to deaths from violence (accident, homicide, suicide).

All told, the human race appears to consist of idiots who waste their time and life expectancy for no better reason than "I felt like it". We shall call this the proximate cause of their actions.

Occasionally people are able to justify their behaviour in terms of some longer-term plan. For example, I work for a financial company because I'd quite like to make lots of money, but I work in pensions rather than investment banking because I would prefer not to die of exhaustion by the age of 30. In this case, we say that the proximate cause is supported by prior causes.

Very occasionally, we can trace our chain of causes all the way back to some very fundamental cause like "I don't want to die young". At this point, logic has to get off and hop - as David Hume pointed out, you can't reason from "is" statements to an "ought" statement. I reckon that these low-level goals are hardwired into me by evolution, so the ultimate cause of my actions is reproductive fitness.

But what about situations, such as giving blood, where I myself can't see any link between action and reward?

Well, the important thing to realise is: just because I can't see a link, doesn't mean it ain't there. Anyone who put my life under a high-resolution microscope might observe that, in giving blood, I've probably endeared myself to many of my co-workers. By making this comparatively harmless sacrifice, I've demonstrated that I'm a good, upstanding, altruistic chap who is welcome to marry their sister.

Now it's important to note that none of this went through my head. I didn't think "hmm, let's manipulate my colleagues' feelings"; what I thought was "ooh, there's a blood drive on, I can go help save someone's life". My impulse to do good appears to be completely disconnected from any sense of the consequences.

But of course it's not disconnected at all. The impulse is a side-effect of how my brain is structured, and of how it was programmed when I was young (which is more or less a side-effect of how other people's brains are structured). My brain structure is controlled by my genes. My genes have spent 3.7 billion years avoiding being wiped out, and they've achieved this by producing survival machines (like me) that are comparatively successful.

The result is that our actions - our unthinking, instinctive, intuitive actions - are quite often smarter than we realise. No matter how dumb the behaviour, there's probably a shred of logic hiding behind it.

In short: maybe one day I'll rescue a baby bird and consequently attract a bird of the human variety.

Read the full post

Friday, June 05, 2009

Actuaries 101

So it occurs to me that, in my last post, I left one important question unanswered: what, in fact, is an actuary? What do they do, and why is it considered a remotely sensible use of time?

Actuarial science is best considered as forward-looking accounting. Traditional accountants look at what has happened in the past and try to figure out whether a company is broke or not. Actuaries look at what is likely to happen in the future and try to figure out whether a company will survive it all...

An example. Let's say that you send a ship to India to pick up some tea. You want to be sure that you don't go broke if the ship sinks. So you buy an insurance policy.

The company who sells you the policy has a dilemma: how much do they charge? If they charge too little for their policies then, in the long run, too many ships will sink and they'll go bust. If they charge too much, their competitors will steal all their trade. By this point, their stockholders are probably breathing down their neck for proof that the company is doing the right thing.

How do they handle this situation? They ask an actuary. The actuary will look through the mathematical literature on ship failures, consider the specific situation, and propose an actuarial model: a set of formulae that will put a price on that policy. The model may handle a number of factors - expected weather conditions at this time of year, age of ship, amount of maintenance done, even the professional opinion of engineers paid to examine the ship. The goal is to calculate a figure that will keep the company's "risk of ruin" - their chance of going bankrupt - below a certain level.

The three main areas of actuarial work are:

1) General insurance - dealing with the risk of expensive stuff breaking
2) Life insurance/assurance - dealing with the risk of people breaking
3) Pensions - dealing with the risk of people staying alive long after they've stopped earning

I mainly work in pensions, where the problem we deal with is that we don't know when someone will die. There are two different approaches to dealing with this:

1) Defined contribution schemes. These schemes hold a specified investment portfolio for each policyholder (PH), normally linked to the amount of money that the PH has fed into the scheme over the years. If, ten years down the line, all the scheme's investments fail, the PH just doesn't get much money. The hard part, then, is projecting the policy's value at date of redemption.

2) Defined benefit schemes. These set out in advance, according to some horrible messy formula, precisely how much money a pensioner will get. The hard part, then, is figuring out the amount of money the scheme needs to have right now in order to pay for all this. This is called scheme valuation and it is the subject of much actuarial thought, and of the heavy-duty actuarial software described in the last post.

In general, companies don't like DB schemes because, if the scheme's portfolio fails, the company has to carry the can. This is hard to allow for unless you have an unlimited source of money. So companies prefer DC schemes.

By contrast, governments are perfectly happy with DB schemes. After all, if the scheme needs more money, they'll just raise taxes. And having a deterministic formula for benefits makes negotiation with unions easier. In the UK, I suspect that this rather blasé attitude is likely to backfire at some point when the public realises how good the benefits are in the public sector...

Read the full post

Actuarial software

I now have a wonderful little tool called a dongle, which means that, even if my company persists in sending me to far-flung* locations, I can keep playing with teh intarwebz.

And I can keep bothering my readers (if any are still around) with pointless theorising. Bwahahahaha.

On with the show. My last post discussed actuarial software, specifically how hard it is to get hold of. Since then I've done a little bit of research on the subject...

Q: What is actuarial valuation software?

A: It's software that allows you to pull some numbers out of thin air ("make actuarial assumptions"), punch 'em into a standard statistical model, and thus figure out how much money your company needs to stockpile to ensure that employees get their promised pensions.

Q: Why not just use spreadsheet software?

A: Because many of the statistical models require incredible amounts of processing power. Also spreadsheets are too easy; if actuaries used them then we'd lose our aura of mystery.

(More seriously, these models are easy to screw up so it's best not to have the uninitiated trying their hand at them.)

Q: Why not use a general-purpose programming language?

A: Because actuaries generally don't think of themselves as programmers. Most of them can't code for toffee, and can't be bothered to learn - after all, that's not what gets them the big bucks. The purpose of actuarial software is to allow actuaries to program without actually needing to know any of the relevant concepts.

Q: Are the statistical models really worth all this effort?

A: Not really. There's no such thing as a crystal ball, and no such thing as an actuarial model that won't be blatantly wrong thirty years down the line.

A good example is smoking. A lot of the mortality rates we use are based on the tacit assumption that a sizeable proportion of the population has been inhaling plant-based tar for a lot of their life. Now that smoking is becoming less common in developed countries, our models can't always deal with the resulting increased life expectancy. See the intro to this article for an indication of how technical this can get.

So why do we bother? Let's get this straight: actuarial models will not allow you to prove that you're saving the right amount for your employees' retirement. However, it will allow you to prove that you're saving some money, and that the amount you're saving is justifiable.

This is of great interest to regulators, so they force pension schemes to jump through these hoops. It's like getting a degree from a prestigious uni - it doesn't actually prove that you've got two neurons to rub together, but it does make it a lot easier to filter out morons. Read up on information asymmetry for more info.

Q: Back to the main topic. What does actuarial software actually do?

A: Your standard actuarial software package will contain:

1) A bunch of standard actuarial algorithms, designed to predict e.g. mortality of pensioners.
2) A set of modules to handle country-specific or industry-specific regulatory requirements.
3) A lot of dainty footwork to allow things like distributed processing (important given how hefty some models are).
4) A user-friendly interface (remember, this has to be used by actuaries, who are generally not techies).

Q: And you're actually planning to produce all that???

Probably not. But it's an interesting goal to think about.

* This is Britain I'm talking about. In USA terms, this translates to "the other end of the state".

Read the full post