Because Science Got Bigger

“Both inside the humanities and outside, people feel that the intellectual firepower in the universities is in the sciences, that the important issues that people of all sorts care about, like inequality and climate change, are being addressed not in the English departments,” said Andrew Delbanco, a Columbia University professor who writes about higher education.

That’s the NYT on the decline of humanities majors.

Many years ago my industry, insurance, probably employed lots of non-technical people in analytical and sales roles. The skills required were more generalist because the business was more personal.

But that’s all changing. Insurance has gotten miles more scientific in the last 20 years and that has driven all the trends that we spend our time talking (complaining) about: the rise of actuaries, industry consolidation, margin squeezing, etc.

Veterans spend a fair bit of time missing the old days and in this case it’s true: they were very different. But as our tools for measuring all sorts of things have improved, the social purpose of our industry (risk management) is being being better achieved.

Assess a Coffee Shop in One to Fifteen Seconds

I’m a coffee snob. Bad coffee tastes like garbage and I don’t like the idea of chaining cups together to dodge the caffeine hangover. So I’m perfectly happy with nothing unless I can get an outstanding cup of joe.

In fact, I’m somewhat embarrassed to say, I’d probably order a bottle of water in 99% of the coffee shops on earth. And up until recently that included 100% of the coffee shops in the financial district of NYC where I work.

I’m pleased to report, though, that the coffee revolution is breaking over this city before my eyes and I thought I’d celebrate with a little guide to figuring out if you’ve found yourself in a spot with incredible coffee.

Step 1: look through the door/window. This step will cut out about 98% of the coffee shops you’re likely to run across. You’re looking for hardware, specifically these two items:

coffee2The red circle is showing you a bean grinder (sorry about the quality of the image – this is from my ipod camera at Bluestone which just opened near my office). Specifically, it’s a burr grinder. All high end coffee shops have them and they signal two very important things:

  1. The beans are ground fresh. This means they understand the basics of coffee.
  2. They are a bit obsessed about quality. You see, they aren’t using a blade grinder, which adds a little bit of heat to the beans as it grinds them. Personally I don’t think that this moves the needle too much in terms of flavor but it means that they care enough to spend the extra $300 or whatever it costs for a burr grinder.

Obsession with quality is a very, very important signal because in your 1-15 seconds you can’t observe one of the critical elements to awesome coffee: the quality and freshness of the beans. You need signals correlated with bean quality. And the burr grinder is one.

The green arrow points to the other important piece of kit: an incredibly large and expensive espresso machine. Now, I don’t care about whether you like espresso drinks or not (I happen to drink them almost exclusively). This machine signals two more things:

  1. They spent $10,000 on a coffee machine. More quality obsession.
  2. These things are hard to use properly. This means you might have a real barista on your hands. BUT you don’t know that yet.

So you need to evaluate the barista. If he/she sucks the it means the owner spent a ton of money but does not care about employing and training people passionate about coffee. In other words, you get an overpriced Dunkin’ Donuts.

But you can’t really get a good view from outside so to evaluate the barista this you’ll probably actually have to walk into the coffee shop. But you only have 5-10 seconds left, so what are you looking for? The tamp.

That little thing in the imaged woman’s left hand in is the basket. That’s what you grind the beans into. The tool in her right hand is the tamp, which is also the verb describing what she is doing. Note two things about this woman’s tamp:

  1. The basket is propped against the table.
  2. Look at the position of her arm: she is putting her shoulder into it!

The key to a great tamp is the pressure. About 30lbs, I’ve heard, will do it. Most poorly trained baristas half-ass the tamp. Sadly enough, a half-assed tamp can wreck even the best espesso pulled from the best machine.

Now there are many many other steps that go into great coffee than what I’ve listed here. And none of these steps I’ve mentioned above, strictly speaking, are necessary for excellent drip coffee. But the point is that you can suss out every one of the above-mentioned signals in a matter of seconds in any coffee shop you choose.

And if your shops passes these tests, you can be pretty sure anything you get from them is going to be fan-freaking-tastic.

Problems that Bug Me: The n-1 Correction for Sample Variance

Let me start with an easy example that everyone starts with in stats: we want to know how variable height is in the population of humans. We can’t measure the height of all humans so we gather up the few around us and here’s what we get.

Janet: 5ft
Sam: 6ft
Shaq: 7ft.

The average height of the three is: \frac{5+6+7}{3}=6.

The variance of height is: \frac{(5-6)^2+(6-6)^2+(7-6)^2}{(3-1)}=1

So the statistician says we now have an estimate for average height and variance of heights of the population of humans: 6ft tall with a variance of 1.

Here’s a twist, though. If there were only three humans in existence, the variance would be different: \frac{(5-6)^2+(6-6)^2+(7-6)^2}{3}=\frac{2}{3}.

So what’s the difference? The difference is that if Janet, Sam and Shaq are a sample of the population we divide the sum of squared differences from the mean by n-1=2. If they are the entire population, we divide it by n=3. This makes the sample variance larger than the population variance. Why is that?

This is a question that annoyed me for some time. The key, though, is to not focus on the variance calculation. The key is the mean.

You see, when you pull out a sample of a population you aren’t measuring the correct average height. Your height estimate is going to be wrong and it’s going to be different each time you draw a sample from the population. In other words, it’s going to vary and so increase the variance.

So the point of the n-1 correction is to increase the variance estimate to allow for the fact that your measurement of the mean varies with each possible sample.

If the sample gets big enough, dividing by n-1 isn’t much different than dividing by n. Imagine the difference between dividing by 100,000 or 100,001. So this correction becomes meaningless because the mean we are measuring is probably the correct one.

Here’s the math:

Let’s start with the sum of squared errors, which is this: \sum\limits_{j=1}^k(Y_j-\bar{Y})^2. Remember that \bar{Y} is the mean of the sample group. What we’re going to find is that it’s equal to this: (k-1)\sigma^2

which is the same thing as saying this E[\frac{1}{(k-1)}\sum\limits_{j=1}^k(Y_j-\bar{Y})^2] = \sigma^2.

\sum\limits_{j=1}^k(Y_j-\bar{Y})^2 = \sum\limits_{j=1}^k[(Y_j-\mu) + (\mu-\bar{Y})]^2. We start with one of the oldest tricks in the book. Adding and subtracting the same amount from the equation.

= \sum\limits_{j=1}^k[(Y_j-\mu)^2 + 2(Y_j-\mu)(\mu-\bar{Y})+ (\mu-\bar{Y})^2]. Expand the square.

= \sum\limits_{j=1}^k(Y_j-\mu)^2 + 2(\mu-\bar{Y})\sum\limits_{j=1}^k(Y_j-\mu)+\sum\limits_{j=1}^k(\bar{Y}-\mu)^2. Split up the summations.

= \sum\limits_{j=1}^k(Y_j-\mu)^2 + 2(\mu-\bar{Y})(k\bar{Y}-k\mu)+k(\bar{Y}-\mu)^2 Recognize that a sum of means is k*the mean.

\sum\limits_{j=1}^k(Y_j-\bar{Y})^2 = \sum\limits_{j=1}^k(Y_j-\mu)^2 -k(\bar{Y}-\mu)^2. Simplify a bit. This is a pretty key step, actually, because now we see that the sum of squared error (the left hand side, which I’ve restated here for clarity) is smaller than the sample squared errors using the true mean, mu.

E[\sum\limits_{j=1}^k(Y_j-\bar{Y})^2] = E[\sum\limits_{j=1}^k(Y_j-\mu)^2 -k(\bar{Y}-\mu)^2]. Take the expectations. Boy, don’t those look like variances?

= \sum\limits_{j=1}^kVar(Y_j) -kVar(\bar{Y}) Yep.

= k\sigma^2 -k(\frac{\sigma^2}{k}) = (k-1)\sigma^2 The home stretch.

E[\frac{1}{(k-1)}\sum\limits_{j=1}^k(Y_j-\bar{Y})^2] = \sigma^2 and Done.

Addicted to… something

Still entrenched in the CrossFit culture of deplete, endure, repeat, she quieted the alarms and stoically pressed on to go to work. It didn’t take long to realize she not only couldn’t bend her arms, they also had no strength. She wasn’t able to treat her patients. By that evening, her slender arms had continued to swell into plump hotdogs of ache and regret, and she was starting to come to the realization that the morning’s danger alarms were legitimate.

Unbelievably, it took another 24 hours for her professional sense to break through the grip of the CrossFit culture, and seek medical attention. She was diagnosed with acute rhabdomyolysis, and ended up in the hospital for over a week. While in the emergency department they tested her creatinine kinase (CPK) levels. Normal is about 100. Her CPK levels were more than 45,000, a number that indicated damage to the kidneys.

While in the hospital, she called to cancel her CrossFit membership. As is standard when something is cancelled, the CrossFit coach asked the reason for her decision. She replied, “I’m in the hospital.” The instructor quickly asked, “Is it rhabdo?”

Rhadbo is short for Rhabdomyolysis and its description reads like something from a comic book (exploding muscle cells poisoning your kidneys, eventually killing you). It’s caused by consistent, extreme exertion.

The NYT ran an article on this in 2005:

Yet six months later Mr. Anderson, a former Army Ranger, was back in the gym, performing the very exercises that nearly killed him. “I see pushing my body to the point where the muscles destroy themselves as a huge benefit of CrossFit,” he said.

I think it’s safe to say that anyone that works out until their muscles explode isn’t playing with a full deck. These people are addicted to exercise. But isn’t working out a good thing? Well, for most people so is losing weight, yet we have anorexia.

One amusing consequence of these stories is that people might use it as an excuse for not working out at all. Or at least to make themselves feel better about not working out.

How Insurance Companies Die

If you’re curious, follow the news about Tower Group. Here’s David Merkel’s take:

As an analyst of insurance stocks, I was always skeptical of Tower Group for three reasons:

  1. The acquisitive nature of Tower Group.
  2. The rapid growth in premiums, 52% per year over the last 10 years — no insurance company can successfully grow that rapidly in a mature market.
  3. Odd reinsurance agreements that made me wonder.

The easiest way to grow an insurance company is to pretend your insurance policies cost less than they do, which is easier to pull off at the pointy end of the insurance market where all the strange coverages and specialty products are. In these lines, management uses a lot more judgment when picking reserve development and pricing factors. There isn’t enough data for actuaries to get a real firm grip on things.

As I understand it, this is where the pain in Tower Group is being felt. Management undoubtedly knew it was pushing things too hard, trying to grow its way out of its past problems. And you can do this for a long, long time at an insurance company. Years. Merkel’s comments above were made almost 10 years ago. And he was right. Yet that insight yielded no profitable investment opportunities, as he rightly saw. 

But like all downward spirals, it’s harder to get out the longer you’ve been doing it.

Toughest Accountant On Earth

Juan Manuel Marquez, a one-day Hall of Fame Boxer:

“I would run in the mornings, then work my 9 to 5 accounting job, and then to the legendary Romanza Gym to do my boxing work to prepare for my fights. When I had fights and had to travel I would get permission from by boss to go for my fights traveling on the weekends, fight, and be ready for work on Monday. I did that until I got my first championship opportunity against Freddie Norwood. At that time I took a few months off from work to get ready for the fight. A fight I felt I won on points. But it was not until I won my first world championship in February of 2003 that I decided to leave my job and concentrate on my boxing career. I was a little nervous about leaving my job and its security but I felt that as a World Champion I needed to dedicate myself to boxing fulltime and it was the right decision to make.

Not easy funding yourself as a professional athlete. Very few boxers make it so while I’m not surprised that he had a fall back plan but I am surprised at how long he kept at his day job!

You may have heard of Marquez for this (original post here).

The thing that impressed me about that fight was that Manny was outboxing Marquez but found himself in the ring with what might be the second smartest fighter on the planet. And smart with the figurin’, too!

Actuaries’ Achilles Heel

I spend a fair bit of time whining about how actuaries basically ignore the overfitting problem when building their models. So I was pretty pumped to see an actuary address this issue head on for stochastic reserving (pdf pg 29). I haven’t studied stochastic reserving models, but I was disappointed with this:

Let’s start with a collection of normal distributions with the mean, µ, being uniformly distributed between 100 and 200. The standard deviation, σ,is uniformly distributed between 25 and 50. Pick a random parameter set (µ,σ) from this collection. Then pick a random training sample, x1, x2, x3, x4 and a random holdout sample, x5, from a normal distribution with mean µ and standard deviation σ.

Dude… assuming normal?

I expect a common response to these simulations would be that the Bayesian models assumed I “knew” the correct prior distribution. My, typically Bayesian, response to that would be that if your prior distribution truly reflects your prior beliefs, you should believe the posterior result.

An immensely unsatisfying response. I get that it is frustrating for people to criticize fundamental assumptions behind somewhat sophisticated techniques. If you believe that overparametarization is real, the story goes, you must also reject the normal assumption and therefore you must reject a TON more theory on stochastic reserving, not just this little part. Fair enough, I say.

But what an incredibly weak defense.

Is the Universe an Amplituhedron… ?

Yeah, whatever that is:

Physicists have discovered a jewel-like geometric object that dramatically simplifies calculations of particle interactions and challenges the notion that space and time are fundamental components of reality.

“This is completely new and very much simpler than anything that has been done before,” said Andrew Hodges, a mathematical physicist at Oxford University who has been following the work.

Also some good stuff at the HN discussion.

The idea is that physicists (starting with Feynman) have been using some incredibly complicated math to calculate the scattering pattern of particles after a collision. These initial calculations started out with Feynman drawing a picture of what the scatter pattern might look like then calculating its likelihood. Then draws another one and calculates that likelihood. Thousands of times. 500 pages of algebra, we’re told.

And now some physicists have figured out a standardized shape whose volume calculation replaces those 500 pages of algebra with a single step.

Using geometric objects to simplify very complicated calculations is an old and breathtaking trick. I first came across it studying the probability of events under constrained uniform distributions. I can trade in a triple integral for drawing a couple rectangles and a trapezoid? Deal.

Calculus is painful, drawing pictures is not. And yet they’re the same thing. Which is mind-blowing, and shows that math really can (should!) be simple.

Anyway, the fact that the amplituhedron works so well has all kinds of wacky implications for physics that I don’t really understand, and that even the real experts can only speculate about. My take-away is how neat it is that a visual metaphor can drastically reduce the apparent complexity of some physical phenomenon.

Social scientists everywhere sigh with envy.

The Real MOOC Revolution

Plucking geniuses from the slums of Mongolia:

How does a student from a country in which a third of the population is nomadic, living in round white felt tents called gers on the vast steppe, ace an M.I.T. course even though nothing like this is typically taught in Mongolian schools? The answer has to do with Battushig’s extraordinary abilities, of course, but also with the ambitions of his high-school principal. Enkhmunkh Zurgaanjin, the principal of the Sant School, was the first Mongolian to graduate from M.I.T., in 2009, and he has tried since then to bring science and technology labs to his students.

Note a few important preconditions:

  1. Incredible ability
  2. Internet connection
  3. Mentor
  4. MOOC

The first one is in abundance all over the world. This is the resource that lies untapped among billions of people. The second is the revolution, really. The third means that there needs to be a social infrastructure before genius can be unlocked. This takes time to build.

And the MOOC is the catalyst.

What Stupid Is To Us

This is an excellent article on robots that help people. Check out these two quotes:

It is vital that a robot of this sort is not perceived as hostile, but as having its owner’s best interests at heart.

One way to do this is to give robots a defining human trait—the ability to make mistakes. Maha Salem, a researcher under Dr Dautenhahn, programmed a humanoid Asimo robot, made by Honda, to make occasional harmless mistakes such as pointing to one drawer while talking about another. When it comes to household robots, test subjects prefer those that err over infallible ones, Dr Salem says.

And this:

To interact smoothly with people, robots will also need “social intelligence”. It turns out, for example, that people are more trusting of robots that use metaphors rather than abstract language, says Bilge Mutlu, the head of the robotics laboratory at the University of Wisconsin-Madison. He has found that robots are more persuasive when they refer to the opinions of humans and limit pauses to about a third of a second to avoid appearing confused. Robots’ gazes must also be carefully programmed lest a stare make someone uncomfortable. Timing eye contact for “intimacy regulation” is tricky, Dr Mutlu says, in part because gazes are also used in dialogue to seize and yield the floor.

Two very different kinds of intelligence, from the perspective of a human.

A person who never makes mistakes about where things are might be considered smart in our society, one that does somewhat normal. On the other hand, a person with sloppy non-verbal communication is ruthlessly discriminated against and is probably constantly sparking unintended conflict, making a happy life impossible. Yet from a robot’s perspective the first is laughably trivial and the second unimaginably complex.

Which task do you think human intelligence evolved to perform? Maybe that’s why math class is so hard.