SOCR Activity ANOVA FlignerKilleen MeatConsumption
- 1 SOCR Educational Materials - Activities - SOCR Meat Consumption Activity – ANOVA assumptions about the variance homogeneity Activity
- 2 Motivation and Goals
- 3 Summary
- 4 Data
- 5 Exploratory data analyses (EDA)
- 6 Quantitative data analysis (QDA)
- 7 Conclusions
- 8 Practice problems
- 9 See also
- 10 References
SOCR Educational Materials - Activities - SOCR Meat Consumption Activity – ANOVA assumptions about the variance homogeneity Activity
Motivation and Goals
In many developed countries, when people imagine their next meal, they focus on one specific part: the meat. That choice of meat, however, varies from country to country due to the popularity and availability of various domesticated animals. Furthermore, the amount of meat eaten has a surprising degree of variability across time, cultures and geographic regions.
The following activity will study the effects of that variance on the statistical analyses. Specifically, we will consider how deviations from homoscedasticity (also known as equivalence of variance or variance homogeneity) can lead to making some incomplete or even incorrect conclusions. To do so, we will employ the Fligner-Killeen method to analyze some real meet consumption data.
This dataset summarizes the meat consumption, by animal type, of various countries (the European Union (EU) is being treated as a single country in this case). For simplicity, records from countries that did provide consumption measures for all meat types and all years were removed from the data set.
- Number of cases: 147
- Country: The country or world region in question
- European Union
- United States
- Meat: The type of meat
- Years Represented (2000 – 2006)
- Country: The country or world region in question
- Values are in thousands of metric tons
In the following analysis, we will aim to perform an analysis of variance (ANOVA) to compare the meat consumption amounts between different countries and/or across time. Note that the data points for each country-meat type combination are from the various years. Typically, we would expect the amount not to change between the years (especially in this 7-year timespan). Even if it did, in assuming homoscedasticity, we are making the assumption that any increase or decrease is constant between countries. Applying the Fligner-Killeen test will help us decide if this assumption is valid. Look at the bar graphs listed below and note which of them seem to vary more than the others between the years.
Quantitative data analysis (QDA)
Open the SOCR ANOVA-Two Way applet (requires Java-enabled browser). For the following analyses, we will focus on the data for Beef consumption. Let us test to see if different countries eat different amounts of beef. Usually when we compare a set of groups as this one, we would use a one-way ANOVA (comparing the seven countries). To run this test, open up the one-way ANOVA analysis in the SOCR Analyses Applet in a java-enabled browser. It should be the default setting when you open up the page:
Now, prepare your dataset (it will be the Beef table from the above summary tables). We will be treating the yearly results as being our sample’s data points, attempting to capture the overall population consumption. This seems reasonable; the average meet consumption of a country should not change that much in a seven-year timespan.
Once you have rearranged your dataset for use in the ANOVA applet (if you do not know what it should look like, try considering one of the SOCR ANOVA tutorials). It should look like this in the applet data screen:
Rename your column headers to define the independent and dependent variables.
Click on the mapping tab, and assign your independent and dependent variables appropriately:
Set your precision to all, then click calculate:
The following results should appear in the Results tab:
- Sample Size = 49
- Independent Variable = Country
- Dependent Variable = Consumption
- Results of One-Way Analysis of Variance:
- Standard 1-Way ANOVA Table
- Degrees of Freedom = 6
- Residual Sum of Squares = 668292765.4285718000
- Mean Square Error = 111382127.5714286400
- Degrees of Freedom = 42
- Residual Sum of Squares = 5204240.5714285690
- Mean Square Error = 123910.4897959183
- Corrected Total:
- Degrees of Freedom = 48
- Residual Sum of Squares = 673497006.0000004000
- F-Value = 898.8918351858
- P-Value = < 1E-15
- R-Square = 0.9922728082
Note our extremely low p-value. The results of our one-way ANOVA reject the null hypothesis that these countries do not differ in terms of beef consumption. This shouldn’t surprise anyone. Even a third grader could have made that decision after looking at the summary table, or the earlier EDA graphs. Besides, the data represents total volume of meat consumption, whereas the populations of these countries are vastly different, and a per-capita meat consumption analysis may be more appropriate in this case.
However, let’s say that you find a book that claims, using the results of your ANOVA as proof, that “China consumes more beef than any country other than the United States”. That book is saying that these populations are significantly different in terms of their beef consumption. Is this claim justified by the ANOVA analysis above? Going through the assumptions of the ANOVA test, remember that the different levels must follow homoscedasticity (equivalence of variance). If two populations are significantly far from this assumption, then they should be compared using ANOVA. An alternative statistical test needs to be applied (e.g., Kruskal-Wallis test).
To test for homoscedacity, we will use the Fligner-Killeen test, which is a non-parametric test that doesn’t assume normality. This is important, considering that we have a rather limited data set (only seven points, one for each year) and the data may not be normally distributed. Use the tab to find the Fligner-Killeen analysis in the SOCR Analyses Applet in a java-enabled browser:
Next, copy and paste your data into the spreadsheet using the paste button built into the applet. The data copied here is from the Beef summary table (excluding the marginal means). Note that we are treating the cases within each country (one for each year) as the data points. When trends take many years to happen, we can assume that, within a short timespan (such as the 7 years captured here), each year serves as estimates of a generally unchanging population value for that country.
Re-name the data headers to the country names, our levels for this comparison.
Click on the mapping tap and add all of the country names to the next tab.
Finally, select the precision setting “All.” This will display the maximum number of decimal numbers. Afterwards, click “CALCULATE”:
The following results text should appear on the screen:
- Group Brazil
- median = 6400.0
- Group China
- median = 6274.0
- Group Europe
- median = 8194.0
- Group Japan
- median = 1319.0
- Group Mexico
- median = 2368.0
- Group Russia
- median = 2378.0
- Group United States
- median = 12663.0
- Total Size = 49
- Total Mean Score = .784
- Total Variance = .323
- Degrees of Freedom = 6
- Chi-Square Statistic = 19.421
- P-Value = .004
The result from the Fligner-Killeen test (for variance homogeneity) yields a rather small p-value (0.004). Assuming α = 0.05, we would rejects the null hypothesis of equal variances between countries. Therefore, we should be wary of continuing with a standard (parametric) Analysis of Variance (ANOVA). Looking back at the data, it is easy to see why.
Note, for example, that in the data for the Chinese consumption of beef, the values are steadily rising between the years. In our ANOVA, we had made an assumption, that the overall consumption would not follow a set pattern between the years, allowing us to treat them as sample points. This results in a much different variance between the groups. Therefore, it would be incorrect to use our previous conclusion from the ANOVA that “these countries have different population values for meat consumption” without a qualifier of the date range that we were sampling within. Note that without this analysis, you might have missed the trend in Chinese beef consumption—which might be worth studying in its own right.
We can also think about this from a more mathematical perspective. This brings up the fundamental definition of Analysis of Variance, in which we are trying to keep constant the within-group variance of each of our levels (in this case, countries). If we ignore homoscedasticity, from the viewpoint of the algebra involved, we are essentially comparing completely unrelated populations.
Just because the assumptions of ANOVA are not satisfied, we should not give up on this data set. Without the results of the Fligner-Killeen, we may have missed the effects of time on meat consumption, an effect that warrants is own investigation. In such situations, the use of non-parametric alternatives to ANOVA may be appropriate (e.g., Kruskal-Wallis test).
According to the results of the analysis, you will find that there is are significant main effects of locality (F(2, 106) = 18.39651, p < 0.001) and sex (F(1, 106) = 119.23809, p < 0.001) on shell width. The interaction between sex and locality is not significant on shell width (F (2,106) = 1.55056, p > 0.20). Post-hoc tests reveal that t-tests will reveal that there is a significant difference in width between male (M 7106.88136, SD = 247.06778) and female (M = 7578.03773, SD = 256.89806) snails shells (t (110) = 9.88846, p < 0.001). The 99.7% confidence interval for the difference is 471.15638 ± 157.08993. Note that this interval does not include 0 (a lack of difference between the means). There is also a significant difference in width between the snails collected at localities one and two, two and three, & one and three. We leave these analyses to you in the first practice problems
Based on these results, it would be possible to classify whether a Cocholotoma septemspirale is male or female, regardless of the locality it comes from (there is no interaction of the two effects); females have significantly taller shells. Limitations of the study include its correlational nature. One issue with the study, for example, is that age might be a confounding variable, if these snails are the type that grows throughout their lifecycle.
- Finish the post-hoc t-tests for the effect of locality on shell width.
- Complete an analysis similar to the one above, using one of the variables other than shell.h as -your dependent variable. See if that variable would be of use in classifying the snails.
- Complete a new analysis of this pain/neuroimaging data set. Use sex and disease group as independent variables. Choose for your dependent variable one of the brain volumes.
- Che, Annie, Cui, Jenny, and Dinov, Ivo (2009). SOCR Analyses: Implementation and Demonstration of a New Graphical Statistics Educational Toolkit. JSS, Vol. 30, Issue 3, Apr 2009.
- Che, A, Cui, J, and Dinov, ID (2009) SOCR Analyses – an Instructional Java Web-based Statistical Analysis Toolkit, JOLT, 5(1), 1-19, March 2009.
- Dinov, ID. Statistics Online Computational Resource, Journal of Statistical Software, Vol. 16, No. 1, 1-16, October 2006.
- Reichenbach F, Baur H, Neubert E (2012) Sexual dimorphism in shells of Cochlostoma septemspirale (Caenogastropoda, Cyclophoroidea, Diplommatinidae, Cochlostomatinae). ZooKeys 208: 1-16. doi:10.3897/zookeys.208.2869
- Baur H, Reichenbach F, Neubert E (2012) Data from: Sexual dimorphism in shells of Cochlostoma septemspirale (Caenogastropoda, Cyclophoroidea, Diplommatinidae, Cochlostomatinae). Dryad Digital Repository. doi:10.5061/dryad.ns7v7
Translate this page: