Conclusion
Flies fed a High Fat medium had a shorter average lifespan than those fed a Standard medium, at 9.6 and 13.7 days respectively, and this difference is statistically significant. Flies fed a High Fiber medium had an average lifespan of 12.5 days, which was not a statistically significant difference compared to the Standard medium.
Lifespan of the “average” fly is calculated in day fractions based on the percentage of flies observed to be alive during the sample period. For example, on day 1 all (100%) of the flies in a vial are alive, which is recorded as “1.00” day of life. On day 2, if three quarters (75%) of the original flies were alive, then 0.75 would be added, for a total of 1.75. On day 3, if half (50%) of the original flies were alive, then 0.50 would be added, for a total of 2.25. Calculating “days of life” for the average fly in this manner has the advantage of normalizing observations from vials with different numbers of flies.
Given the relatively small number of observations during the 21-day experiment we must test that the assumptions required for the most powerful parametric statistics are satisfied. If not then a non-parametric test is necessary. For example, Student’s t-test is a powerful parametric test, but assumes that the variance of observations is the same. The variance of observations in this experiment are:
which are not the same, and therefore we cannot use Student’s t-test. A modification of the t-test allowing for unequal variances is the Welch Two Sample t-test. While this test permits unequal variances, the assumption of normality remains. Figure 1 illustrates a visual test for normality using a Q-Q plot, meaning a quantile-quantile plot, that draws the correlation between a given sample and the normal distribution, along with a 45-degree reference line.
The samples do not appear to have normal distributions upon visual inspection, which is confirmed by the Shapiro–Wilk test p-value, which is below the critical value of 0.05 for each sample:
Where:
H0: Sample distribution is normally distributed (calculated p-value > critical p-value), or
H1: Sample distribution is not normally distributed (calculated p-value < critical p-value).
Given that the calculated p-value is less than the critical value for each sample we must reject the null hypothesis with 95% confidence that the distribution of observations is normal for each sample. Unfortunately, the standard assumptions required for the most powerful parametric test cannot be satisfied, and therefore we must rely on a less powerful non-parametric test.
The Wilcoxon test is more general than the t-test because it does not assume that the observations belong to any parametric family, and therefore it is a non-parametric test. The disadvantage of the Wilcoxon test is that it is less powerful than the t-test, meaning that a stronger signal from the samples are necessary in order to infer statistical significance.
There are two versions of the Wilcoxon test for either independent or dependent samples. Given that our samples are independent we use the Mann-Whitney-Wilcoxon version of the test. The calculated p-values are compared against the critical value of 0.05:
Where:
H0: Two distributions of the two samples are equal (calculated p-value > critical p-value), or
H1: Two distributions of the two samples are not equal (calculated p-value < critical p-value).
In the first comparison, Standard v. High Fiber medium, the calculated p-value is greater than the critical value, therefore we accept the null hypothesis with 95% confidence that the two samples are equal. For the second comparison, Standard v. High Fat, the calculated p-value is less than the critical value, therefore we reject the null hypothesis with 95% confidence that the two samples are equal. The implication is that the High Fat medium shortened fly lifespans in a statistically significant manner.
This report was created using the R Markdown statistical programming language. The embedded values are re-calculated upon each generation of the report, rather than being hard-coded, to ensure reproducibility. This report is available at: https://rpubs.com/will_boberski/appendix.