Wednesday, April 13, 2011

A statistical breakdown of the first round of the NHL playoffs

I have used the Glicko-2 rating system to rank each NHL team's regular season results and assign ratings. Each regulation and overtime win was counted as 1 point. A draw or shootout result was 1/2 point, and a loss was 0 points. These ratings are shown in Figure 1.


Figure 1. Glicko-2 ratings for NHL teams at the end of the 2010-2011 season. (Click for a bigger version.)


Because the rating system works best when games are played in groups of 10 to 20, the games were divided into five epochs of roughly equal size (~250 total games each). The first three were before the All-Star break; the last two were after. More recent games are given a higher weight in this rating system, reflecting changes over the course of the season. The mean rating is 1502. The median is 1514.

Very recent injuries/comebacks aren't accounted for. Nor is home ice advantage. Nor is the fact that regular season overtime is 4 on 4.

The error bars shown are a single rating-deviation (RD); 95% confidence is within 2 RD. Based on the results of the regular season, most teams are statistically indistinguishable. Only at the very bottom end is there a significant difference between teams.

Canucks fans: it could very likely have just been a long lucky streak. Deal with it. Despite the President's Trophy, there are other teams just as good. That's what you get when you play Colorado and Edmonton all year. Dallas fans: it's unfortunate your team was in such a tough division. Their rating was higher than several teams that made the playoffs. Probably in any other division, you'd have made it, too.

The volatilities of these ratings are shown in Figure 2.

Figure 2. Volatility of ratings given in Figure 1.

These volatilities are a somewhat abstract concept, but basically they measure how much a team's rating would change if it won or lost the next game. As a consequence, they're a measure of how "streaky" a team was during the season (sort of, with lots of glossing over). Look at the Devils. They were awful in the first half, then went on a huge run, and then faltered at the end. During this time, they lost to some very bad teams and beat some very good teams. This gives a high volatility. If you're into long-term gambling, and you're in it for the money, don't bet on volatile teams. If you're into long-term gambling for the excitement, bet on volatile teams. The mean and median of these is 0.06. (The specific numbers don't mean much... the relative numbers are more important.)

Now that we have a set of ratings, we can compare teams. Glicko ratings are based on the Elo system, so the standard Elo comparison was used. In a game between team A and team B, if the rating of A is RA it is expected that A will score EA points.
EA = QA/(QA + QB)

where
QA = 10RA/400.

A rating difference of 400 means that in a lot of head to head games, you will earn 10 times as many points as your opponent (where "points" are defined in the first paragraph, not the NHL standings). Equal ratings means you have equal chances of winning each game.

These odds are given in Figure 3 for each of the first round matchups.

Figure 3. Odds of winning a single game for each of the first round matchups. Percentages given are those of the home team (listed first on the x axis).


The chance of winning each series in k games is given in Figure 4.

Figure 4. Odds of winning the series in k games for each of the teams in the first round.


If a team has probability p of winning each game, then it has probability of winning the series in k games given by
p4 (1-p)k-4 C(k-1, 4-1),

where C(a,b) is read "a choose b."

Curiously, Pittsburgh is a home team underdog (though they just won game 1).

I've yet to work out the odds of each team making it to the finals. Stay tuned for a future post!

Tuesday, January 11, 2011

Medicine that doesn't work -- acupuncture and acupressure

Practice: Acupressure

In 15 words or less: Pressing on specific spots on the body stimulates healing.

Initial reaction: Seems pretty unlikely.

What it really is: In traditional Chinese medicine, they believed that the body was animated by a magical force (or energy?) called chi. There's something to do with yin and yang there, too, but it's all pretty self-contradictory. Anyway, the idea is that disease is caused by an unbalancing of yin and yang, possibly caused by an obstructed flow of chi. Manipulating certain points on the body redirects the flow of chi, curing ailments.

In acupuncture, you stick needles into the points to change the flow of chi.

In acupressure, you rub the points using one of about a dozen techniques. There are special wooden balls, or you can use your fingers, or your thumbs, or a martial artist with a 12th degree black belt can poke you and you'll die 3 days later from chi disruption.... (A similar thing led to a great storyline in Ranma 1/2, however, so I guess the practice isn't totally worthless.)

Occasionally, a small electrical current is applied to inserted needles. That does have a sort of plausible mechanism for doing things locally, but even then, it doesn't work as claimed by practioners.

Why they still say it works: No one can seem to give a good reason. It's a "prescientific" system, which I guess exempts it from having to actually work? The only even slightly possible reason I've ever heard is that it stimulates blood flow. But in that case, the specific points shouldn't matter, right? And going for a quick jog should, by that logic, cure even the most horrible diseases.

Why it doesn't work: There's no reason for it to work. You're not animated by magic. This might have been acceptable thinking 2000 years ago, but now? Get with the times.

Practitioners can't even agree on where the needles should go, or where they should rub. They don't agree for which conditions it might work. They don't agree on... well, on anything. That alone should indicate that it's a big sham.

A number of recent studies on a variety of conditions (arthritic pain, repetitive motion stream, for example) have showed that acupuncture with fake needles is no more effective than acupuncture with real needles.

The existence of chi points is resoundingly ruled out by other studies, which found that it doesn't work for back pain or nausea, either.

That's not to say there there is no effect. Of course there is the placebo effect... but fortunately, that works even if you tell the patient that you're using a placebo. There's no need to stick needles into people and risk infection, and there's definitely no need to pretend you know something about medicine when all you're doing is giving a glorified massage.

Resources: More information than you could ever want is at Skepdic.

Medicine that doesn't work -- homeopathy

Practice: Homeopathy

In 15 words or less: Like cures like; taking a very small amount of something bad cures related ills.

Initial reaction: Might work sometimes, similar to antivenins or vaccines.

What it really is: Say you have a headache, maybe caused by clogged sinuses. The homeopathic cure is to take something else that causes headaches--almost anything, no matter how unrelated--and dilute it in water by a factor of 1020 to 10200 (or sometimes more). The claim is that the more diluted the solution is, the more effective the cure will be.

Why they still say it works: Water has a "memory" of what chemicals it used to contain. Sometimes the word "quantum" is thrown around, too.

Why it doesn't work: This is going to be a long one.

Homeopathy started with a doctor in the days when they still used leeches to cure colds and were afraid of witchcraft. They used very dangerous medicines in those days, some of which had a reasonably high probability of killing patients. So this guy started diluting his medicines and noticed that more of his patients recovered. Hallelujah! He didn't compare the recovery rate of people taking homeopathic medicines to the rate of people who took no medicine at all (though he might have discovered the placebo effect if he had), and instead came up with the conclusion that "like cures like."

Sadly, water has no memory. Liquids are chaotic things, where the atoms are bouncing around like crazy. That's why they can flow. There is no internal structure that could possibly hold a memory of what was in there before.

And even if that was true, why should taking a poison that gives you a fever relieve a fever caused by a virus? It's like stepping lightly on an infected toe and hoping that that will stop it hurting. Obviously it's not going to work.

Then there are the dilutions. Some people arguing against homeopathy will say that not one molecule of the original "medicinal" ingredient is in the final solution. I disagree with this: there is almost always going to be some contamination from one dilution to the next, from not wiping the rim of the flask carefully or whatever. Anyway, say you use mercury as your ingredient. Do you think there's any chance that not a single atom of mercury ended up in that solution from some outside source? No. Even if you use distilled water, you're going to get a few atoms of whatever was originally in it. So the solutions aren't as diluted as they claim, and this contamination ruins any chance of a memory effect.

Say you did a dilution of 10100. You are claiming that for every atom in your original solution, you have effectively placed it in 10100 atoms of solution, and then taken a sample from that. How big is 10100? It is about 100,000,000,000,000,000,000 times as many atoms as there are in the Universe.

On the other hand, the amount of the medicinal ingredient actually present is incomprehensibly tiny. 18 grams of water has 60,000,000,000,000,000,000,000 atoms in it. If you're saying that there are only a few atoms in there, and that those are making a significant difference in the behaviour of that solution, then... well, if you had $60,000,000,000,000,000,000,000 in the bank, would saving a couple bucks on your new car be a priority for you? You could never even spend that much money, no matter how hard you tried. The antivenin/vaccine comparison is ridiculous.

So, the reasons it doesn't work are many. The medicinal ingredients don't have any reason to work. The dilution factor is too big for it to be plausible. There is more contamination than claimed.

And of course, it's easy to test. Down a bottle of homeopathic pills. It's been done many times, and no one has ever overdosed.

Reources:
There is a good article and many resources at QuackWatch. There is a line there which I find particularly amusing.
In 1994, the journal Pediatrics published an article claiming that homeopathic treatment had been demonstrated to be effective against mild cases of diarrhea among Nicaraguan children.... There was no public health significance because the only remedy needed for mild childhood diarrhea is adequate fluid intake to prevent or correct dehydration.
Dehydration is the one and only condition that homeopathy might have a chance of treating!

Friday, November 26, 2010

Quark-gluon plasma detected at the LHC!

I've been watching experiments running all month on the LHC web site, including those from ATLAS. You too can do so here. You can select what you want to see via the dropdown menu in the top left.

A paper showing the creation of a quark-gluon plasma at the LHC by the ATLAS experiment was accepted for publication today. A related experiment, CMS, is going to try to confirm this soon.

Quarks are the particles that make up protons, neutrons, and so forth. Gluons are the force particles that keep quarks stuck together. If you move two quarks apart, they create more gluons; unlike gravity and electromagnetism, which get weaker over long distances, the strong force (which is what we call the force that gluons carry) is stronger at longer distances. So you have to heat your quarks up a lot to get them to move apart significantly, and when you do, you get a lot of gluons being created. If you heat things up enough, the quarks from different nuclei will all mingle together in a sea of gluons, sort of like when you dissolve salt in water. This is called a plasma.

This event is important because it gives us details about the first few seconds of the Universe. These measurements might help explain why we have a lot of matter, but not much antimatter. New particles might be formed in the aftermath of such a plasma... perhaps dark matter particles, or the Higgs boson. We might even be able to discover new fundamental forces in such plasmas!

In related news, there is was a suggestion recently published that it might be possible to prove or disprove the hypothesis of supersymmetry very soon. Several groups of researchers have figured out what to look for, and it's within the capacity of the LHC to do it.

Exciting days ahead in the world of physics. You can get a schedule of the LHC's planned events online, if you're interested in the current state of affairs.