Web visualizations

A web visualization of the relationship between contingency analysis and the \(\chi\)2 distribution is here.

A set of instructions to work through this visualization tool is one of the activities in the tutorial for this topic.


R labs

A lab on how to carry out contingency analysis in R, and related topics, is here.


Learn R by example

We used R to analyze all examples in chapter 9. We’ve put the code here so that you can too.


Data files


Data for examples

Example 9.2. Aspirin vs. cancer

Cook, N. R., et al. 2005. Journal of the American Medical Association 294: 47-55.

Example 9.3. Toxoplasmosis

Yereli, K., I. C. Balcioglu, and A. Ozbilgin. 2006. Forensic Science International 163: 34-37.

Example 9.4. Parasite control of behavior

Lafferty, K. D., and A. K. Morris. 1996. Ecology 77: 1390-1397.

Example 9.5. Vampire bats and estrous

Turner, D. C. 1975. The vampire bat: a field study in behavior and ecology. Johns Hopkins Press: Baltimore, MD.


Data for problem sets

01. Coffee and cancer

Wilson, K. M., et al. 2011. Journal of the National Cancer Institute 103: 1-9.

03. Divorce after diagnosis

Glanz, M. C., et al. 2009. Cancer 115: 5237-42.

05. Pigeon rumps

Palleroni, A., C. T. Miller, M. Hauser, and P. Marler. 2005. Nature 434: 973-974.

06. Malaria transmission

Koella, J.C., F. L. Sørensen, and R. A. Anderson. 1998. Proceedings of the Royal Society of London, Series B, Biological Sciences (USA) 265: 763-768.

07. Redback spider sexual cannibalism

Andrade, M. C. B. 1996. Science 271: 70-72.

08. Reed frogs and fire

Grafe, T. U., S. Döbler, and K. E. Linsenmair. 2002. Proceedings of the Royal Society of London, Series B, Biological Sciences 269: 999-1003.

09. Fish sex change

Hobbs, J.-P. A., P. L. Munday, and G. P. Jones. 2004. Proceedings of the Royal Society of London, Series B, Biological Sciences 271: 2109-2114.

10. TV violence

Johnson, J. G., et al. 2002. Science 295: 2468-2471.

11. Drinking and heart disease

Doll, R., et al. 1994. British Medical Journal 309: 911-918.

12. Postnatal depression

Patel, R. R., D. J. Murphy, and T. J. Peters. 2005. British Medical Journal 330: 879.

13. Migraines with auras

Schwerzmann, M., et al. 2005. Neurology 65: 1415-1418.

15. CTA screening

SCOT-HEART Investigators. 2018. New England Journal of Medicine 379: 924-933.

16. Mediterranean diet

Trichopoulou, A., et al. 2005. British Medical Journal 330: 991-997.

18. Prairie dog multiple mating

Hoogland, J. L. 1998. Animal Behaviour 55: 351-359.

19. Plasma transfusion on the go

Sperry J. L. 2018. New England Journal of Medicine 379: 315-326.

20. Intuition about lying

Young, E. 2002. New Scientist (https://www.newscientist.com/article/dn2054-intuitive-people-worse-at-detecting-lies/). Accessed July 22, 2019.

22. Contagious yawning

Provine, R. R. 1989. Bulletin of the Psychonomic Society 27: 211-214.

23. Daycare and leukemia

Gilham, C., et al. 2005. British Medical Journal, doi:10.1136/bmj.38428.521042.8F.

24. Blue termites

Šobotník, J., et al. 2012. Science 337: 436-436.

25. Self recognition

Keenan, J. P., et al. 2001. Nature 409: 305.

27. Heat and sterility

Rohmer, C., J. R. David, B. Moreteau, and D. Joly. 2004. Journal of Experimental Biology 207: 2735-2743.

29. Just because

Langer, E., A. Blank, and B. Chanowitz. 1978. Journal of Personality and Social Psychology 36: 635-642.

30. Bereavement and health

Maddison, D., and A. Viola. 1968. Journal of Psychosomatic Research 12: 297-306.

32. Denomination effect

Raghubir, P., and J. Srivastava. 2009. Journal of Consumer Research 36: 701-713.

33. Firearms and suicide

Brent, D.A., et al. 1993. American Journal of Diseases of Children 147: 1066-1071.

34. Nectar spurs

Johnson, S. D., and K. E. Steiner. 1997. Evolution 51: 45-53.

35. Kuru

Mead, S., et al. 2009. New England Journal of Medicine 361: 2056-2065.

36. Vaccination against Lyme Disease

Steere, A. C. 1998. New England Journal of Medicine 339: 209-215


Bulk data

Download a .zip file with all the data for chapter 9 in .csv format here.

Disclaimer: Most data sets used in the book are grabbed from graphs and tables in the original publications, and the values may not be exact. Contact the original authors for the raw data.