Saturday 28 September 2013

Criticism of the Body Mass Index

The body mass index (BMI) is a metric proposed by Adolphe Quetelet during the mid-nineteenth century to assess human body shape. It is defined as a person's body mass in kilograms divided by the square of their height in metres. 

Since the 1800s, the BMI has seen continued use by health professionals as a quick assessment of one's health. Today, the BMI is still used to judge if a person is obese (BMI > 30 kg/m²), overweight (25 < BMI < 30), normal weight (18.5 < BMI < 25), or underweight (BMI < 18.5 kg/m²). But is the BMI a reasonable metric? Does it make sense for one's body mass to be proportional to the square of one's height? People of above average height, particularly men, often find that their BMI seems high despite being lean and fit. Shorter people, particularly women, similarly may find that their BMI seems low even with noticeable excess weight in the midsection. The BMI standards are most applicable for people who are close to average human height, but the standards lose their usefulness for everyone else. Considering that the average man and woman are already naturally about 8 cm above and below the average human height, respectively, it would seem that BMI immediately tends toward classifying men as overweight and women as underweight.
The BMI assumes this is true. The evidence says it isn't.
The simplest approach to estimating a power relation between mass and height would be to assume that the density of the human body is independent of size and that our bodies exhibit isometry. In simple terms, isometry means that height, breadth, and thickness all change in equal proportion. If a person gets 10% taller, they also get 10% wider across the shoulders and 10% thicker from front to back. The assumption of density's independence of size means that the average density of a tall person is the same for a short person. If both assumptions are true, then we would expect mass to be proportional to the cube of height. 
What we'd expect if all humans were scale copies of each other.
A lesser known index, known as Rohrer's Index or the Ponderal Index, actually makes the assumptions I've just mentioned above. Rohrer's Index is defined as mass divided by height cubed. For reference, the equivalent standards for underweight, overweight, and obese using Rohrer's Index instead of BMI are < 11.0 kg/m³, 14.9 < RI < 17.8, and > 17.8 kg/m³, respectively.

While people generally get wider and thicker as they grow taller, humans don't exhibit true isometry. There is a tendency for taller people to be narrower relative to their height than their shorter counterparts. Babies, with their comparatively large heads and short legs, are also far from being miniature adults. 

Their big heads and tiny legs are adorable, but they also force us to abandon the isometry hypothesis.

If you look at actual data, you find that neither index is very good, though Rohrer's Index seems to work better, especially in pediatrics. We'd like to have a working power law relation between mass and height because it would make the whole mass-to-height type index applicable to more people and probably a more useful health metric as a result. To find a power law relation, we can simply plot mass as a function of height and use the power curve fit option in Excel (or see if log(m) ÷ log(h) is approximately constant)
We're looking for a value of 'p' that has better correlation with data.
From Vital and Health Statistics (Series 11, No. 252), which contains anthropometric data from American adults and children collected between 2007 and 2010, we find that p = 2.48 with R² = 0.98 for males and p = 2.50 with R² = 0.97 for females. According to the data used to create the CDC Growth Charts (published in 2000), p = 2.52 and 2.54 for males and females, respectively (R² = 0.99 and 0.98). Data from Britain's 2003 Health Survey suggests that p = 2.49 and 2.69 fit best for males and females, respectively (R² = 0.97 for both sexes). 
Mass vs. Height of Males (2000 CDC Growth Chart Data)
Even the data which appears in Quetelet's Treatise on Man and the Development of His Faculties indicates 2 < p < 3. Using the data tables he gives for height and weight at different ages, p = 2.35 and 2.40 for males and females, respectively (R² = 0.97 for both sexes). Quetelet presents a separate table showing average weight for a given height. Based on that table, p = 2.21 for males (R² = 0.98) and p = 2.27 for females (R² = 0.96). It appears that the exponent is usually about the same in males as in females, so if we simply take the average of all the values of p we get 2.45. Therefore, the mass index formula we should be using is: 
With this formula, the standards become:
  • Underweight (MI < 14.6)
  • Normal weight (14.6 < MI < 19.8)
  • Overweight (19.8 < MI < 23.7)
  • Obese (MI > 23.7)
With a correct power law, we eliminate the issue of classifying people as overweight or underweight simply because they are significantly taller or shorter than the average human. While the mass index derived from statistical analysis is an improvement over the BMI, it still doesn't overcome the other serious flaws. First, women naturally have a higher body fat percentage than men. Basically, female hormones cause women to grow breasts full of fatty tissue while male hormones cause men to grow larger muscles. The result is, on average, fat accounts for more of a woman's body weight than a man's by about 6 percentage points.

Second, the index doesn't distinguish between lean mass and body fat. Muscle tissue is about 17% denser than fatty tissue, so athletes and gym rats can be lean and fit but still have a total mass that suggests they are overweight according to the BMI standards.

Finally, lean mass accounts for most of a person's mass (except perhaps in a few extreme cases). Any mass index therefore should only correlate well with body fat percentage among the morbidly obese, but for the majority of people mass index and adiposity will correlate poorly.

Health professionals are aware of issues with using a mass index. Romero-Corral et al. (2008) published a study of over 13,000 Americans in the International Journal of Obesity  to assess the accuracy of BMI as a diagnostic tool. Their discussion of the usefulness of BMI evolves around the inability to distinguish between lean mass and fat. They found that BMI > 30 classified 21% of the men and 31% of the women as obese. However, 50% of the men and 62% of the women were actually obese (defined as having greater than 25% or 35% body fat for men or women, respectively).

The accuracy of diagnostic tests is often assessed by positive and negative predictive values. Positive predictive value (PPV) is the probability that a positive test result indicates a correct diagnosis. Negative predictive value (NPV) is the probabilty that a negative result is correct. In Romero-Corral et al, PPV indicates the probability that BMI > 30 correctly identifies a person as obese and NPV indicates the probability that it correctly identifies a person as not obese. They found that the 30 kg/m² benchmark for obesity has a PPV of 87% for men and 99% for women. The NPV was 60% for men and 54% for women. What this all amounts to is a few false positives and a lot of false negatives; 50% of Americans are misidentified by the BMI-defined threshold for obesity.
Obesity diagnoses of the American population using BMI > 30 kg/m².
For every true positive obesity diagnosis using this test, there are 1.31 false negatives.
Despite well-known flaws and such poor accuracy as a diagnostic tool for obesity, the BMI remains commonplace. There are plenty of online BMI calculators. BMI is often included as part of a fitness assessment (I recall that it was calculated during fitness testing in high school gym class). All I can say is that I hope it goes away and that, however BMI classifies you, there's a pretty good chance that it's wrong.


Monday 23 September 2013

Three Basic Principles

There are three basic principles every civil engineer must understand.

F = ma
The simple explanation:
Force is equal to mass times acceleration. Newton said so.
The real explanation:
The equation is just a mathematical expression of Newton's Second Law. It applies to everything in civil engineering. Beams, columns, cranes, entire bridges, flowing water, you name it. All of the forces acting on a non-accelerating system must sum to zero. If a = 0 then F = 0. That's where we get the equations of statics, which are so important that every engineer (not just the CivEs) learns them in their 1st year engineering mechanics class. Because if you don't satisfy statics, the structure will do it for you:
This crane had to tip over in order to satisfy the equations of statics. 

You can't push a rope
 The simple explanation:
If you try, you get this:
Ropes have a habit of offering no resistance to compression.
 The real explanation:
Obviously this doesn't mean that you can't push a rope in the sense that a coil of rope can't be pushed up a hill. But a rope can't be utilized to resist forces in compression, because ropes are made of a bunch of very slender fibers all woven together. To resist tension, the only important geometric parameter is the total cross-sectional area. So when it comes to tension, it doesn't matter if you have one 100 mm² rod or twenty 5 mm² wires. Compression is different. Cross-sectional area is only important when the thing you're squashing is short compared to its thickness. Otherwise, you get buckling and the important geometric parameter becomes the second moment of area (civil engineers call it "moment of inertia"). Providing the same total cross-sectional area with many smaller parts gives you a much smaller moment of inertia. For example, the 100 mm² rod has a moment of inertia of about 796 mm, but the twenty 5 mm² wires have a combined moment of inertia of only about 40 mm. That's a 95% reduction in buckling capacity. Ropes are usually pretty slender to begin with, and then when you go and divide the cross-section up into dozens of fibers, you end up with negligible capacity to resist compression.

Water flows downhill
The simple explanation:
Because of gravity.
It's how rivers work. All of them.

The real explanation:
Again, this doesn't mean water can't be forced to go uphill. How else would everyone get hot showers and flushing toilets in high-rise buildings? But to do so, you have to apply a force large enough to beat gravity. Otherwise, water flows downhill. It's the reason rivers flow from tributaries in the mountains down to lakes or seas below. It's the reason sewage lines are downward sloping wherever possible. Pumping waste uphill costs money, and if there's a problem, the local people are quick to complain about it. It's also the reason flat roofs aren't supposed to actually be flat. They're supposed to be gently sloped towards drains so that the roof doesn't become a swimming pool. If your yard slopes toward your house, you're much more likely to have a wet basement after a heavy rain. Water's everywhere. If not properly controlled, it causes a significant amount of property damage. Putting "water flows downhill" into practice is the best way to manage water and prevent damage. 
This roof slopes to the corner instead of the drain. Stagnant water provides a mosquito breeding ground and can eventually leak through flaws in the roof as it ages.

Thursday 19 September 2013

About Architects, Engineers, and Contractors

An architect is said to be a person who knows very little about a great deal and keeps knowing less and less about more and more until he knows practically nothing about everything.


On the other hand, an engineer is a person who knows a great deal about very little and goes along knowing more and more about less and less until finally he knows practically everything about nothing.


A contractor starts out knowing practically everything about everything, but ends up knowing nothing about anything due to his association with architects and engineers. 


Yet they still somehow manage to create things like these when you put them together:
Kinemax building at Futuroscope, Poitiers, France.

Habitat 67, Montreal, Quebec, Canada.

Civil Justice Center, Manchester, United Kingdom.

Sydney Opera House, Sydney, Australia.

Walt Disney Concert Hall, Los Angeles, California, USA.

Guggenheim Museum, Bilbao, Spain.

Dancing Building, Prague, Czech Republic.

Stata Center, Cambridge, Massachusetts, USA.

Darcons Headquarters, Delicias City, Mexico.

Monday 16 September 2013

Worldwide Beer Production and Consumption

Which countries produce the most beer? Which countries drink the most? Which nation is the drunkest? If you've ever wondered about these questions, this post is for you.

Beer is the world's third-most popular beverage, after water and tea.

I obtained most of my data from the Kirin Institute of Food and Lifestyle, which has been collecting and publishing beer production and consumption data since 1975. When I checked a Wikipedia article on beer consumption, Kirin was listed as the source, but the article on Wikipedia contains several errors, including one which moved Canada up 18 places in the worldwide per capita beer consumption rankings.

This ancient Egyptian model of a brewery is over 4,000 years old.
Chemical evidence reveals that beer existed at least 7,000 years ago in ancient Iran.

Let's look at beer production first. According to Kirin, the top ten beer producing countries in 2010 by total volume were:

  1. China (44,252,936 m³)
  2. USA (22,898,177 m³)
  3. Brazil (12,769,662 m³)
  4. Russia (10,240,000 m³)
  5. Germany (9,568,300 m³)
  6. Mexico (7,988,900 m³)
  7. Japan (5,850,450 m³)
  8. United Kingdom (4,499,700 m³)
  9. Poland (3,600,000 m³)
  10. Spain (3,337,500 m³)
Canada was 18th with 1,964,700 m³. One cubic metre is equal to 1,000 litres, which is about 2,933 bottles (341 mL bottles). In other words, Canada produced over 5.7 billion bottles worth of beer in 2010, about 8.6% of what the Americans produced and only about 4.4% of the amount of beer produced by the Chinese. I created a pie chart to visualize how much each of the top beer-producing countries contribute to the world's beer supply. As you can see, the top five beer-producing countries account for more than half of the world's beer.

Half of the top 25 beer-producing countries contribute only about 1% each to the world's total beer production.

Not surprisingly, it turns out that the countries producing the most beer tend to also be consuming the most beer. According to Kirin, the ten largest consumers of beer in 2010 were:
  1. China (44,683,000 m³)
  2. USA (24,138,000 m³)
  3. Brazil (12,170,000 m³)
  4. Russia (9,389,000 m³)
  5. Germany (8,787,000 m³)
  6. Mexico (6,419,000 m³)
  7. Japan (5,813,000 m³)
  8. United Kingdom (4,587,000 m³)
  9. Spain (3,251,000 m³)
  10. Poland (3,215,000 m³)

As you can see, all of the top ten beer-producing countries were also the top ten beer-consuming countries, the only difference being that Poland and Spain traded 9th and 10th places. Canada consumed 2,311,000 m³ of beer in 2010, which placed us at 14th in the world. Here's another pie chart, this time showing consumption.

More than half of the world's beer is being drunk in just five countries.

Overall, this chart is pretty similar to the previous one. Some interesting changes are that Netherlands and Belgium, the 14th and 20th biggest beer-producers, respectively, don't even crack the top 25 when it comes to beer consumption. Apparently the Dutch like to sell beer abroad much more than they like drinking the stuff. Similarly, Argentina, which didn't appear among the 25 biggest producers, is the 20th biggest consumer of beer worldwide. This gave me the idea of looking at relative national beer surplus or deficit, shown below:

Belgium produces more than twice the amount of beer that it consumes.

It looks like most countries we've looked at consume roughly the same amount of beer they produce. Seventeen of the 26 countries shown consume within 10% of what they produce. Netherlands and Belgium are interesting because they each consume only about half of the amount of beer that they produce, a much larger disparity than any of the other countries I have data for. The French had the largest relative beer deficit, consuming about 26% more beer than they produce. We Canadians also have an appreciable beer deficit, drinking 18% more beer than we produce. 

Now to answer the most important question of all: which country's beer consumption has their population most intoxicated? To answer this, we need to look at beer consumption per capita. China's total beer consumption might be about 19 times that of Canada's, but they've also got about 40 times more people to do the drinking. Based on the 2010 data from Kirin, the ten countries boasting the top beer-drinking peoples are:
  1. Czech Republic (131.7 L/person/year)
  2. Germany (106.8 L/person/year)
  3. Austria (105.8 L/person/year)
  4. Ireland (103.7 L/person/year)
  5. Estonia (90.6 L/person/year)
  6. Lithuania (85.7 L/person/year)
  7. Poland (83.6 L/person/year)
  8. Australia (83.4 L/person/year)
  9. Venezuela (83.0 L/person/year)
  10. Finland (82.7 L/person/year)
This chart shows the top 35 consumers of beer per capita:

Americans, and most Europeans, drink more beer than us.

You might be wondering what happened to China, the country drinking the biggest share of the world's beer. Because of their large population, they rank only 49th in terms of beer consumption per capita. Canada was only 23rd with 68.4 L/person/year (not 5th with 98.5 L/person/year as Wikipedia had first led me to believe). Czech Republic's 131.7 L/person/year is really quite impressive when you realize this works out to an average of a little more than a bottle of beer per day! In one year, the average Czech drinks 107 more Imperial pints of beer than the average Canadian. We can't even take pride in beating the Americans; they were 12th with 78.2 L/person/year. My guess is that Americans, having been brainwashed into believing that baseball is a noteworthy pastime and not wishing for others to see them as "un-American", have to drink a lot of beer in order to suffer through all the baseball games they watch. I mean, I'd drink more too if I thought I had to watch dozens of 3-hour games of baseball to prove my allegiance to my country.

Watching baseball's only slightly more entertaining than watching golf. 

Of course, not all beer has the same alcohol content. Americans like light beers with comparatively low alcohol content. Eastern Europeans generally tend to prefer stronger beers. So perhaps you're wondering if there are any stats on the actual quantity of alcohol consumed from beer-drinking? The answer is 'yes'. The World Health Organization's Global Health Observatory makes global data related to several health topics readily available to anyone. This includes the Global Information System on Alcohol and Health. They've been collecting their own per capita beer consumption data, but report it in terms of litres of pure alcohol per year, which is a better indicator of which countries are the most intoxicated from their beer-drinking. According to WHO, the ten countries most drunk on beer in 2010 were:
  1. Czech Republic (6.79 litres of pure alcohol per person per year)
  2. Austria (6.10 L/person/year)
  3. Germany (6.01 L/person/year)
  4. Lithuania (6.00 L/person/year)
  5. Poland (5.90 L/person/year)
  6. Ireland (5.73 L/person/year)
  7. Serbia (5.01 L/person/year)
  8. Spain (4.87 L/person/year)
  9. Estonia (4.68 L/person/year)
  10. Slovenia (4.59 L/person/year)
Here's yet another bar chart, this time plotted using the data from WHO.

On average, Czechs get more than 101 Calories/day from the alcohol in the beer they drink.

There are some apparent discrepancies between the Kirin and WHO data sets. For instance, Serbians aren't even in the top 35 beer-drinking peoples according to Kirin, but are 7th on WHO's list. Spain also shows up 8th on WHO's list but was only 22nd on Kirin's list. I doubt that the Spanish are drinking such strong beer that it would make up the difference. But for the most part, the two lists agree pretty well. The Czechs are still decisively ahead of everyone else, followed most closely by Austria and Germany. It appears that the American taste for light beer sends them down to 16th place with 4.28 L/person/year. Canadians on the other hand move up to 18th place with 4.20 L/person/year. 

To summarize:
  • China produces and consumes nearly one quarter of the world's beer
  • Canada isn't as big of a beer-drinking nation as some of us would like to believe
  • Don't challenge a Czech to a beer-drinking contest


Saturday 31 August 2013

Are Humans Devolving?

I occasionally come across people arguing that advances in modern science and technology have halted human evolution and that we are now devolving as a species. The basic argument goes something like this: millions of people who would've died because of allergy, disease, birth defect, injury, etc. now survive and reproduce. Therefore, their weaker genes are contaminating the human gene pool and we've defeated natural selection. Sounds reasonable, right? Everyone's familiar with the phrase "survival of the fittest". The survival of weaker people must be a bad thing. 
And this will probably happen. It's "science". 
This argument bears striking resemblance to the reasoning used to justify various compulsory sterilization and euthanasia programs of the early 20th century. However, eugenics has largely disappeared and is now widely considered to be immoral. The Charter of Fundamental Rights of the European Union prohibits eugenics-based practices explicitly. Though the immorality of eugenics doesn't refute the argument that humans are devolving, perhaps it is a clue that the reasoning behind eugenics is flawed. 

I haven't actually taken any biology courses, so I'm probably unqualified to address the devolution argument, but it seems to me that it indicates an oversimplified view of what evolution really is. Suggesting that we no longer evolve is basically saying that humans are a special class of life that breaks all the rules when it comes evolutionary biology. In which case, the theory of evolution requires some significant revision to account for the anomaly that is humanity. 
Aside: I hope that no creationist cherry-picks this blog post for anti-evolution causes.
The phrase "survival of the fittest" is an elegant way to describe natural selection, but perhaps it does so too succinctly and is too easily misinterpreted. The argument that because we co-operate to cheat death we've somehow halted our evolution inherently assumes that "fitness" refers only to physical strength and robustness. When Darwin used the phrase, "fittest" was intended to mean "best adapted for life in their local environment". 

Physically weaker members of a species often still reproduce. In fact, this probably contributes to the species' overall viability by increasing genetic diversity. There is a misconception that in species living in hierarchical groups controlled by alpha males, the alphas do all the mating and all the other guys die bachelors. While alpha males typically mate far more frequently, other males still manage to sneak in a few trysts to pass on their genes. You might say that having the cunning to pass on genes despite inferior strength indicates greater intellectual fitness. Brain overcoming brawn. Clearly, physical fitness is not the only way for a species to survive and reproduce in its environment. 

To elaborate on the importance of intellectual fitness, let's look at tool use. We've mastered the use of tools, but we are not uniquely endowed with this ability. Sea otters use rocks both for prying abalone and to break open their hard-shelled prey. Chimpanzees use sticks to fish for termites, sharpened sticks to spear Senegal bushbabies (which are nocturnal primates, not Senegalese infants), and stone hammer and anvil to break open nuts. Capuchin monkeys also use stone hammer and anvil to break open nuts and seeds. Elephants use sticks to swat flies and chewed up tree bark to plug holes dug for groundwater (preventing evaporation). 
In addition to bashing shellfish with rocks, sea otters do adorable things like hugging their offspring.
Animals capable of tool use have evidently benefited from intellectual fitness during their evolutionary history. Some of these animals would probably not survive if tools were suddenly unavailable today. Yet believers in human devolution don't seem to think that sea otters are also devolving because a lot of them would starve to death if appropriate oyster-smashing rocks became unavailable for some reason. Antibiotics and epi-pens similarly don't reverse human evolution simply because some of us couldn't survive without these tools. 

Creatures can evolve traits to better equip them for survival in their environment, but they can also evolve the intelligence to manipulate their own environment to make it more survivable. Tool use is just an example of manipulation of one's environment, something that many living things do to various extents. Gorilla traps are something humans have added to the gorilla environment. The gorillas need not evolve traits to make them more difficult to ensnare because they already possess the intellectual fitness necessary to dismantle the traps and teach this skill to the younger generations. In other words, the gorillas manipulate their environment to remove a threat to the survival of their species. Fundamentally, this is hardly different from the human campaign to eradicate polio
With humans devolving and apes spearing bushbabies and dismantling snares, this scenario is inevitable.
While our ability to manipulate our environment has progressed far beyond the basic tool use seen in the animal kingdom, our quest for survival is fundamentally the same as any other creature's. The fact that we cannot survive outside the artificial environment of our making doesn't mean our evolution has halted. It is the environment humans actually live in that matters, not the fantastical universe where intelligence is eschewed and human survival is decided by physical fitness alone. In the developed world, the reality is we've created an environment where nutrition is optimal, children are (usually) vaccinated against preventable diseases, and antibiotics and epi-pens are readily available. Under such survivable conditions, it is to be expected that physical fitness becomes less important and what might have been "weaker" genes in the past start to make their way back into the gene pool. The belief that the increase in reported cases of asthma and allergies in children in the industrialized world signifies a devolution of the species is misguided. A rise in the prevalence in peanut allergy is simply to be expected wherever peanut allergy becomes more survivable, because the genes responsible for the condition are no longer a significant threat to fitness. 

Our abilities to co-operate and to manipulate our environment, i.e. our intellectual fitness, serve us far better than our physical fitness today. I think the expectation should be that humans will gradually become smarter as a species while simultaneously making the human environment increasingly survivable. It's what we've been doing for all of documented history (and for a long time prior, too). That hardly seems like devolution to me.

Saturday 24 August 2013

Natural: Not a Synonym for Healthy

More and more I hear and see the word natural used to market products under the premise that natural things are good for you. Why should people equate natural with healthy? There are a plethora of things that occur naturally and are harmful to us. Asbestos; harmful elements like mercuryleadarsenic, and radon; plus poisons like amatoxinbotulinum toxintetrodotoxinricintetanospasmintaicatoxin, and PhTx3 can all be found in nature. Furthermore, how much of our food is truly natural? Even the most basic foods we eat are unnatural. We've hybridized nature's wild fruits, vegetables, and grasses to create nearly all modern crops, artificially increasing yields, edibility, and nutritional value. We've taken nature's wild animals and bred them selectively to artificially make them dumber, more docile, more productive, and meatier. When wild animals see the bountiful feasts we've created for ourselves, they are enticed to take it for themselves. After all, what creature wouldn't want to exploit a new food source which is both plentiful and nutritious? So we have to fight back against birds, rodents, insects, and other natural invaders to preserve our artificially enhanced food sources. Without our intervention, all of the crops and domesticated animals of our creation would disappear. 
Given the opportunity, this robin and his pals will gorge themselves on orchard cherries.
It's difficult to make the argument that we were better off before we started artificially enhancing the human environment. We are smarter, larger, healthier, more comfortable, and have greater longevity than ever before. I doubt that very many of the people buying into the "all-natural" trend would agree that we'd all be better off if we stopped adding Vitamins A & D to milk, iodine to salt, and folic acid to flour. 
Flour fortified with folic acid helps prevent Spina Bifida, much to the chagrin of today's all-naturally fed mothers.
Perhaps instead of letting the latest trend decide for us what is and isn't healthy, we should trust scientific evidence and the people qualified to interpret that evidence. Certified organic food isn't healthier than the regular stuff. There's no significant difference between milk produced by dairy cows and milk produced by dairy cows on the growth hormone rBST. High-fructose corn syrup doesn't hinder weight loss or cause weight gain (consuming too many calories does). 

Even worse than the use of the word natural to market overpriced foods is its use to market herbal supplements. Sure, we've been using some herbal remedies for thousands of years. The efficacy of some natural remedies, like willow bark, is well established and led to improvements in modern medicine.
Powdered willow bark might work, but I'm not convinced it's better for me than Aspirin.
Many other remedies, however, haven't been subjected to the same scientific scrutiny. Herbal supplements don't need to be effective and they don't need to be approved by a regulating body before hitting the market. Health Canada basically only requires that the ingredients of an herbal supplement be labelled correctly and that the stuff doesn't pose a significant health risk if taken as directed. The U.S. FDA has essentially the same relaxed rules. While many supplements are probably harmless, there are a few that could be dangerous. St. John's Wort might help with mild depression, but there isn't enough evidence to use it to treat major depression and it isn't more effective or significantly better tolerated than other antidepressants. Plus, it interacts with a number of different drugs, including oral contraceptives. Comfrey helps heal damaged skin and bone, but its toxic effects on the liver resulted in the FDA banning comfrey preparations intended for ingestion. Kava might help with your anxiety, but it often takes several weeks to start working, and some possible adverse effects include liver damage and dangerous interactions with alcohol and other drugs. Those are just three examples of supplements that have received enough attention to identify some of the risks. There are hundreds of untested, barely regulated supplements out there being marketed with unsubstantiated claims of significant health benefits, and new ones are coming out all the time. Without the clinical testing required of real medicine, the harmful effects of herbal supplements can go undetected longer and affect a much larger number of people. Remember, just because something's been around for a long time doesn't mean that it's right. 

In conclusion, the next time you see the word natural associated with a food or supplement, keep in mind that natural does not equal healthy, many artificial enhancements have made our lives better, and that the word natural has probably been placed there just to sucker you out of some money. 

Friday 2 August 2013

Guessing on Multiple Choice Tests

You've probably heard someone give advice along the lines of "when in doubt, guess 'C'" when taking multiple choice tests. The alleged reasoning behind it is that there's a statistical advantage in guessing 'C' consistently rather than randomizing your answers.

I decided to investigate this claim. Let's first check the case when the professor distributes the correct answers evenly and randomly, not favouring any one letter. Take for example a test with 30 questions, where each answer is independent of the others and there are four choices per question (A, B,C, or D). Assuming that you really have no clue which is the correct answer, any guess has a 25% probability of being correct. This is true regardless of whether you choose randomly (let's ignore for the moment that humans are notoriously bad at generating random values on their own) or if you decide to choose the same letter consistently. Here's why:

The instructor randomly chooses which letter is correct, without bias, so the probability of any letter happening to be the correct answer on a particular question is 25%. If you also guess randomly without favouring any letter (i.e. each letter is guessed, on average, 25% of the time), you should then expect that 25% of the correct answers are 'A', 25% of your guesses are 'A', thus 6.25% of your guesses (25% of 25%) are correct. The same is true of 'B', 'C', and 'D', so that overall you expect 4*6.25% = 25% of your guesses to be correct. Now if you consistently choose 'C' for the same random test, the probability that 'A' is correct is 25% but the probability that you guess 'A' is 0%. This is also true of 'B' and 'D'. When you choose 'C' 100% of the time, overall you should expect that 3*0.25*0 + 1*0.25*1 = 25% of your guesses are correct.

Since the guess is either right or wrong, this is a problem for the binomial distribution. The mean is n*p and the variance is sqrt[n*p*(1-p)], where n is the number of trials and p is the probability of the desired outcome. In our example multiple-choice test, whether you guess randomly or choose 'C' every time, you would expect, on average, to get 30*0.25 = 7.5 correct answers. To reinforce the point that both approaches to guessing are equal here, I simulated 50,000 of these tests in Excel and generated the following plot.
Probability distribution for correct guesses on tests with random answers to four-choice questions.
The average was 7.49 correct answers with a standard deviation of 2.37 when all guesses were random. When 'C' was guessed consistently, the average was 7.50 with a standard deviation of 2.38. The binomial distribution with n = 30 and p = 0.25 predicts an average of 7.50 and a standard deviation of 2.37. It's pretty clear that both guessing schemes give the same results when the correct answers are random and evenly distributed among the possible choices. 

Now that it's clear that there's no advantage if answers are randomly and evenly distributed, let's investigate the case where the instructor favours one letter over the others. It turns out that no matter how biased the instructor's distribution of correct answers might be, if you randomly guess each letter 25% of the time, your probability of choosing the right answer is still 25%. Let's assign unknown probabilities for each letter being assigned as correct by the instructor: pA, pB, pC, and pD. The sum of these unknown probabilities must be unity. So when the probability of guessing A, B, C, or D is 25% each, the probability of being correct is then 0.25pA+0.25pB+0.25pC+0.25pD = 0.25(pA+pB+pC+pD) = 0.25*1 = 25%. That all changes if you consistently choose 'C' though. In this case, your probability of getting the right answer is 0pA+0pB+1*pC+0pD = pC. I varied pC between the most unfavourable case (where 'C' is never the correct answer) to the most favourable (where 'C' is always the correct answer) to generate the following plot:

Probability distribution for correct answers when 'C' guessed consistently for different values of pC.
Obviously, there's some benefit to choosing 'C' if you know that the instructor favours 'C' over the other letters. But you also get screwed if the instructor doesn't like to use 'C' or simply chooses to favour another letter because he wants to penalize the people who always guess 'C'. While it looks pretty nice that more of the curves I plotted are shifted to the right rather than left of the curve for random guessing, if the choice of which letter gets favoured is random, the chance that 'C' is never the right answer is higher than the chance that it is always correct. To illustrate, I ran a simulation which I think is slightly more realistic than the examples above.

I assumed that pB + pC is 54% on average, which is just a guess on my part but I feel it is reasonable because answers aren't randomly assigned a letter. Numerical answers are often ordered from smallest to largest and statements like "All of the above" are reserved only for 'D' because they'd be confusing if they weren't. I used the normal distribution to generate the random variations in individual tests, so that pB + pC can vary from 0 to 1, but is usually close to the average. I similarly used normally distributed random numbers to split up pB and pC, so that on average pC is half of (pB + pC), but can vary from 0 to 100%. Same idea with pA and pD. Random guesses by the test taker are still equally distributed on average between the four choices. Plotted below are the results of 250,000 simulated tests.
Probability distribution for correct answers based on "realistic" multiple choice tests.
With random guessing we expected to be right 25% of the time on average and to see a binomial distribution after many tests. When 'C' is guessed consistently, things get more complicated, but a simple approximation can be found using the normal distribution. As you can see in the plot, the approximation works fairly well. It is clear that random guessing gives you more consistent results than guessing 'C' all the time. Always guessing 'C' increases your chances of getting 1 in 3 guesses right, but it also increases your chances of doing worse than 1 in 6, simply because your results are influenced by how the distribution of answers was biased by the instructor for the particular test. Overall, consistently guessing 'C' resulted in 2% more correct answers. But of the 250,000 simulated tests, random guessing beat consistently guessing 'C' on a total of 125,568 tests (i.e 50.23% of the time).

To summarize, if you happen to know that the creators of the test favour 'C' for correct answers, guessing 'C' consistently gives you an edge. In the long run, sticking with 'C' probably gives you a very slim advantage over random guessing, though guessing randomly gives you better consistency in the results of your guesses.

Wednesday 24 April 2013

Goat Paths

The goat paths I'm talking about are not made by goats, but by humans who choose to regularly imitate goats, repeatedly short-cutting across unpaved areas along narrow pathways. I have nothing against people taking shortcuts once in a while when they're in a hurry and it'll actually save time. Some goat paths are pretty efficient shortcuts. The one pictured below cuts through Blue Quill Park near the Century Park train station.

Goat path traced in red.
The orange indicates one possible goat path to the red line, with the equivalent paved path traced in blue.
Dozens of people take this goat path everyday on their way to and from the station. I've traced one possible variant utilizing this goat path. The orange-red path is about 376 m, compared to the blue path's 634 m. A typical walking speed is about 5 km/h, so the average goat-imitator saves about 7 minutes 40 seconds and 38 Calories taking the shorter path here. Pretty significant if you're in a hurry or inclined towards laziness. But do you have to follow that precise path every time? Does the grass hinder you in such a way that you've developed a preference for the narrow trail worn into the dirt? You have the whole damned field to walk in. Alternate your path every time so that the grass can recover from you walking on it.

When the shortcut doesn't save you an appreciable amount of time, why even bother? Pictured below is just one of many goat paths on the University of Alberta campus. This one is in front of one of the engineering buildings.

Goat path traced in red. Concrete sidewalks traced in blue.
There's also some landscaping approximately where I've drawn that green blob.
Are engineering students being clever, applying the Pythagorean theorem to their morning walk to class? Or are they just being lazy goat-imitators? Using Google maps, I estimated that the red path is about 12 m shorter than the blue path, which means taking the red path saves you less than nine seconds. Nine seconds! Dozens of lazy wannabe engineers make an active choice to emulate the behaviour of the genus Capra, destroying the grass in order to shave nine seconds off their morning commute. In an effort to prevent people from using this goat path, the University paid for some landscaping to be placed in the way. But the goats kept coming, killing a juniper shrub in the process. What's even more ridiculous is that many of these goats use the path when it is wet and muddy, choosing to also get their shoes dirty in an effort to not burn seven tenths of one Calorie. The next time that you're thinking about being a goat, why not stop to consider that it costs money to make the grounds look nice (if you're a student, some of that money comes from your tuition fees) and how your nonsensical destructive actions will save you a negligible amount of time and energy. Then take the sidewalk like you're supposed to.

Or use this handy flowchart. 


Tuesday 23 April 2013

Crazy Conspiracies

I prefer to think that most people are fairly reasonable, rational human beings. But there is an intransigent group of humans among us that choose to ignore facts and perpetuate beliefs in conspiracies such as these:

Chemtrails
This is the belief that those trails of vapor and ice crystals you see in the sky behind an aircraft is really a bunch of harmful chemicals (including metals like aluminum and strontium) being dispersed for any number of reasons (ranging from controlling climate to controlling the population). I especially want to smack the population control types. Obviously, slowly poisoning the entire atmosphere doesn't include the air our would-be overlords are breathing. Hence, it's an excellent method of controlling the masses.

Engineered HIV
This is the belief that HIV was engineered in a sinister plot to create a killer virus, and then tested successfully in Africa. Despite evidence to the contrary, some still believe it was actually first released in the US to kill homosexuals. Most of these theories put the creation of HIV somewhere in the 1970's, though blood and tissue samples in storage from as early as 1959 have tested positive for HIV. More reputable sources believe HIV is a mutation of SIV, which has been around since at least the 19th century, and estimate that HIV probably first entered the human population in the 1930's. On a related note...

AIDS is not the result of HIV
This is the belief that AIDS is caused by illegal drug use or homosexuality. Tell that to all the babies who contracted HIV either during birth or from breastmilk and then died from AIDS as young children.

Global Warming is a Hoax
The belief that the whole global warming thing was made up by the government as a grand scheme to raise taxes and enforce controls on our lifestyles. Not even the old Soviet Union would try to pull off a scheme like that. The increased temperature is well documented. 

Fluoridated water dumbs down the population
Because what every developed country wants to do is try to lower the mental abilities of the entire urban population. An urban population that includes all the people running the country and supposedly came up with the scheme in the first place. By the way, after half a century of fluoridation, it looks like the small amount of fluoride only reduces the incidence of tooth decay and increases the incidence of dental fluorosis in youths (white splotches on the teeth).

The World Trade Centre collapses were an inside job
The belief that the three buildings that collapsed were a controlled demolition. This theory is unfortunately given credibility by people claiming to be architects, engineers, and demolition experts. They say that the buildings fell straight down, just like a controlled demolition. The collapse was not quite so perfect and the dust cloud was much larger than you see in a typical controlled demolition. Uncontrolled fire compromised the whole section, not just a single corner of the building. As beams and columns failed, load paths changed, other beams and columns tried to accept more load. Then they failed too...and when enough of them had failed, progressive collapse started. Then gravity did its thing: pulling things straight down. Believers of the inside job theory like to point at other building fires and say "those didn't collapse" (the Windsor Tower in Madrid is a popular one, which survived a 26-hour fire). Well those buildings weren't struck by large passenger aircraft and their structural and fire designs are often totally different (Windsor Tower wasn't even a steel-framed building, and the parts that were supported by steel columns did collapse after less than 3 hours). NIST conducted a thorough investigation and published a voluminous report that even included answers to some crazy alternative explanations. The collapses were successfully modeled using a computer program. If you watch the videos closely you will find that progressive collapse initiated by severe fire at the damaged levels is what brought the towers down. The rubble revealed that the only parts of the buildings damaged by blast were from the floors involved in the aircraft collisions.  

The Moon Landing was Staged
The belief that the moon landing in 1969 was filmed in a television studio, probably just to try and make those commie bastards in the USSR feel inadequate during that international dick-waving contest we call the Cold War. One of their arguments is that, despite advances in technology, nobody's gone back since 1972. Well, round-trips to the moon are still extravagantly expensive, and still entirely useless. The "soil" and rocks brought back contained very common minerals. Basically, the moon is just a big, cratered, dusty rock that you can't even mine for valuable metals or gemstones. The Americans had put a man up there first, so the Soviets quickly gave up. After nothing more could be learned from exploring the moon, there was no reason to go back. We'll probably go back when we find a way to make it safer and less expensive.

Reptilians Rule the World
The belief that reptilian shape-shifters from the Alpha Draconis star system live on Earth among us, including the British Royal Family and former U.S. president George Bush. People who believe this also believe that most of the reptilians are living in hiding, inside the hollow Earth. 

Church's Chicken Sterilizes Black Men
The belief that fried chicken like Church's or KFC is really a white supremacist plot to wipe out the black people. Apparently the chicken is laced with a drug that only affects black people (because that's how drugs work). Fried chicken tastes good because it's full of salt and fat. Irrespective of gender or race, eating too much of it leads to obesity and associated health problems, but not sterility.

Vaccinations are Linked to Autism/a Means to Implant Tracking Beacons/a Western Plot to Kill or Sterilize Children
The belief that vaccinations have significant health risks, or worse, are a means of controlling or experimenting on us on a massive scale. Apparently, vaccinations are a great way to implant us all with tracking beacons and test experimental warfare and mind-control techniques. Beliefs like this are dangerous because people who don't get vaccinated can put the whole population at greater risk and burden the healthcare system when they get sick. For years, polio and smallpox were on the verge of being completely eradicated, but every time volunteers would go to the third world to vaccinate babies, a religious leader would announce that it was a Western plot to kill or sterilize their children. 

The Tsunamis of 2004 were Caused by the U.S. Military
The belief that the U.S. and Indian militaries, using electromagnetic pulse technology, deliberately caused the tsunamis. Electromagnetic pulse technology. I can tell that these people lack even a rudimentary understanding of physics. A tsunami is essentially a column of water, nearly as deep as the ocean, travelling radially like the ripples in a pond. A small tsunami could conceivably be caused by the deep underwater detonation of a nuclear weapon, but nothing like the ones causing the devastation we saw in 2004. Large tsunamis need a much larger release of energy, like from an earthquake or a massive landslide (the 2004 tsunamis were caused by a massive undersea earthquake).

The Years 611 to 911 AD Never Happened
That is to say, it isn't 2013 right now, it's 1716. This "Phantom time" hypothesis was proposed in 1991. That's right, there was a conscious effort to just make up an entire period of history, and everyone just went along with it. Even if you don't like medieval European historians and think they were making stuff up, you still have radiometric and dendrochronological (counting tree rings) dating methods, and the historical records from China, Korea, India, and Asia Minor. The dude who came up with this ridiculous hypothesis points to the appearance of Romanesque architecture 500 years after the Roman Empire fell. Because nobody anywhere at any time has ever mimicked an older style of architecture.

Lee Harvey Oswald was Framed
The belief that John F. Kennedy's assassin was just a scapegoat. While I have to concede that it would be very difficult to fire Oswald's antiquated rifle three times in eight seconds, I don't believe that it is outside the realm of possibility. There is also no doubt that the second shot came from Oswald and was the bullet that caused all of the injuries. Though the path of the bullet seems impossible to some (earning the nickname "magic bullet"), it has been recreated using computer simulations (including a controversial one that was essentially a video game). Physical recreations have been carried out using marksmen and anatomical dummies. Obviously, with so many variables, the shot can't be duplicated exactly, but these recreations have produced results so similar to the assassination that it seems ludicrous to discount the Warren Commission Report as fiction in favour of some far more implausible explanation.