## The Evil, Imprecise, Confusing Metric System

humorous blog
. It's not recent, but it's silly enough that it's worth pointing
out even now. I'm not one hundred percent sure that this isn't a parody. Looking at
the blog as a whole, I think it's serious. Pathetic, but serious.

According to scientists, The French / Eurotrash "metric" system is in a state of crisis today, as scientists discovered that the weight of the "kilogram" is flip-flopping faster than John McCain at an episcopalian rally.

The Kilo - a unit with an identity crisis: This is one of the approximately 30 standard kilograms stored in a French castle. The polished metallic pellet a the center of this contraption is made of an alloy of precious metals, provided at government expense. Only in Europe would government subsidize such folly!

Since Europe converted to the metric system a few years back, this could have a grave impact on that continent's faltering economy. Imagine a situation where customers wishing to buy some meat, or fill their car with gas literally have no idea how much their goods will cost, simply because nobody knows the exact definition of a weight.

Jesus, the humble carpenter no doubt used a ruler to measure his wood every day, however the Bible clearly states that he had no need of the metric system.

How much simpler life would be if we only adopted the standard units of weights and measures mentioned in the King James Bible? Biblical measures are authorized by God, and like God are not tied down to fickle matter. This is yet another example of how Science only really makes sense when it is rooted in the Bible.

## Building up more: from Groups to Rings

If you're looking at groups, you're looking at an abstraction of the idea of numbers, to try to reduce it to minimal properties. As I've already explained, a group is a set of values with one operation, and which satisfies several simple properties. From that simple structure comes the
basic mathematical concept of symmetry.

Once you understand some of the basics of groups and symmetry, you can move in two directions. You can ask "What happens if I add something?"; or you can ask "What happens if I remove something?".

You can either add operations - which can lead you to a two-operation structure called a ring; or you can add properties - in which the simplest step leads you to something called an abelian group. When it comes to removing, you can remove properties, which leads you to a simpler structure called a groupoid. Eventually, I'm going to follow both the upward and the downward paths. For now, we'll start with the upward path, since it's easier.

Building up from groups, we can progress to rings. A group captures one simple property of
a set of number-like objects. A ring brings us closer to capturing the structure of the system
of numbers. The way that it does this is by adding a second operation. A group has one operation
with symmetric properties; a ring adds a second symmetric operation, with a well-defined relationship
between the two operations.

## The Meaning of Division: Quotient Groups

After that nasty diversion into economics and politics, we now return to your
regularly scheduled math blogging. And what a relief! In celebration, today I'll give
you something short, sweet, and beautiful: quotient groups. To me, this is a shining
example of the beauty of abstract algebra. We've abstracted away from numbers to these
crazy group things, and one reward is that we can see what division really means. It's
more than just a simple bit of arithmetic: division is a way of describing a fundamental

## Insurance: Why it sucks

Look folks, I don't want to become an economics blogger! Stop sending me economics questions. I hate to disappoint my readers and not answer their questions, but this economics stuff is almost terminally dull to me.

The mortgage posts have gotten an insane amount of traffic, which has in turn brought in a huge number of questions. Most of them are about details of the whole mortgage situation - and honestly, I can't answer those. I don't know the details, only the basics, and I can't explain what I don't know.

On the other hand, a lot of people have used my down-to-earth explanation of the mortgages as
a springboard to ask for a similar explanation of another issue that's been getting a lot of attention in America - insurance. Why is health insurance such a big problem?

I'm going to focus specifically on the insurance part. There are plenty of things wrong with the
American medical care system. But I'm going to focus specifically on how insurance works, and
how simple min/max calculations led to the current situation.

## Responding to a FAQ: What is Tranching?

I've received an amazing number of requests in the short period of time since my last post to
explain "Tranching". I mentioned it off-handedly, but a lot of people have heard about its role in the
whole sub-prime mess, and wanted to know just what it means. I don't particularly like writing
about economics; it's just not my bag. But enough people are asking that I feel like I need to answer the question. But this is it folks - no more of this nonsense after today! There are plenty of other people writing about this, who know more about it, and who are more interested in it, than I am.

It's also a relatively simple idea. You've got a bundle made up of, say, 100 loans. You want
to sell at least part of that bundle as a super-safe rated investment. But because it's formed from
risky loans, you know that at least some of them are likely to default.

So what you do is divide it into tiers called tranches. Suppose you've got 5 tiers - levels 1
through 5, where 5 is the top tier, and five is the lowest. Each tier covers a part of the bundle. So you might sell 20% of each tier. When the loans are repaid, the way that it works is that tier 1 is repaid first. When tier 1 is fully repaid, then you start paying tier 2, and so on. You can think of it like an overflowing cascade: repayments go to tier one; when it's full, the overflow goes to tier 2; when that's full, the overflow goes to tier 3, and so on. So if anyone doesn't repay the money,
the people holding the lowest tier, T5, lose everything before T4 loses anything, and so on up the stack.

Let's look at an example. Suppose you sell \$100 million worth of loans. You divide it into
5 tranches. So you sell \$200,000 of the value of the loans as tier 1, \$200,000 as tier 2, etc.

1. During the first year of the loans, \$100,000 is expected to be repaid, and \$100,000 is
repaid. Each tier gets \$20,000.
2. During the second year, \$100,000 is expected to be repaid, but repayment falls short. Only
\$90,000 is repaid. Tiers one, two, three, and four each get their \$20,000; tier 4 takes
the loss, and only gets \$10,000.
3. During the third year, things get worse - only \$50,000 gets repaid. Tier one and two each
still get \$20,000. Tier three loses half of its expected payment, collecting \$10,000. Tiers
three and four get nothing.

Tranching is a good idea. Once again, it's a good way of dividing risk. Anyone who invests in risky
loans is taking a chance, but tranching let you divide the chances up, so that people who want safety
can buy the top tranches, get less of a profit, but know that they're not going to get screwed unless
things really go seriously bad; people who are willing to take their chances in the lower tranches know
that they're taking a significant risk, but they can potentially make a lot more money.

The key, though, is dividing into tranches properly. If, as in the example above, you had five tranches, each taking up 20% of the pie, then the top tranch would be pretty safe: you'd have to lose 80% of the value of the loans before that tranch lost anything - and in mortgage loans, even
shitty ones, losing 80% of the value would be quite extraordinary.

But that's not how banks set things up. Remember that you've got investors practically begging to
get their grubby little paws onto these high-return, low-risk bonds. But it's really only the upper tranch that people wanted. The lower tranches - especially the lowest - were hard to get rid of. So, what the banks did is, once again, screw around with things. Some bundles of shit loans were divided into tranches where 80% of the value of the loans were sold as
tip-top ultra-safe investments. That means that if a package of crappy high-risk loans loses 20% through
loan default and foreclosure that the principal of the ultra-safe investments are going to be
lost. That's not what any sane person considers "ultra-safe".

And then, they took the bottom tranches, and re-bundled them. Take the bottom tranch from a hundred different packages of shit loans, bundle it into a new set of bonds, and re-tranch it. Then sell the top 80% of that as the top tranch of a bundle. And so on. In many cases, the investors have no clue how many levels of re-bundling are going on to create their top-tranch low-risk bond. And you've got all sorts of people who thought they were buying conservative investments who are now stuck with their money invested in bundles of low-tranch shit loans.

## The Total Stupidity of Crowds: Bad Mortgages and Circular Solutions

Reading the news lately, I've come across an amazing example of how ubiquitous bad math can be used. Most of you have probably heard about what's been called "the sub-prime crisis". Despite a lot of media hand-wringing about how complicated it all is, the sub-prime crisis is really a very simple phenomenon: basically, you've got a lot of banks that have loaned out money without worrying about whether or not it could get paid back, and now those loans aren't getting paid back, which is causing all sorts of grief to people who invested in them.

## Collective Noun for Geeks

Here at ScienceBlogs, we have a back-channel where the bloggers can get together and chat. In one of our threads, I was telling a story about work, and an interesting question came up. What's the collective noun for a bunch of geeks?

Collective nouns are cool and funny. Some of them are straightforward: a herd of cows, a pack of wolves. Some are goofy: a wake of vultures, a destruction of cats (that's north american wildcats), an ostentation of peacocks. And there are some fascinating ones: a parliament of ravens, an exaltation of larks.

I don't know of any good collective noun for a bunch of geeks. But I think we need one! So what should it be? Fire away in the comments.

## Macros: why they're evil

I've gotten both some comments and some e-mail from people in response to my mini-rant about Erlang's macros. I started replying in comments, but it got long enough that I thought it made sense to promote it up to a top-level post. It's not really an Erlang issue, but a general language issue, and my opinions concerning it end up getting into some programming language design and philosophy issues. If, like me, you think that things like that are fun, then read on!

## Records in Erlang

One of the things I discovered since writing part one of my Erlang introduction is that Erlang has grown a lot over the last few years. For example, the idiom of tagged tuple as a way of creating a record-like structure has been coded into the language. There is, unfortunately, a bit of a catch. They aren't really added to the language. Instead, there's a pre-processor in Erlang, and records
are defined by translation in the pre-processor. This to me typifies one of the less attractive
attributes of Erlang: much of Erlang has a very ad-hoc flavor to it. There are important high-level features - like record data and modules - which aren't really entirely part of the language. Instead, they're just sort of spliced in however it was easiest for the implementors to cram 'em in. And there are other things that were added to later versions of the language that, while first class, are awkward - like the "fun" prefix for first-class functions.

The effect of that kind of thing is mainly syntactic. The implementation is good enough that
even though things like records are really pre-processor constructs, they feel almost as
if they're built-ins.

Anyway - let's take a look at records.

## Symmetric Groups and Group Actions

In my last post on group theory, I screwed up a bit in presenting an example. The example was using a pentagram as an illustration of something called a permutation group. Of course, in
my attempt to simplify it so that I wouldn't need to spend a lot of time explaining it, I messed up. Today I'll remedy that, by explaining what permutation groups - and their more important cousins, the symmetry groups are, and then using that to describe what a group action is, and how the group-theory definition of symmetry can be applied to things that aren't groups.

Older posts »

• Scientopia Blogs