Error bars and animal sizes

All Ages
Data Science
Environmental Science
Spreadsheets

In some species, the males have a different average size than the females

Animal dimorphism

The image above shows an example of size dimorphism in the spider species Argiope appensa. On the left is the female and on the right is the male. As you can see there the female (left) is much larger than the male (right).

There are many species where the females are larger than the males (ex. cicadas, some species of Octopus), and there are many examples of species where the males are larger than the females (ex. lions, elephant seals, Orangutangs). In humans, for example, males are on average 7% taller than females. There are, of course, many examples of females who are taller than the average height of males and males who are shorter than the average height of females, but on average men tend to be 7% taller than women.

In some species, like the Argiope appensa spider, the difference is pretty big whereas other species (like cicadas or humans) the difference is not as large as that. How big or how small the difference in average sizes between male and female tells you something interesting about that species and their life cycle! So if there was a new species discovered we would want to know what the size difference was and whether males or females tend to be larger on average.

The problem

If a new species has been discovered we might only have a few specimens to determine the average sizes. If we have at least one male and at least one female we can estimate the difference in average sizes, but how do we know if the few individuals we have to measure are unusually large or small?

Solution: Calculate the error on the mean

We discussed this exact situation in Are my error bars big or small?. Specifically we discussed situations where we have some number of trials and we need to know not just the average value, but we also need to know the uncertainty in the average value (a.k.a. the error on the mean). Here is the procedure that we discussed where we have replaced measuring tire PSI with measuring animal sizes:

If you have multiple specimens that are either all male or all female then you can calculate the error on the mean as follows:

  • Calculate the mean of all the male specimens (later do all these steps again for all the female specimens)
  • For each specimen, subtract that specific size from the mean you just calculated. Take that result and square it.
  • Do this step of subtracting the result of each specimen size from the mean and square it for all your meausrements
  • Take all of these values where you have subtracted the measurement and the mean and squared it and add them all together
  • Take the result of that adding these values together and take the square root
  • Take the result from the square root and divide by the number of measurements

Done! You have calculated the error on the mean! If you just did this calculation for the male specimens, now do the calculation for the female specimens!

New species: Vermicious Knids

Let’s imagine that in the forest someone has stumbled across 8 individuals of a new species called Vermicious Knids (which is a totally fictional name). If you click the button below, it will save a CSV file that you can load into a spreadsheet with information about these 8 individuals. The data has two columns: One for Male or Female, and the other for size. You can assume that the size is in centimeters.

Note that your data from clicking the button above will be different from other people’s data and that’s ok.

Task: Calculate the average size and the error on the mean

There are only 8 rows in the data set. Separate the data into male and female (for example using different tabs in the spreadsheet or different parts of he spreadsheet). Then go ahead and calculate the mean, and then calculate the error on the mean by following the directions in the previous sections.

Here are some questions to consider:

  • Is there a size difference between male and female with Vermicious Knids?
  • If yes, are the males larger or the females larger and by how much?
  • Based on your result for the error on the mean, is it possible that the size difference can be explained by having so few individuals to measure?

Compare results with your classmates

Once you have measured the mean and the error on the mean for both the male and females in the sample of 8 individuals, compare to your classmates. How similar or different are their results from yours? Does everyone agree on whether males or females are larger? How much larger are they finding?

Here is another button where you can download data for a larger sample of Vermicious Knids (100 individual).

Advice: Sort the data by column A

It is possible to take a spreadsheet with 100 rows and to go one by one and separate all the males in the data and the females in the data for analysis, but it would take a long time. This is a situation that happens a lot with spreadsheets. There is data in particular rows that you are interested in, but these rows are not all together. For these situations the answer is to “sort” the data according to the value in one of the columns. In this case we want to sort by male or female, and that information is in Column A. So we want to sort by Column A.

Spreadsheet skill: Sort
When you need to re-arrange a table of data in a spreadsheet according to the value
in a specific column, then look for the option to “sort” the data

Highlight the data by holding shift and clicking on the A of Column A and the B of Column B.

In Google sheets, once you have highlighted the data like you just did, look at the top for the dropdown that says “Data” and look for “Sort sheet” and an option should allow you to “Sort sheet by Column A”. You can sort ascending or descending. Either will do.

In Excel, once you have highlighted the data like you just did, look at the top for the dropdown that says “Data” and just click “Sort Ascending” or “Sort Descending”. Either will do.

Look closely to find the row where the female data ends and the male data begins. When you calculate the average for the female and the average for the male, as well as the error on the mean, the range of the female data and the male data will be important to keep track of.

Analyze the larger data set

Now that you know how to sort the data into male and female, how does your analysis of this data compare to your earlier conclusions?

Two new species: Snozzwanglers and Hornswagglers

There are now three new species: Vermicious Knids, Snozzwanglers and Hornswagglers. Obviously these are all fictional names. You can click on the link below to open up a new window where you can download data about these species. The species are not related so the average size difference between male and female should be treated separately for each species.

Click here to download data about all three species in a new tab

In the link above, you can specify how many individuals of a particular species that you would like. But in real life it would be quite an effort to find 10,000 examples of a brand new species. So think about how many examples you might actually need.

Here are some questions to answer for all three species:

  • Which is larger on average? Male or female?
  • How much bigger or smaller are male or female individuals on average?
  • What is the minimum number of individuals that you would recommend be measured in order to feel like the conclusions about the average size were not being affected by having a small number of measurements.

Other resources

Go to dataclassroom.com and search for Cicada data

CC BY-NC License