Saturday, August 11, 2012

Error Bars, Average Heights, and Pizza

Loyal reader, have you read your research article yet? Perhaps, you've noticed little lines on all the figures and wondered what they are. Those are error bars.

In the first post, I talked about the type of error that arises due to our finite measurements.This post is about another type of error called standard deviation, which basically relates to the spread of a data set.

You take the magic ruler from the first post and attempt to find the average height of Americans. Ignoring sample size, you take two small groups of five people randomly found on the street.

Group 1 Heights: 5’7”, 5’8”, 5’9”, 5’10”, and 5’11”
Group 2 Heights: 5’3”, 5’6”, 5’9”, 6’0”, and 6’3”

The average height of each of these groups is 5’9”.  However, the variability in these two groups is quite different.

You make a graph without error bars and publish your findings on the arXiv. Your readers conclude that the two groups are quite similar. 
Figure 1: Average Height Graph without error bars

If you make a graph with error bars, now your readers will realize that the two groups are actually pretty different from one another.
Figure 2: Average Height Graph with Error Bars

From Figure 2, you can see that Group 1 has a smaller bar (1.58 inches on each side) because the heights are similar to one another. Group two has a larger bar (4.74 inches on each side) showing that at least one person was very tall and at least one was quite short (Yes, I consider 5'3" to be short, deal with it.).

For those who are interested in the math, the standard deviation tells you the average spread of all data points from the mean of the group.


standard deviation=\sqrt{\frac{1}{N}\displaystyle\sum\limits_{i=1}^N(x_i-\overline{x})^2}

where $\overline{x}$ represents the average.
(Check out a worked example here: http://en.wikipedia.org/wiki/Standard_deviation)

You're probably thinking "This is all well and good, but how does this relate to my life?"

So let's use another important life example: sharing pizza with a group of people. (If you don't eat pizza, pretend I'm talking about something else that comes in slices like pie or quiche*).

You want to compare the pizza eating habits of two groups of friends. Group 1 eats on average 2.1 slices of pizza per person, and Group 2 averages 3.6 slices of pizza per person. (Somehow, you have created a controlled experiment that accounts for deep dish versus thin slices and the different toppings people like.)

“Aha!” you say, “I’m never inviting someone from Group 2 over, they’ll eat me out of house and home.”

Luckily, you remember that the mean isn't enough to characterize a data set so you look at the standard deviations of the groups as well.

Figure 3: Graph of Pizza Eating Habits

Group 2 has a much larger standard deviation than Group 1. In the context of pizza, this means that some people in Group 2 ate way more than 3.6 slices (and probably made themselves sick), and some people ate fewer than 3.6 slices.

Additionally, the standard deviation of Group 1 demonstrates that there were some people in Group 1 who also ate at least 3.6 slices of pizza.

Thus, just excluding people from Group 2 will not guarantee guests who eat sparingly.

You conclude that although the means are different, this difference between the two groups may not actually be that important (in science, this relates to something called statistical significance which I’ll explore in a later post). You resign yourself to just inviting everyone over and ordering lots of pizza**.

*Note: I do not recommend eating this much pie or quiche in one sitting.

** Law of Pizza: No matter how much pizza you order for a group, it will get eaten even if people aren't that hungry.

No comments:

Post a Comment