Thursday, May 16, 2013

Homeopathy: Worse than "Just Water"

In 1796, German physician Samuel Hahnemann first proposed the idea of homeopathy. Based on the concept that "like cures like", homeopathic remedies attempt to cure symptoms suffered by patients by using highly diluted concentrations of a substance that would normally cause the same symptoms. However, these remedies are ineffective, wasteful, and can be damaging if they stop people from seeking real medical attention.

At first glance, the principle behind homeopathy may not seem that far-fetched. For instance, some vaccines are basically just preparations made from a non-life-threatening version of a disease in order to prepare your body to fight off that disease, and vaccines are great. Homeopathy takes this concept – fighting an effect with its own cause - way too far though, well past the point of ridicule.

An actual example from the Canadian Society of Homeopaths is the use of onion juice as a remedy for hay fever. Onions cause runny noses and itchy eyes, and hay fever causes runny noses and itchy eyes. Homeopathy claims that since both of these cause the same symptoms, onion juice can also cure the symptoms of hay fever.

Let me reiterate: homeopathy claims that using more of something that causes your problems will end up curing your problems. They literally claim that two wrongs make a right. Similarly, they claim that oysters can cure indigestion, arsenic stops diarrhea, and mercury can cure chronic pain.

If homeopathy doesn't already seem ridiculous, it's about to. It's quite obviously not a good idea to ingest arsenic and mercury, and homeopathic remedies certainly wouldn't sell if they immediately killed the people who bought them. This is where the second major claim of homeopathy comes into play: the more a remedy is diluted, the more potent its healing powers will be.

While having the obvious advantage of avoiding killing people by directly poisoning them, the dilutions used in most homeopathic remedies don't help the plausibility of homeopathy as a practice. Homeopathic remedies are commonly prepared by performing a series of dilutions by a factor of 100, where the number of dilutions is referred to as the C number of the remedy. For example, they could take one millilitre of an ingredient, add it to 99 millilitres of water and shake it, then take one millilitre of that and add it to a new 99 millilitres of water, and get a 2C solution.  The original number of dilutions proposed by Hahnemann was 30C - a series of thirty 1% dilutions. This is an equivalent ratio of one part active ingredient in 1,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000  (1 novemdicillion) parts water.

For reference, a 6C homeopathic solution of salt water is supposed to help with irritability, but that's 40 billion times less concentrated than the salt in the ocean. The amount of liquid that's passed through an average 80 year old by the time they die dissolved in the combined water of all the world's lakes, oceans, and rivers is around 8C. What's intriguing is that if you started with a solution containing on mole of original material, at a dilution of 12C there's only a 60% chance of finding a single molecule of the active ingredient, and at a dilution of 13C, you're looking at pure water. A common over-the-counter homeopathic remedy at 30C isn't just essentially water - it is water.

The most popular homeopathic remedy sold is Ocsilloccinum, a 200C dilution of duck liver that is supposed to help with the flu. There are approximately 1080 atoms in the universe, so in order to have enough water to get one molecule of duck liver extract in a solution at this dilution, one would need 10320 universes worth of water. Somehow this is still considered a very potent concentration. Oscillococcinum is labelled as consisting of 0.85 g sucrose and 0.15 g lactose – these are 100% sugar pills.

Homeopathic practitioners can't easily argue with math, and most will readily admit that there is no active ingredient present in the remedies that they sell to patients. Instead, they claim that water has a "memory" and that the dilution and shaking process involved in preparing a homeopathic solution leaves an imprint on the water, thus changing its properties.

There is absolutely no evidence for this. Logically, it also doesn't hold up. As has been pointed out by countless comedians and scientists, it doesn't make any sense that water could remember the tiny amounts of poison once dissolved in it, but forget all the sewage it's come in contact with. Both the ability for water to retain an imprint of a chemical, and its ability to selectively forget other chemicals, would violate basic fundamental laws of physics.

So homeopathy is based on a principle that doesn't make sense, at concentrations that are nonexistent. Yet it is still around. In the United Kingdom, the Royal Homeopathic Hospital has the Queen as their official patron, and homeopathic remedies like Oscillococcinum in France are one of the most common treatments for the flu. Why?

One leading theory is that any perceived benefits of homeopathic water are likely due to a mix of confirmation bias and the placebo effect. Studies have shown that just the act of going to a clean hospital-like environment, listening to a compassionate doctor (or someone perceived to be a doctor), and taking something that you believe to be a medicine can often help with certain conditions. Placebos can have a measurable effect on improving health in certain circumstances, and are well-enough studied that we know a fake needle is more effective than a fake capsule, which is in turn more effective than a fake pill.

Confirmation bias likely also plays an important role in people's opinions on homeopathy. As an example, homeopaths describe a process known as 'homeopathic aggravation' - a temporary worsening of symptoms following a dose of a homeopathic remedy. When a patient takes the dose and then starts to feel worse, the homeopath can claim that's all part of the plan, reassuring the patient and convincing them that the remedy is working. Of course, an alternative explanation for homeopathic aggravation is self-evident - a patient notices they have a runny nose, takes some non-medicine, and then the rest of the flu hits and they claim that's the 'aggravation'. Well, no - that's just how diseases work when they aren't subject to actual medicine.

After hearing these arguments, a homeopath may ask to agree to disagree and claim that since the remedies are so dilute they can't possibly have side effects, but they bring comfort and maybe benefits to the people who buy them, surely there’s no harm in offering it as an alternative medicine.

The harm comes when people spend money on homeopathic remedies, mistaking them for real medicine, instead of going to real doctors. The placebo effect can have noticeable effects on health, but isn't generally capable of curing cancer. Patients with serious medical conditions who forego proven treatments from real doctors put themselves at severe risks they otherwise wouldn't need to experience, much like those who choose to avoid vaccines or sunscreen.

Homeopathy sold alongside real medicine, courtesy of your local Safeway.

Homeopathic remedies do not need to pass the same testing requirements as real medicine to be sold in Canada, but they can still be sold deceivingly on a shelf in a grocery store beside real medicine as though they are equally valid options. Someone desperate for symptom relief who doesn't know any better could easily mistakenly be buying sugar pills and pure water, costing them money and delaying real treatment. This is where the real harm of homeopathy comes from.

Drug regulations require strict testing for a reason, and if homeopathy cannot provide evidence that it works or at least a plausible working mechanism then it should not be portrayed and sold commercially as an equally viable form of treatment.

Monday, May 13, 2013

NHL Playoffs: Two Weeks In

Hey there!

The playoffs have been going on for two weeks now, and I am pleasantly surprised to say that they've been going pretty well in terms of what my model has output. In fact, of the six series that have wrapped up so far, the team that won each one of them was given the highest probability by my model. For instance, my model originally gave the following:

Blackhawks (77.0%) to beat Wild (23.0%)
Red Wings (59.1%) to beat Ducks (40.9%)
Sharks (62.2%) to beat Canucks (37.8%)
Kings (56.9%) to beat Blues (43.1%)
Penguins (64.2%) to beat Islanders (35.8%)
Senators (84.1%) to beat Canadiens (15.9%)

It also predicted the following at the outset:

Rangers (62.1%) to beat Capitals (37.9%)
Bruins (76.7%) to beat Maple Leafs (23.3%)

These last two series will be wrapped up tonight, and hopefully I can keep my success streak up. Currently, though, with a 6-0 record I am very pleased with the model so far. Wish me luck!

Today's post is gonna look a little bit about some of the behind-the-scenes math that goes into this model.

What's really important is to be able to take the odds of winning an individual game and convert those into the odds of winning the series as a whole. Fortunately this can be done pretty easily using a binomial distribution.

It turns out that there are a grand total of 70 ways for a best 4 out of 7 series to work out. They break down as follows:

  • 2 ways for a 4-0 (or 0-4) shut down (12.5% chance if teams are even)
  • 8 ways for a 4-1 or 1-4 finish (25.0%)
  • 20 ways for 4-2 or 2-4 (31.25%)
  • 40 ways for 4-3 or 3-4 (31.25%)
Because NHL playoff series allow for between 4 and 7 repeated games, any advantage that a team has in an individual game gets compounded. For instance, a 50/50 chance of winning a particular game translates to a 50/50 chance of winning the series, but a 60/40 chance of winning a game becomes a 70/30 chance of winning the series as a whole. This can be visualized as follows:


The way that I've set up my model allows for the number of games previously won to factor into the probability for the series, which is convenient for allowing the model to update every day following the results from the previous nights' games. The effect of having a game in hand looks something like this:


One other factor that could have an effect is home team advantage. The series get close to balancing out the number of home games between the two teams, but whenever a series ends on an odd number of games the team who had the first home game ought to have an advantage since they've had more home games, right?

Looking at the last 3 seasons of the NHL, 54.55% of games are won by the home team and 45.45% of games are won by the away team. If we factor this into the model, we get something like this:


Well that's not much of an advantage at all, is it? Probably a good thing.

So there you go. See you again next week!

Monday, May 6, 2013

NHL Playoff Predictions

The NHL playoffs are upon us, and for the third time I'm dusting off my Excel playoff model to see if I can predict who's going to win.

As it stands (as of May 6th, 2013), my model predicts that the most likely final will be between the Ottawa Senators and the Chicago Blackhawks. Altogether, though, the top four teams are the Senators, Blackhawks, Bruins, and Sharks (collectively these account for a 77% chance of winning the whole thing).

One of the ways that I've been presenting the daily updates from the model is as follows:

As time progresses (along the bottom), the height of each colored segment represents the relative probability of that team winning. For instance, when the Senators lost on May 3nd, their bar shrunk noticeably, and grew again after they won on the 5th. Again, the Bruins, Senators, Blackhawks, and Sharks account for a massive amount of the graph (and hopefully don't lose on the first round... that would be awkward).

So what makes me think I'm anywhere near accurate? If you asked me in person, I'd scratch my head and shrug a little. Particularly concerning are the long odds offered to some of the teams I predict to have a good chance of winning offered by sites like SportsClubStats and Bet365.

There are a couple of suggestions that I'm not totally inaccurate, though. Here are some of the results from previous years:
2010: Only correctly predicted the Blackhawks halfway after they started leading in the semi-finals. Maybe not the best prediction...

2012: Predicted the Kings six weeks before they won, once the Blues started to slide a little bit. More surprised about the Eastern conference, though, where the Devils admittedly were not predicted to do all that well.

Of course, the toughest part when it comes to checking how accurate a model is is actually coming up with an objective way of measuring that accuracy. Sure, the Kings won last year, but they only had a 13.5% chance starting out. 13.5% is high relative to other teams, but not really all that great overall. Can I really call it a win that a team with a 13.5% chance to win at the outside beat a bunch of teams at 5-10%?

One way to evaluate accuracy is to use a Brier score for each team, and take an average of all of them over time. A slightly modified Brier score would give a score of 1.0 to a 100% prediction that comes true, and 0.0 if it fails, with various decimal values in between based on what the given prediction was beforehand. If we compare the results from last year's model to what we would expect from pure chance, we get this:

So that's cool. Almost the whole way throughout the playoffs last year, my model gave more precise estimates of who's going to win than chance (assuming every game has a 50-50 chance of going either way). Part of the reason the score is so high near the end is that some teams have already been eliminated, and therefore would have a "perfect" prediction score (even though that's a bit silly). If we remove these teams, we get something more like this:

There are three distinct dips in the graph that represent the end of each round of playoffs. The scores dip because the predictions would get more general (open-ended playoff series making things less predictable, etc.). Even accounting for all this, my model last year was still significantly and consistently above chance. Fancy!

So who knows if the Senators will actually win. It'd be pretty cool if they did, though...

Friday, March 22, 2013

The Economics of 50/50 Draws

"Boy," you might be saying, "this blog has sure posted a lot this month!" You're right! In fact, March so far has had at least twice as many page views as any other month in the existence of this blog. Figuring that this is about as successful as this is ever going to get, I figured I'll just keep posting while the going is hot.

Recently I attended a fair number of arena curling games. People who attend arena curling games often enjoy things like expensive beer, ridiculously addictive popcorn, curling (sometimes), and the 50/50 draw.

A fun way to think about casino games and lotteries (if you're me) is based on their expected return (ok, it's actually not fun at all).

Take Roulette, for instance. If you pick a solid colour in Roulette you have an 18/38 chance of winning, where winning would double your money. Doubling your money isn't quite good enough to break even, though, because 18/38 is slightly less than half. As a result, for every dollar you spend on Roulette, you'd expect to lose 5.26 cents. This is the house edge for Roulette, and what ensures that the casino always comes out on top.

Other common casino games have house edges like 1.41% (pass line in craps), 1.06% (banker bet in Baccarat), and 0.43% (perfect play in Blackjack without counting cards). Slot machines will often run house edges ranging from 7%-15%.

Lotteries are a little bit different. Lotto 6/49, for instance, runs a house edge of about 30%, Keno gambling is approximately 30%-40% depending on the rules, and I suspect that sports betting using SportSelect can get as high as 30%-50%.

Now that we have a reference point, we can compare 50/50 lotteries to these other games. In a basic 50/50 game, everyone could buy $5 tickets, and one person would win 50% of all the money paid into the lottery. Buying one ticket would give you a 1/n chance of winning, and you would win an amount of money equivalent to n/2 time the price per ticket, at a cost of entry of that same price per ticket. As a result, your expected loss per ticket purchased is 50%. This is way worse than pretty much anything else.

Things get a little bit more complicated though. Many arenas nowadays offer the option of paying $5 for 1 ticket, $10 for 3 tickets, or $20 for 10 tickets. Apart from the obvious differences in price per ticket (making $20 for 10 seem a substantially better deal already), how do these different options translate into house edges?

Fortunately I made another set obscure and hard-to-read ternary plots for ya! Check it out:

Due to me not thinking before colouring, the axes are a bit backwards. Along the bottom is the fraction of sales for the $5/1 combo, along the right hand side is the fraction of sales for the $10/3 combo, and along the left hand side is the fraction of sales for the $20/10 combo. If you've never read one of these, check out this cool website on how to do so.

In general, the house edge depends on what everyone else buys, which makes sense. It's interesting just how large this effect is, though. Buying a single ticket for $5 ranges from a house edge of 50% (if everyone else does too) to 80% (if everyone else buys the best combo).

Buying three tickets for $10 ranges from a house edge of 25%-70%, and buying ten tickets for $20 ranges from a house edge of 50% to a player edge of 25%. The player edge, of course, only occurs if you are one of a very tiny number of people buying the $20/10 combo.

Though I can't find any sources for the actual distribution at sporting events, if we had an even split in sales then we'd be looking at a house edge ranging from 40%-75%, depending on which package is purchased. This is by far the worst set of house odds out of any of the games previously mentioned.

50/50 draws are maybe justified in the sense that the money primarily goes to charities, but as an investment (or even just a source of gambling for fun) they're really probably one of the worst things you can do.

See ya!

Thursday, March 21, 2013

Winter Weather

Oh hi! Didn't see you there.

It is now spring! And despite the massive continuous blizzard that appears to be going on outside, we're supposed to be getting warmer. Any day now...

You may have seen my analyses of Summer and Fall for Edmonton weather. Hopefully ever since then you've been on the edge of your seat awaiting the results for winter.

Wait no longer! The winner for winter is: The Weather Network. (three times in a row!)

Scores for winter (out of 100):
Noteworthy about these scores is that Environment Canada climbed from 5th place to 3rd place for the winter, and that everyone's scores (apart from Environment Canada's) continued to decrease from the fall. This is all shown in this graph:


Weather or not (PUN!) temperatures and precipitation are actually tougher to forecast in winter is a question better asked of the actual meteorologists. My suspicion is that at least part of the continued decrease in scores is that trace levels of snow are harder to measure as precipitation than rain, but that's mostly just a guess.


Some fun facts!

Best high temperature prediction: Weather Channel 1-day prediction: 71.84%
Best low temperature prediction: Weather Network 1-day prediction: 68.64%
Best precipitation prediction: Weather Network 1-day prediction: 76.67

Worst high temperature prediction: TimeandDate.com 6-day prediction: 36.30%
Worst low temperature prediction: TimeandDate.com 5-day prediction: 37.64%
Worst precipitation prediction: Environment Canada 6-day prediction: 54.70

Some graphs!

Again, CTV scores are only directly compared to the others for four days. I still find it cool that there is as strong of a downward trend as there is - on average, a forecast for a week in the future is 15% less accurate than a forecast for tomorrow.

For those of you who are still reading and like graphs, you can check out the breakdown of where the previous graph comes from:



Have a good spring!

Wednesday, March 13, 2013

Keep your hands off of my science

Science is great.

Say you want to see which medicine is the most effective at curing the flu. A good test would be to grab a group of sick people and give half of them treatment A and half of them treatment B, and see how they do.

There may be a couple problems with this, though. Maybe when picking the groups you do a bad job and get sicker people in one group than the other, or there's a noticeable age divide. A good way of countering the possibility of bias here is to have truly random group division. If you had a large enough group of people and tossed a coin on each to divide them into two groups, you could expect a reasonably fair trial.

What if the patients taking the medicine have heard rumors about treatment A or B, though? Maybe A seems more serious and they stress out about how ill they are, or they've heard that B is newly-developed and not proven? Fortunately, this is easily countered by doing a blind trial - don't tell any of the patients what medicine they're getting, and then compare the results.

But what if the doctors administering the medicine similarly have heard rumors about either treatment? Maybe they'd pay more attention to the patients with the perceived weaker treatment, or interpret the results to fit their expectations. Countering this has led to one of the pinnacles of scientific testing: the double-blind trial: neither the doctors nor the patients know who is getting what treatment. Only after all the testing is complete and the results are analyzed can the conclusions be actually drawn.

This pursuit of eliminating bias to get fair and true scientific results is one of the best features of science. The problem is that it doesn't stop there.

There is quite simply never enough funding for science. There are virtually unlimited questions about our world (about even just our own bodies) that have yet to be formulated, let alone answered, and there is only ever a limited amount of funding to cover all of the research to be done. Scientists clamor over each other trying to get the funding, which often comes either from government research centers or from corporations.

Now, I have nothing wrong with the idea of corporations investing money in research. I have a problem with how that can (sometimes deliberately) skew the results. While it may sound a bit like a conspiracy, study after study has shown that scientists know who pays the bills, and this has a significant impact on their results. These effects may not always be deliberate, but just like a patient may receive clues from a doctor on how well they think a treatment will work, a researcher may be aware that if they say a product is bad they won't get future funding from that company.

With that all said, I am extremely (bold, italics, and underlined) frustrated with the Government of Alberta's proposal to focus funding away from "curiosity-driven research" and align research funding to coincide with the province's "economic diversification agenda."

Presumably the government wants to make sure it's getting good value for its research dollar, but since when has curiosity-driven research been of low value? Newton and Galileo made great leaps in the name of curiosity, and the most sophisticated piece of technology outside of our world is called Curiosity. Some of the best things we know of like penicillin were only discovered by accident, and vaccinations were only discovered out of pure 'willing-to-sacrifice-little-kids' curiosity.

The only way to eliminate this last major obstacle of bias in science is to make the funding itself blinded. If a company anonymously sponsored scientists in another country to perform research on a drug that also remained anonymous to them, the rest of the research was double-blinded, and the results were made public, we would truly have the highest standard of scientific study. This is the exact opposite of the direction in which the government wants to take research.

At its worst, we could have a government who picks and chooses which cancers are important to study. Or which forms of mining should be improved. Or has an undue influence on the results of climate research. This is bad for innovation, creativity, and the production of true and objective science, and should be fiercely opposed.

Monday, March 11, 2013

Running for the SU?

Now that we're between the Students' Union executive elections and the Council elections, I'd like to take a second to clarify a bit a point I may not have successfully made during my post on the presidential platforms.

In very general terms, the portfolios of the SU Vice Presidents can be spectrumized (scientific term) like this:


On the left hand side we have portfolios that deal with issues external to the university, and on the right hand side we have portfolios that deal more with the running of the SU. The President would be expected to assist with and coordinate all of these, and balance their time accordingly.

An alternative way of looking at the internal/external label is, to quote Pirates of the Caribbean, "What a [duly elected executive] can do, and what a [successful student politician] can't do."

Before anyone gets upset at me, let me clarify - electoral promises that are made on the external side of things are still important. Being the elected representative for 30,000 undergraduate students is not insignificant. Sitting on the board of governors commands a fair amount of respect, and working with other student unions across the country on coordinated lobbying efforts is the most effective way to get the opinions of students heard.

The problem is that, at some (perhaps hyperbolically-simple) level, externally-oriented electoral promises are promises to bring things up and talk about them in meetings. Both candidates for president in the last election promised to research things or start dialogues. And though the SU's research team is phenomenal, and their arguments could be solid, fundamentally anything the SU brings up externally is subject to someone higher up just saying no.

On the other hand, as an executive of an organization, in control of the $10,000,000 budget, it is relatively straightforward to perform internal changes to the SU. Though it's not a great idea to have massive swings in the internal workings of the SU year after year, it is something that an exec would have the definitive say over, and as campaign promises they are much more tangible.

I mention all this also because a fun time is soon to be upon us: SU councillor elections. Yay! While exciting, it's important to keep in mind, once again, what you can do and what you can't do as a councillor when you're developing a platform.

If you're running for council to get the SU to use its considerable lobbying power for a pet project of yours, chances are it won't happen. At best you may be a member of the policy committee, which debates and votes on policy suggestions to council, where they're debated and voted on before being brought up in meetings with officials. On the other hand, if you want to have input on how the SU handles its advocacy, then an externally-oriented platform is legitimate.

More realistically, running for council can be a great opportunity instead to work on the internal portions of the SU. Maybe you hate/love APIRG and other dedicated fees students pay? Maybe you want an influence on the businesses the SU runs, like RATT and Dewey's? Maybe you want to help your Faculty Association regain its FAMF, get generally more involved, and overhaul the electoral system [LAME]?

I strongly encourage anyone even vaguely interested in running to run. The point of all of this is that there are plenty of actual important things you can run on, and a campaign based on external pet projects is likely to result in disappointment for all involved.

Good luck! And remember to get your nomination packages in before 5:00 on Tuesday...