Archive for May 2007

TA evaluations

evolgen has a post on TA evaluations (and a great link to Rate Your Students!). Namely, the harsh ones he just received. Such as "Honestly sucks. Thinks he knows a lot but really doesn’t."

For an intro course, this means you’re doing your job. In my last year of undergrad, I was TA for intro physics for the honors engineering students. Their sense of entitlement was enormous. And then they got me. I made them start from Newton’s laws or conservation laws on their homework. I made them explain, using words, what it was they were calculating and how they came by their formulas. No references to the book were allowed. I corrected their English. By the end of the course, they were turning in decent homeworks, and they could carry through reasonably simple arguments starting from first principles. I was well satisfied with their progress.

And then I got the evaluations. I was mean. I was arrogant. I was chauvinistic, and I favored girls, and both those comments were from male students (I was given the original sheets, and I knew everyone’s handwriting). I didn’t know nearly as much as I thought I did. I made them do unnecessary things like derive from first principles and wouldn’t let them quote equations from their textbook.

But here’s the interesting thing. The good students, starting from about mid-B, didn’t write comments, or if they did it was along the lines of “It’s been fun! Thanks!” (in blue pen from a girl who struggled mightily but came out quite well).

Also amusing: the students from the big science and math high schools had larger egos than the other students, but their performance wasn’t noticeably different.

There is no ladder

There’s been a little cluster of blog entries on the erroneous idea that evolution is an increase of complexity from bacterium to man. I work in a pathogen lab, which means we’re all acutely aware that we’re not at the top of the food chain. But I’m going to go one step further and really annoy a lot of people.

There is no biological complexity.

The only definition of complexity I’m aware of which isn’t unobservable handwaving is the concept of algorithmic complexity in computer science, which refers to how much computational power is required to compute something, from computable in constant time, to NP-complete (give up and go home). But there’s a catch: the computational power is that required by a universal Turing machine or equivalent. And you can often approximate the solution to NP-complete problems with statistical approaches much, much more cheaply (there’s a nice sort of introduction to this at the Quantum Pontiff). I have no idea how to define the complexity class of being able to live off of iron ore in a cave, but I don’t think it matters, as we’re dealing with evolution, not a Turing machine. It’s a genetic algorithm, by its very nature. That puts it squarely in the statistical mechanics side of things. (I would appreciate it if an actual complexity theorist would slap me down if I’ve gotten totally confused here.)

The other definitions people try to use are usually from “software complexity,” which is an attempt to measure how much work programmers have done without having to know anything about the programs they wrote. To anecdotally understand how screwed up this can get, go read the Evolution of a Programmer (or for the categorically minded, the Evolution of a Haskell Programmer).

If we stop worrying about complexity, however, we can get some really nice results about how things scale. Stride length, leg length, and running for instance. Giraffes can run. Their legs are just short enough. Elephants can’t. They physically can’t maintain a gait which has all the legs off the ground. Their legs are too long, but they can shuffle so fast that it doesn’t much matter. The blue whale’s circulation is a convective cooling system: when they die they cook because their own body heat can’t diffuse fast enough into the surrounding water.

And when the scaling laws break down, then you’re on to something really interesting. A certain phage geneticist is following one of these leads: DNA viruses usually encode their own DNA polymerase because they want to operate at a higher error rate than their host…but small DNA viruses which don’t have space to encode a DNA polymerase still, as a population, mutate much faster than their host. Here’s a case where simple arguments from genome size fail miserably.

There is a Zen concept that scientists really need to adopt: mu. The answer to a question may not be yes or no. It may be mu: there is no answer. Has complexity increased over the course of evolution from bacterium to man? Mu! Go check your assumptions.

Math for biologists

Here’s a post which poses some questions about mathematics training for biologists. I’m close enough where I figured I’d try to answer:

  1. Are you a biologist, if so what kind? Sort of. My PhD will be in biology, on the response of mycobacteria to antibiotics. My undergraduate degrees were in physics and math.
  2. What math did you take in college? Calculus through multivariable, ordinary differential equations, a two semester course on math methods for physics students covering special functions, complex analysis through contour integration, and some partial differential equations, real analysis through the last course they shove the doctoral students through, the probability course that comes just after, a bit of functional analysis, and a two semester graduate sequence in algebra.
  3. What math do you or have you used? My image analysis requires some partial differential equations, a lot of calculus, and a bit of differential geometry. I do some theoretical biology on the side which particularly takes the probability and random processes, and partial differential equations as the limiting cases of the former. My bench work itself doesn’t take more than highschool algebra, but designing and analyzing my experiments requires statistics, which I’ve been teaching myself. Before this, when I was training to be a mathematical physicist, I obviously used everything I knew and it wasn’t enough.
  4. What math do you wish you’d studied? I wish I had actually endured the second year of graduate algebra, and a graduate course on combinatorics. A couple semesters of statistics would have saved me a lot of time now, but I can fill in the gaps. I really wish I had taken serious courses on differential geometry and topology.
  5. How do you use math in your job (or research)? See above.

I think a case could be made that biologists should take all the math required to take a full scale mathematical statistics course including multivariate and nonparametric methods, and a heavy dose of experimental design. Let’s see: real analysis through measure theory and Lebesgue integration and Stokes’s theorem on manifolds, a hefty course on probability from the axiomatic basis to the beginnings of random processes, and then blast through statistics because a t-test would only require about ten minutes and a homework problem, and so would a U-test. This is four years (two of analysis, one of probability, one of statistics), but it’s only one course a term.

Admittedly, biology departments would suddenly have as many undergraduates as physics departments.

The last one to go

I just got back from Analytical and Quantitative Light Microscope 2007 at Woods Hole Marine Biological Laboratory. Maybe I’ll post something on the course later, but I found one thing that deserves wide dissemination.

On the wall outside the library are two sheets of handwritten paper. You can see them at Woods Hole’s website. These were tacked to the door of a marine biological laboratory in Japan just after World War II. The Japanese navy had kicked the scientists out and used the place as a submarine base. Katsuma Dan posted this just after the Americans took it.

The text is hard to read in the photos, so here it is:

This is a marine biological station with her history of over sixty years. If you are from the Eastern Coast (of the US), some of you might know Woods Hole or Mt. Desert or Tortugas (Marine Biological Stations). If you are from the West Coast, you may know Pacific Grove or Puget Sound Biological Station. This place is a place like one of these. Take care of this place and protect the possibility for the continuation of our peaceful research. You can destroy the weapons and the war instruments, but save the civil equipments for Japanese students. When you are through with your job here, notify to the University and let us come back to our scientific home.

The last one to go

A friend of mine’s response when I showed this to him pretty much sums it up: “Yes, some of us have more important things to do than fight wars.”

The Structure of Inference

I previously described the ecological niche of statistical inference. Now let’s study the beast itself.

Kiefer in Introduction to Statistical Inference dissects a statistical inference as clearly as I have seen. Start with a set S, which is the range of a random variable representing our measurements. We augment this with a class of possible distributions \Omega for the random variable, one of which (we believe) is the true distribution which produced our measured values.

Add a set D of decisions. In the end, our inference will single out some element of D. To measure the damage if we choose wrong, we introduce a loss function W : \Omega \times D \rightarrow \mathbb{R}. W is dictated by our circumstances. In an economic problem, it may be obvious: the amount of money lost if we make a mistake. Generally it is not so clear cut. The best approach is to construct inferences which depend only crudely on the form of the loss function. If we are estimating the mean of a distribution, then our answer shouldn’t depend on whether we took the absolute value between our guess and the true value as the loss, or its square.

Our actual inference is carried out by a function t : S \rightarrow D, called a statistical procedure. To make an inference, we plug our measured values into t and take the decision which comes out.

The problem is to construct a logically defensible t. We can say we want the t which minimizes the loss function as much as possible. If the loss from t_1 is always less than the loss from t_2, no matter what the true value we are trying to measure actually is, we would not dream of using t_2, but what of procedures which minimize loss over different parts of \Omega? How are we to choose among them? All the issues of Bayesian analysis, maximum-likelihood methods, minimax techniques, and all the rest are attempts to choose a t which is optimal in some sense.

To make the idea of loss incurred by some t, we define the risk function r : (S \rightarrow D) \times \Omega \rightarrow \mathbb{R} as

r(t,\omega) = E[W(\omega,t(X)) | \omega, t ]

where X is the random variable representing our measurement. This tells us on average how well a given t will do when faced with an underlying distribution \omega \in \Omega.

Consider an example. We count the number of cosmic rays above some energy passing through a detector in a fixed time. Our random variable has range \mathbb{N} (we can only count nonnegative integer numbers of cosmic rays), and we take the underlying distribution to be Poisson. Our class of distributions \Omega is the set of all Poisson distributions. Since the Poisson distribution is defined by one parameter \lambda \in \mathbb{R}^+, \Omega is isomorphic to \mathbb{R}^+.

Our decision space D will be various guesses for \lambda, so it is also \mathbb{R}^+. We could use very different D’s. For instance, we might try to decide whether there are cosmic rays of energy greater than our detector’s threshold or not, in which case D is just {yes,no}. We’ll take the loss function W to be W(\lambda_\Omega, \lambda_D) = |1 - \frac{\lambda_D}{\lambda_\Omega}| where \lambda_\Omega is the parameter of the underlying distribution and \lambda_D is our guess. Then we have to construct a t such that the risk r(t, \lambda_\Omega) is minimal in some sense for our problem at hand.

Energy of electrons

Update: Dani Fong in the comments has demonstrated that I’m wrong in the case Scott is talking about of electrons in metals. Obviously I’ve been growing bacteria for too long.

Scott Aaronson has a basic article on electromagnetism which makes one of the great basic mistakes:

if you have a bunch of electrons going through a wire, then the energy scales like the number of electrons times the speed of the electrons squared.

Unfortunately not. Consider a superconducting ring with some current flowing in it. Each charge carrier is in the same state in the wire, and produces some potential in space. We’ll take the limit of many, many charge carriers so we can regard the number n as a continuous variable. You don’t have to, but it makes the property we want really simple to see.

Say I have n charge carriers, and each of them produces a potential which, when felt by a charge carrier in that state in the ring has energy E_0 dn (where dn is the increment of one charge carrier. Then as I add a charge dn to a system of n charges, each pre-existing charge exerts a potential, and the change in energy from the new charge id dE = n E_0 dn. If we say that the energy with zero charges is 0, then E = \frac{1}{2}E_0 n^2. The energy of a system of electrons scales as the square of the number of electrons.

It’s not that the electrons don’t have kinetic energy, but it only scales with n. For any significant number of charges, it is absolutely swamped by the interaction effect.

If you try to do electromagnetism as point particles flowing through pipes, you are doomed to horrendous difficulties. The theory only becomes clear if you work in terms of waves. I didn’t begin to have a clue what was going on in E&M until after I had already fought through Jackson. Then I found Carver Meade’s Collective Electrodynamics, and everything suddenly snapped into place.

Movie recommendation: Microcosmos

I just finished watching Microcosmos at our Rockefeller film series.

There are two bits of narration, one at the beginning, one at the end, both about two sentences long, and both completely unnecessary.

The rest is photage of insects, plants, and other small creatures, but that doesn’t even begin to capture how compelling it is. Vignette after vignette unfolds which hilights — without any narration, just with amazing cinematography of insects in the wild — everything from the effects of surface tension on that scale to insect mating habits.

The sound is as stunning as the sights. Things our size make quite a lot of noise, and a foley pit produced sounds to go with the insects which seem scaled appropriately for our sense. It really adds a lot to the film. On top of that, it has one of the best sound tracks I’ve heard in a long time, in an eclectic mix of 20th century compositional styles.

When I wasn’t entranced by the beauty on the screen or the sound track, my thoughts were all of the form, “I wonder…” This is, in a sense, the intellectual opposite of a nature show. Nature shows explain things and impart answers. At the end of Microcosmos, I have a few hundred questions and burning desire to hit a meadow with a notebook and a couple of sandwiches.

A little digging led me to Spirit of Baraka, which lists a number of other films made in a similar manner. If they are of anywhere near the caliber of Microcosmos, I’ve got some wonderful viewing ahead.

Stages of Statistics

Here’s a reasonable definition of the mathematical field of analysis: the methods and tools for solving problems by breaking them into infinitesimal subproblems, then reassembling the resulting subsolutions. It suffers from the same problem as Pound describes of a biography of Stravinsky: if you know analysis it is clarifying. If you don’t, you are as much in the dark as before. The definition tells you nothing about the path from the construction of the real numbers to the complex numbers, convergence of sequences, through to Lebesgue integration, and then off into the depths of probability.

I offer a similar definition of statistics, which I shall probably rue in years to come: statistics is the methods and tools for taking experimental data and drawing from it logically defensible and experimentally repeatable conclusions.

Early in his Data Analysis and Regression, Tukey offers three levels of statistical analysis which form the same role as the algorithm of decompose, solve, and compose in analysis.

First comes pure indication, consisting only of things we summarize from the data: the values from a repeated measurement are centered around 5; there is a kink in the curve about there; the proportion of relapses under drug regimen B is 8% lower than under regimen A.

Next we make some determination of the strength of the indications. For instance, we might supplement of the central value of a set of measurements by a measure of its spread, or give the range of values in which the curve kinks over several repetitions of the experiment.

Finally we make a formal inference from the data. Given our data and some mathematical model for how it was generated, choose one of a set of decisions based upon the data. The classic example is Student’s t-test, which maps a set of data to a distribution over possible means of a Gaussian which generated that data.

Tukey points out that we often can’t get all the way to inference. The experiments may be prohibitively difficult. The mathematical techniques may not exist yet. Indications or determinations without inference are a fact of life, and should be handled with care and respect. All too often I see papers with inappropriate attempts at inference from what is only indication. Almost any use of microarrays in biology gives an example of this.

For indication, the problem seems deceptively simple: how do we find indications that may be deeply buried in a data set? This is the focus of the field of exploratory data analysis. In determination, we seek tools to tell us how strong the indications are. If we treat the suggestion of a mathematical model for inference as an indication, then these same tools give sanity checks on our models. The ideas of robustness and stability also enter here. The ecological equivalent in analysis is the toolbox of convergence tests and tricks making up old style "advanced calculus" courses. There is no general theory, no perfect approach. There are conventions and desirable qualities such as robustness to departures from the ideal and stability under perturbations to the data set.

Inference occupies a similar place in statistics to probability’s place in analysis: an axiomatic construction, which provides a framework, but must be tuned and specialized for each particular case. Rather like a matroishka doll, it is also formulated in terms of probability.

Learning Statistics

Being a physicist at the Rockefeller University — and anyone who isn’t a biologist or a biochemist is a physicist around here — means that any mathematical problem that arises lands in your lap. This is both enlivening and rather uncomfortable. Of late, many of the problems have been statistical, which is particularly uncomfortable: I’m extremely good with probability in all the gory, measure-theoretic details, and even somewhat conversant with random processes, but I never did any statistics.

So I’ll learn. First, I need decent books, but I don’t know what books are decent until I know something about the field. To pull myself up by my bootstraps, I go to the relevant section of the library, and start pulling books off the shelves, flipping through them, and trying to figure out what’s going on. Iteratively, I get a slightly clearer view, and discard a large number of the books as inappropriate. I will generally find a book in the first round of this and go off and read part of it. In this case it was Jean René Barra’s Mathematical Basis of Statistics, a lovely, Bourbakist book.

In the next iteration, I found Jack Carl Kiefer’s Introduction to Statistical Inference, which has a beautifully clear view of the mathematical structure of inference and how the various schemes such as Bayesian statistics fit into it.

The next day I was in the subbasement again — that’s where the math books are here — and this time unearthed John Tukey’s Data Analysis and Regression. Tukey steps back even further and spends a lot of time addressing bad stuff happening in the tails of distributions, situations when your data or techniques aren’t up to inference, robustness, and all the unpleasantness that reality can dish up.

And in parallel, I’ve been charmed by Edward Tufte’s inspiring The Visual Display of Quantitative Information. Don’t read it if you don’t want to spend the rest of your life foaming at the mouth when people put up bar charts or pie charts, or trying to make your graphs meaningful.

And then I presented this paper, which gives a few basic rules on error bars, to my lab in journal club, and I desparately wish I hadn’t. In reaction, I now proclaim: you cannot understand statistics without mathematical sophistication, and I’m not willing to try again.

So I’ll post gems as I find them, but I’m not going to write for nonmathematicians. Remember, there is no such thing as nonmathematical science.