STA 250 - Solution to assignment 1 on "s99testh" data

This is a solution to the first STA 250 assignment for Fall 2000 (PS, PDF) on the "s99testh" data set. Note: Links like the one in the previous sentence are to two version, one in Postscript format, the other in PDF format.

Initial examination of the data

To start, I read in the original data, and gave names to all the variables.

I then produced stem plots of ex-amount, food-amount, weight100, weight200, and lifespan. The stemplot for food-amount showed that the mouse with ID 201 supposedly ate an average of 11.17 grams of food per day. Since this mouse was only allowed 8 grams of food per day, this must be an error. I changed this value to "*" to indicate that its correct value is unknown.

I then looked at side-by-side boxplots of food-amount versus food-allowed (PS, PDF). There are no other points where the amount of food eaten was greater than the amount allowed. The amount of food eaten generally increases with the amount allowed, as one would expect, but the amount eaten is not much different when 8 or 10 grams are allowed than when 6 grams are allowed. Perhaps the group allowed 10 grams of food (and maybe the 8 gram group) could have been omitted from the experiment, saving money.

I also looked at a scatterplot of weight200 and weight100 and saw a positive relationship, as one would expect, with no outlying points that might indicate recording errors.

Observations on mice allowed exercise and lots of food

Using Manip > Subset worksheet , I created a worksheet with only the 20 mice that were allowed exercise and the maximum amount of food (10 grams).

I then looked for a relationship of lifespan to amount of food eaten by producing a scatterplot with sex marked (PS, PDF). In these and later plots, "o"=male and "+"=female. Similarly, I looked for a relationship of lifespan to amount of exercise by looking at a scatterplot for these variables, with sex marked (PS, PDF).

Both plots shows little or no relationship of lifespan to the amount of food or exercise. Perhaps there are no relationships, or perhaps with only 20 mice, the relationships can't be seen given the amount of random scatter in the points.

I looked for a relationship of lifespan to weight at age 200 days using a scatterplot with sex marked (PS, PDF), but I could see no clear relationship. (It does seem, however, that the female mice tend to be heavier.) Note that three of the 20 mice died before age 200 days, and were therefore omitted from this plot.

I did see a clear positive positive relationship in a scatterplot of weight at age 200 days to weight at age 100 days, with sex marked (PS, PDF). I also saw a positive relationship in a scatterplot of weight at age 200 to amount of food eaten, with sex marked (PS, PDF). These relationships are what one would expect. However, no clear relationship of weight at age 200 days to exercise amount can be seen (PS, PDF).

In conclusion, no clear effects on lifespan of exercise or of amount of food eaten can be seen in this observational data. The sample size of 20 is small, however, so we cannot rule out the possibility that fairly weak effects may exist.

Analysis of the experimental data

Since the variables controlled by the experimenters were whether or not exercise was allowed and the amount of food allowed, I first looked at side-by-side boxplots of lifespan divided up by the values of these variables.

The plot of lifespan versus ex-allowed (PS, PDF) shows a fairly substantial increase in median lifespan when exercise is allowed. The median lifespan with exercise allowed is about equal to the third quartile of lifespan when exercise is not allowed, and the median lifespan without exercise is about equal to the first quartile of lifespan when exercise is allowed. Although the maximum lifespans are about the same (the maximum without exercise is even slightly higher), it seems likely that the difference in the medians is due to a real advantage to exercise, not just to chance, considering that the number of mice for each boxplot is 100.

However, the plot of lifespan versus food-allowed (PS, PDF) shows a much weaker relationship, apparently U-shaped, which we might not be convinced is real from just this plot.

To get a clearer idea of how food-allowed influences lifespan, I created two subset worksheets, one containing data on the 100 mice allowed exercise, the other containing data on the 100 mice not allowed exercise. I then produced side-by-side boxplots of lifespan versus food-allowed for the exercise and non-exercise groups.

For the mice not allowed exercise, the plot of lifespan versus food-allowed (PS, PDF) shows a strong relationship. For the mice allowed only 4 grams of food per day, the median, third quartile, and maximum lifespan were all substantially higher than for mice allowed 6 grams of food per day or more. Mice allowed only 5 grams of food also seemed to live longer than those fed more. However, the minimum and first quartile of lifespan did not differ much among the groups allowed different amounts of food. By looking at dotplots of lifespan for each amount of food allowed (PS, PDF), we can see that the distribution when only 4 grams of food are allowed is bimodal, with one mode around 150 days and another around 600 days. For larger amounts of food allowed, the upper mode seems to disappear, while the lower mode broadens a bit to extend up to 300 days.

For mice allowed to exercise, the plot of lifespan versus food-allowed (PS, PDF) is quite different. Lifespan was not shorter for the mice allowed to eat more. The slight differences seen between the groups may well be just due to chance, a conclusion that is supported by the similar appearance of the dotplots of lifespan for different amounts of food allowed (PS, PDF).

The mice allowed exercise had a higher median lifespan for all amounts of food allowed, except for the mice fed the least amount of food (4 grams), for which the median lifespan was slightly lower for those allowed exercise. For all amounts of food allowed, the first quartile of lifespan was substantially higher for those mice allowed to exercise than for those who could not exercise.

In summary, we can conclude that allowing exercise tends to increase lifespan, especially for mice that are allowed to eat more than 4 grams of food. The amount of food allowed seems to have little influence on lifespan if the mice are allowed to exercise, but for mice not allowed to exercise, the amount of food allowed has a big effect on lifespan. For the non-exercise mice, lifespan drops quite a bit once they are allowed to eat more than 4 or 5 grams of food per day. The relationship seems to be non-linear, as can be seen from a fitted line plot (PS, PDF), and from the low R-squared value of 4.5%.

Since the amount of food allowed and whether or not exercise was allowed were varied in a randomized experiment, we can be confident that these conclusions reflect cause and effect, rather than the confounding effects of lurking variables. Looking at other variables may help in understanding why food and exercise have these effects on lifespan.

A plausible explanation is that food and exercise affect lifespan because they affect the weight of the mice, and their weight then affects lifespan, with overweight (and perhaps underweight) mice having shorter lifespans than mice that have a healthy weight. To see whether this explanation is plausible, I plotted lifespan versus weight at age 200 days, with sex marked, for all mice (PS, PDF), for mice allowed exercise (PS, PDF), and for mice not allowed exercise (PS, PDF). Only the plot for mice not allowed exercise seems to show any sort of relationship of lifespan to weight at 200 days, and even in that plot, the negative relationship seen is quite weak. However, one thing that can be seen in all these plots is that the female mice tend to be heavier at age 200 than the male mice. This is true at age 100 as well, as can be seen for all the mice in side-by-side boxplots (PS, PDF).

Because of the variation in weights at age 100, it makes more sense to look at whether lifespan is related to the ratio of weight at age 200 to weight at age 100. I calculated a column with this ratio, called w200/w100, and plotted lifespan versus w200/w100 with sex marked for all mice (PS, PDF), for mice allowed exercise (PS, PDF), and for mice not allowed exercise (PS, PDF). Again, a clear relationship can be seen only in the plot for the mice not allowed exercise. The relationship of lifespan to w200/w100, for which the correlation is -0.452, is stronger than the relationship of lifespan to w200, for which the correlation is -0.228.

Side-by-side boxplots of w200/w100 versus food-allowed for the mice not allowed exercise (PS, PDF), show that the amount of food allowed does indeed influence the ratio of weight at 200 days to the weight at 100 days, which in turn seems to influence lifespan. To see whether the amount of food allowed might have some additional influence, apart from its effect on weight, I plotted the residuals of the regression of lifespan on w200/w100 (for mice not allowed exercise) against food-allowed. This plot (PS, PDF) shows no obvious pattern, so it appears that the effect of the amount of food allowed might be entirely due to the effect on weight.

The plots involving weight200 or w200/w100 do not include the mice that died before age 200. There were 48 such mice, 34 not allowed exercise, and 14 allowed exercise. The omission of these mice may make the relationships appear less strong.

It seems that the reason there is little relationship of lifespan to amount of food allowed when the mice are allowed to exercise may be that these mice control their weight by exercising. This can be seen in side-by-side boxplots of weight200 versus food-allowed for the mice who were allowed exercise (PS, PDF) and the mice not allowed exercise (PS, PDF). The amount of exercise is positively correlated (r=+0.446) with the amount of food eaten (PS, PDF).

Comparison of results from observational and experimental data

In the observational data on mice allowed to exercise and allowed lots of food, little relationship of lifespan to food eaten or amount exercised was found. In the experimental data, both exercise and food were found to have an effect on lifespan in some circumstances, but when mice are allowed to exercise, it appears that they do so to the extent needed to stay healthy. This effect can be seen in the observational data as well. For the 20 mice in this group, I computed the ratio of the amount of food eaten to their weight at age 100, which I called famt/w100, and plotted the amount exercised against this variable, with sex marked (PS, PDF). A strong positive correlation (r=+0.733) is apparent.

This tendency of the mice to adjust the amount they exercise based on the amount of food they eat explains why no relationships of exercise or food amount to lifespan were seen when the mice were allowed to do this.

Conclusions

When mice are not allowed to exercise, the amount of food they are allowed to eat affects their lifespan - mice allowed 6 grams or more of food per day tend to die earlier than mice whose food intake is restricted to 5 grams, who in turn tend to die a bit sooner than mice whose food intake is restricted to 4 grams. However, there is considerable variation in lifespan, and some of the mice not allowed to exercise die early even in the group allowed only 4 grams of food per day.

When mice are allowed to exercise, the amount of food they are allowed to eat has little effect on their lifespan. Regardless of the amount of food they are allowed to eat, they tend to live as long as the mice who weren't allowed to exercise and who were allowed only 4 grams of food, and in fact the number of mice who die very early is less for the mice allowed exercise than for the mice not allowed exercise and allowed only 4 grams of food.

It appears that the reason the mice who were allowed a lot of food but not allowed to exercise tended to die early is that they became overweight. Mice that were allowed to exercise controlled their weight by exercising more if they ate more. However, this explanation is tentative, since we can't rule out the possibility that it is not weight itself, but something associated with weight, that caused the shorter lifespan.