What Goes With Oatmeal? Today It’s Linear Algebra

Linear Algebra… doesn’t it sound so impressive?

When I was in my last year of high school, we had three options for math courses: calculus, statistics (called finite for some reason) and linear algebra. Honest to god, I skipped LA because it sounded so daunting (and wasn’t a strict prerequisite for any university programs I applied to).

So often intimidating jargon masks very simple procedures and concepts.

Well, I’m learning LA over breakfast today because matrix multiplication is the fastest way of comparing linear regression functions’ effectiveness (that’s what we’re hinting at, anyway). Matrix multiplication is actually so simple I’m not even going to bother with notes.

What’s interesting to me is why it’s useful in this context. Quite simply, it’s useful because somebody (somebodies) spent a bunch of time building super-fast matrix multiplication functionality in every imaginable programming language.

Now, I don’t know why people have designed super-optimal implementations of matrix multiplication, but it’s a pretty awesome public good. Did they do this before Machine Learning made selecting from among various linear regression algorithms was a problem to solve?

Realistically, it was probably a bunch of kids looking to do an awesome PhD dissertation: why not build a super-optimized matrix multiplication library?

Learning by solving problems. That’s what it’s all about. Hat Tip to Alan Kay.

A Teaching Moment

To my everlasting surprise, somebody made it far enough through some of my course notes to understand what on earth I was going on about.

I was forwarded a link to a real life implementation of xml. Actual examples are always nice to think through the implications of the theory.

But be forewarned, ye hapless Web denizens, this is a discussion not fit for all. Formatting reports for transferring retirement-related employee data among federal agencies. Has quite the ring to it, non?

Here’s the question: why and how do people use these tools?

The purpose of all this nonsense is to get machine readable data into the mothership system. Surely they’re choking on the fedex bills and warehouses of paper files. It’s the friggen 21st century after all.

XML does give you machine readable data. And it has this other benefit: it doesn’t really matter how you create it. Each government agency could format a report out of a sophisticated relational database or pay a legion of underemployed construction workers to handcode a text file. Either works as long as the format checks out.

So XML just plugs into your existing system (even if it’s a system of handwritten forms and carbon copies). Database systems are not quite so forgiving. You need a “new system”, in the most horrible, time/cost draining meaning of the term.

In this case, I’d speculate that the xml format is considered an early first step. It’s hardly feasible to lay the redundant paper-form jockeys off any time soon. Unions will make sure of that. But having a continuous corporate structure holds you back, too.

In more lightly-regulated process-heavy industries, most companies were either acquired or driven out of business before the haggard survivors finally completed their metamorphosis, which is actually never really complete. Google ‘COBOL programming language’ for an taste of the eternal duel against legacy software. And paper files?! Machines barely even read that crap. Try finding (with your computer!) any reliable data collected before 2000 (ie the dawn of machine history). Oh, you found some? Well, hide your grandkids, ’cause that shit was INPUTTED BY HAND!

Anyway, back to Uncle Sam’s pension files. The endgame is obvious: direct API links between the central system and every payroll/HR system in each office. This eliminates costs (jobs) and will improve accuracy. Good stuff.

Until then we’re still building XML files and presumably emailing them around. I can hardly be critical here as I’ve only just started to see the emergence of API links between insurers and reinsurers. No XML schemas, though, because they’re using a type-controlled relational database. Fancy way of saying they keep the data clean at the entry point: pretty hard to soil those databases. As it should be.

To my novice eye the system impresses. Flicking through the documentation suggests they might want to cool off on the initialisms and structured prose as it reads a bit like an engineering manual from the 60s. But engineers they probably are (and targeting an engineering audience to boot), so I’m probably being unfair.

Bless ’em.

When a Business Model Dies

Spare a thought for poor Kodak, a company surely in the throes of death. Here is the key paragraph:

Intellectual property licensing and lawsuits have largely funded Kodak’s cash needs but stalled earlier this year, prompting Kodak to decide to sell 1,100 of its digital patents.

Sell your brain and what are you supposed to think with?

What do they do at Kodak? Is it just a bunch of lawyers trolling around for people to sue? This is a company that is at least two paradigms in the dust.

“First there were Film Cameras and all was good. Then there were digital cameras and we got scared but at least that made sense. But phone cameras? How are we supposed to compete with THAT?!”

No normal family is going to spend anything like the kind of money people used to spend on cameras of any kind.

Kodak, Yahoo!, HP, the list goes on.

It’s sad when familiar brands to die, sure. But die they must.

More On Fire

Horace Dediu has an interesting and long discussion on the Kindle. Ultimately he shares a view I notice I didn’t put in my notes, but with which I completely agree:

Fire will not have the opportunity to disrupt the iPad or tablets in general. Amazon sees the hardware and software of a device as a commodity and the content and its distribution as valuable. This assumes that the device is “good enough” and will not require deep re-architecting or that new input methods can be easily absorbed. In short, they see the tablet as at the end of its evolutionary path. Apple sees the exact opposite.

Build vs. Buy

Celent is releasing a report soon on build vs buy. I find this debate frustrating because I feel like it isn’t a difficult decision.

Insurance companies are made of three things: money, a processing system and an underwriting system. Money is money and at current regulatory margins I don’t believe there is an advantage to be gained for insurers having more or less of it. Underwriting systems exist to sniff out moral hazard so humans have to handle those (committees, referral, etc).

100 years ago, the processing was done by humans, too. Today, you choose between build or buy.

If you find yourself among the small minority of (re)insurers that write volatile, hard-to-price insurance, you don’t really need a rock-solid processing system. You probably write big deals and work more like a hedge fund than a retail bank. You can buy.

As for the rest: if you don’t build, the risks are simple and the money isn’t yours, your job is to provide a commodity on the cheap. If you aren’t building your own system, what on EARTH do you get paid to do?

Over time technology improves, making new systems better regardless of whether you build or buy. This will, however, rarely (never?) affect whether a company chooses picking clients or shaving margins as its business model.

Some Amateur Speculation on The Stock Market

The economic disaster trade appears to be short commodities and long Treasuries.

Timing is everything, but when things turn around the USD is going to weaken and commodities prices are going to pick up. That’s when you would want to be long a Canadian or Australian Index Fund, I think.

The quickest way that happens, probably, is when the either the Fed or the ECB credibly commits to an expansionary monetary policy. A Euro breakup counts because the Dmark skyrockets and the Italian, Greek, Portugese and Spanish currencies plummet.

‘We’ need to destroy some wealth in those problem countries pronto.

Another Entrepreneur Talks Up His Book

Got here from Ben Casnocha. I don’t believe this for a moment:

TripAdvisor, the leading hotel and travel reviews site, will be spun out from its parent Expedia this month, andshareholders are giddy. With 50 million reviews and counting, the site is shaking the travel industry to its core. Underlying TripAdvisor’s success is a powerful long-term trend: ratings websites threaten to make many brands irrelevant.

I actually see the opposite effect, which is to reinforce brands’ power by making their experiences more consistent and reducing their monitoring costs.

Feedback is NOT disruptive technology for branded hotel chains or restaurants. Branding only works because it sets expectations, which are then either met or not met. If they are unmet, then the brand takes a hit. TripAdvisor just speeds up this process.

It’s an ugly bit of self-indulgence for marketing-types to think that brands are built by marketing. They’re built by experience. Motel 8 didn’t get its image by buying ads, it got it by whipping small franchisees into competent low-end hotel owners and delivering some kind of central reservation system. And maybe tomorrow they get good at hiring summer interns to pump up the reviews of their in-chain hotels.

And never forget TripAdvisor’s business model: selling ads. To the branded hotel chains. It’s in TripAdvisor’s best interest to maximize its value to these core clients.

TripAdvisor is helping to kill some businesses, though: rating organizations as they previously existed and old media advertisers.

Advertisers have lost a client. This is one less ad at the Superbowl because online ads are much more targeted and real information about the quality of an establishment is more easily sourced. And if their brand is powerful enough and their reviews are good enough, maybe they don’t even bother with advertising on TripAdvisor either.

And as I said before, TripAdvisor is an excellent new tool for big chains to use.

Let’s say your job is to monitor the Super 8 Brand across the US. You travel to hotels, perform inspections, chit-chat with the hotel owners and move on. That job is now dead. All an executive has to do now is sign up for a feed of reviews about its hotels flag underperformers. Any organization that has the resources to actually take advantage of these tools will win and small franchisees are buying those resources.

Branded chains don’t care about mom & pop shops unless they can scale. And if they can scale, they’re a branded chain.

Housing

The question that I don’t have a really good feel for is to what degree the housing market is a canary or millstone. Being only 5% of the economy, one is of course inclined to think of it as a canary.

But here’s the thing: Residential construction companies employ a lot of relatively casual labor. A lot of unskilled labor. A lot of the kind of labor that is, RIGHT NOW, unemployed.

The question then is what the marginal impact of a decline in the housing market might be. One thing’s for sure, anyway. That market is completely effed right now:

In New York we’re noticing some serious signs of the residential and commercial real estate markets recovering (our rent is going up and our expanding office is having some trouble finding a home).

One can take this to mean different things. One interpretation is that there is some serious regional variation contained in these graphs, which appears to have some weight

Philly Fed State Conincident Map
Another possibility is that I don’t know what I think I know because most data is actually just BS.

The problem with new Keynesian economists is that they believe the government data for inflation, real wages, etc, actually measures the theoretical concepts that the model tries to address. But they don’t. Even NGDP is far from perfect, but at least it’s not as distorted as the CPI.

That’s Scott Sumner defending his use of NGDP because it’s the least BS stat out there. I’m heavily persuaded by this kind of argument. A little while ago, I posted something similar to this and actually got into a comment discussion, which is a rather novel thing for me here.

I feel like educated folks tend to make decisions with the part of their brains they trained in school, the part that’s wired for analysis on a given dataset and coming up with The Right Answer is the challenge.

Big contrast to real life. If you had described my job to me when I was a student, I’d imagine myself slogging through difficult math and trying to figure out how to optimally process a dataset. No so. In fact, I’m not sure I’d really want that job or be anywhere near as good at it as I feel I am at this one.

I actually spend about 75% of my time trying to figure out whether this steaming datapile is in ANY way useful. The analytical part is usually pretty straightforward. It has to be. Heck, the rest of my job is trying to shoehorn this datapile into an analysis everyone can understand instantly.

Clients are distracted, busy people and they’d say my work is important but they are often juggling a lot. My complexity test, therefore, goes like this: can this analysis be explained to a child?

And that’s as it should be. Fancy models have their place, but only when used to support conventional wisdom and gut instinct. Counter-intuitive, Complex and Useful: pick two.

I often get the feeling that macroeconomics in particular is a bit too counter-intuitive for its own good. Practitioners get wrapped up in their models and don’t spend quite enough time understanding exactly what is and is not BS. As a result, they have very weak intuition. I suspect they’d be pretty freaked out if they went down to the sausage factory and had a look.

The Demographic Crunch

I still don’t really have a great feeling for WHY it is that a demographic transition is toxic to economic growth. I very vaguely feel like it has something to do with younger people being more productive in society, something that I’ve heard referred to as the demographic dividend.

But what on earth does that mean?

Here’s Frances Woolley. Woolley’s point is that a generation’s quality of life once they reach ‘retirement’ age is determined by the age distribution of society behind them. I’ll paraphrase: panic if you’re anything like China when two generations of one-child policy leave a nation of grandparents with 1/4 a grandkid each and nobody to take care of them.

She also discusses the problem of where one puts one’s savings. When you save, you’re saving with everyone else and raising asset prices. When you dissave, you’re liquidating with everyone else and lowering asset prices.

In other words, if you’re a boomer that saved during your 30s-50s, you were destined to buy high and sell low. I’d love to read a paper that discusses the recent stock and housing bubbles in that light. I’m sure it’s out there.

Anyway, all this presupposes that older people retire. What if they don’t?

My grandfather retired in the late 70s as a college administrator/teacher and his life divides neatly into three: a third before his career (includes WW2), a third as a worker and a third retired. As a retiree with an indexed pension, he claims to enjoy the highest standard of living of his life. All guaranteed by the state and funded by the demographic dividend.

As those kinds of deal evaporate, workers will extend their working lives, particularly given the buy high sell low saving environment.

Are 60-year-olds as good as 25-year-olds at output and innovation?

Let’s think about possible historical analogues. Hey, what about Japan? Hm…

Here’s Michael Pettis:

On the other hand if the definition of poor demographics is extended to mean a wide variety of demographic conditions that hurt economic growth, there is nothing especially Japanese about Milligan’s list of Japanese symptoms.  They are pretty standard for countries undergoing financial crises.

Great quote here, too:

Japanese households on the other hand continued to do better, year after year, after the crisis, the difference being that their wealth increased more slowly than reported GDP before 1990 and increased more quickly than reported GDP after 1990.

So, at best, the causes of Japan’s malaise will be difficult to disentangle from its debt hangover.

And here’s another blog post by Tino that I think I’ve referred to before:

Between 1990-2007, GDP per working age adult increased by 31.8% in the United States, by 29.6% in EU.15 and by 31.0% in Japan. The figures are nearly identical!

Japan has simply not been growing slower than other advanced countries once we adjust for demographic change.

So a demographic transition only cause a mismeasurement of GDP growth and not an actual decline in living standards, which IS the result of a debt crisis. But this mismeasurement only occurs to the extent that the Frances Woolley effect dominates (i.e. people just stop working). If they keep at it, nobody loses.

These conclusions contradict the wikipedia article’s phrasing of the demographic dividend, which it suggests is driven by the share of “working age people” in a population, as opposed to the share of workers in a population.

There has to be some empirical work out there on this.