BIOLOGY FOR LIFE
  • IB Biology I
  • IB Biology II
  • Syllabus
    • Core >
      • 1: Cell Biology >
        • 1.1: Introduction to Cells
        • 1.2: Ultrastructure of Cells
        • 1.3: Membrane Structure
        • 1.4: Membrane Transport
        • 1.5: The Origin of Cells
        • 1.6: Cell Division
      • 2: Molecular Biology >
        • 2.1: Molecules to Metabolism
        • 2.2: Water
        • 2.3: Carbohydrates and Lipids
        • 2.4: Proteins
        • 2.5: Enzymes
        • 2.6: DNA and RNA
        • 2.7: DNA Replication, Transcription and Translation
        • 2.8: Cell Respiration
        • 2.9: Photosynthesis
      • 3: Genetics >
        • 3.1: Genes
        • 3.2: Chromosomes
        • 3.3: Meiosis
        • 3.4: Inheritance
        • 3.5: Genetic Modification and Biotechnology
      • 4: Ecology >
        • 4.1: Species, Communities and Ecosystems
        • 4.2: Energy Flow
        • 4.3: Carbon Cycling
        • 4.4: Climate Change
      • 5: Evolution and Biodiversity >
        • 5.1: Evidence for Evolution
        • 5.2: Natural Selection
        • 5.3: Classification and Biodiversity
        • 5.4: Cladistics
      • 6: Human Physiology >
        • 6.1: Digestion and Absorption
        • 6.2: The Blood System
        • 6.3: Defense Against Infectious Disease
        • 6.4: Gas Exchange
        • 6.5: Neurons and Synapses
        • 6.6: Hormones, Homeostasis and Reproduction
    • Higher Level >
      • 7: Nucleic Acids >
        • 7.1: DNA Structure and Replication
        • 7.2: Transcription and Gene Expression
        • 7.3: Translation
      • 8: Metabolism, Cell Respiration & Photosynthesis >
        • 8.1: Metabolism
        • 8.2: Cell Respiration
        • 8.3: Photosynthesis
      • 9: Plant Biology >
        • 9.1: Transport in the Xylem of Plants
        • 9.2: Transport in the Phloem of Plants
        • 9.3: Growth in Plants
        • 9.4: Reproduction in Plants
      • 10: Genetics and Evolution >
        • 10.1: Meiosis
        • 10.2: Inheritance
        • 10.3: Gene Pools and Speciation
      • 11: Animal Physiology >
        • 11.1: Antibody Production and Vaccination
        • 11.2: Movement
        • 11.3: Kidney and Osmoregulation
        • 11.4: Sexual Reproduction
    • Options >
      • D: Human Physiology >
        • D.1: Human Nutrition
        • D.2: Digestion
        • D.3: Functions of the Liver
        • D.4: The Heart
        • D.5: Hormones and Metabolism
        • D.6: Transport of Respiratory Gases
  • IB Requirements
    • Learner Profile
    • Group 4 Project
    • External Exam
    • Internal Assessment >
      • Personal Engagement
      • Exploration
      • Analysis
      • Evaluation
      • Communication
    • Extended Essay
  • Investigation Skills
    • Lab Safety
    • Microscopy
    • Lab Drawings
    • Data Tables
    • Measurement
    • Statistics >
      • Descriptive Statistics >
        • Skew
        • Measures of Central Tendancy
        • Measures of Spread
        • Pearson Correlation
      • Inferential Statistics >
        • T-Test
        • ANOVA
        • Kruskal-Wallis
        • X2 Test for Independence
        • X2 Goodness of Fit
    • Graphing >
      • Graphing with Excel
      • Interpreting Error Bars
    • Error Analysis
  • Course Info
    • Above & Beyond >
      • Biology Club
      • Pumpkin Carving
      • Scavenger Hunt
      • Science News
      • IB Bio Dance
      • Wood Duck Project
      • Invasive Crayfish Project
    • Assessment >
      • Class Grading IB Bio I
      • Class Grading IB Bio II
      • Daily Quizzes
      • WICC Assessment
      • Lab Practicals
    • Assessment Statements
    • Class Photos
    • Recommendations
    • Supplemental Reading
  • Contact
  • About
    • Philosophy
    • Resume
    • Reflection
    • Site Feedback
    • Favorite Quotes
    • AEF Blog
  • Expeditions
    • Bahamas (2009)
    • Trinidad (2010)
    • Trinidad (2011)
    • Ecuador (2012)
    • Trinidad (2013)
    • Peru (2014)
    • Bahamas (2015)
    • Peru (2016)
    • Costa Rica (2017)
    • Costa Rica (2018)
    • Peru (2020)
  • Alumni
  • Summer Ecology Research

Chi-Square (X2) Test for Independence 

Chi-square Test for Independence is a statistical test commonly used to determine if there is a significant association between two variables.  For example, a biologist might want to determine if two species of organisms associate (are found together) in a community. 
Picture
Does Species A associate with Species B?
Picture
Species A
Picture
Species B
Just like other statistical tests, the Chi-Square Test for Independence tests two hypotheses:
Null Hypothesis:
"There is not a significant association between variables, the variables are independent of each other; any association between variables is likely due to chance and sampling error."

For example:  
  • There is no significant association between Species A and Species B; the species are independent of each other.  The location of Species A has no effect on the location of Species B.
Alternative Hypothesis:
"There is a significant (positive or negative) association between variables; the association between variables is likely not due to chance or sampling error."

For example:  
  • There is a significant association between Species A and Species B; the species are dependent.  Either Species A significantly associates with Species B or Species A does not significantly associate with Species B.

How to Calculate a Chi-Square Test of Independence

The first step is to collect raw data for the occurrence of each variable.  This is often done via random sampling using a quadrant.  In our example, there are five quadrants.  Determine: 
  • The number of quadrants with both species present
  • The number of quadrants with Species A but not Species B
  • The number of quadrants with Species B but not Species A
  • The number of quadrants with neither species 
Picture
Then create a "contingency table" to display your results.  In the Chi-Square test, these are your OBSERVED values.
Picture
Next you need to determine what would be EXPECTED assuming the species are randomly distributed with respect to each other.   Expected frequencies = (row total X column total) / grand total
Picture
Picture
Now that you have OBSERVED and EXPECTED values, apply the Chi-Square formula in each part of the contingency table by determining (O-E)2 / E for each box.
Picture
Picture
Picture
The final calculated chi-square value is determined by summing the values:
  • X2 = 0.0 + 0.1 = 0.1 + 0.2 = 0.4

The calculated X2 value is than compared to the “critical value  X2” found in an X2 distribution table.  The X2 distribution table represents a theoretical curve of  expected results. The expected results are based on DEGREES OF  FREEDOM. 

Degrees of Freedom = (number of rows - 1) X (number of columns - 1)
In our example, DF = (2-1) X (2-1) = 1 X 1 = 1
*the row and column for the total in the contingency table are not included
 
The X2 distribution table is organized by the Level of  Significance.  The level of significance is the maximum tolerable probability of accepting a false null hypothesis.  We use 0.05.  ​
Picture
  • If the calculated value is lower than the critical value in the table at the 0.05 level of significance, accept the null hypothesis and conclude that there is NO significant association between the variables.   

  • If the calculated value is higher than the critical value in the table at the 0.05 level of significance, reject the null hypothesis and conclude that there IS a significant association between the variables.  ​
​
For example, with a DF=1, a value greater than 3.841 is required to be considered statistically significant (at p = 0.05). Since the X2 we calculated (0.4) is less than 3.841, there is NOT a significant association between Species A and Species B.  The location of Species A has no significant effect on the location of Species B, any association between species is likely due to chance and sampling error.
I give many of my IB Biology resources away, for the benefit of students and teachers around the world. 
If you've found the materials helpful, please consider making a contribution of any amount
to 
this Earthwatch Expedition Fund. 

​Did I forget something?  Know of a mistake? Have a suggestion?  Let me know by emailing me here.

Before using any of the files available on this site,
​please familiarize yourself with the 
Creative Commons Attribution License. 
​​​It prohibits the use of any material on this site for commercial  purposes of any kind.  ​


"When we try to pick out anything by itself, we find it hitched to everything else in the Universe." 
 John Muir,   1911
  • IB Biology I
  • IB Biology II
  • Syllabus
    • Core >
      • 1: Cell Biology >
        • 1.1: Introduction to Cells
        • 1.2: Ultrastructure of Cells
        • 1.3: Membrane Structure
        • 1.4: Membrane Transport
        • 1.5: The Origin of Cells
        • 1.6: Cell Division
      • 2: Molecular Biology >
        • 2.1: Molecules to Metabolism
        • 2.2: Water
        • 2.3: Carbohydrates and Lipids
        • 2.4: Proteins
        • 2.5: Enzymes
        • 2.6: DNA and RNA
        • 2.7: DNA Replication, Transcription and Translation
        • 2.8: Cell Respiration
        • 2.9: Photosynthesis
      • 3: Genetics >
        • 3.1: Genes
        • 3.2: Chromosomes
        • 3.3: Meiosis
        • 3.4: Inheritance
        • 3.5: Genetic Modification and Biotechnology
      • 4: Ecology >
        • 4.1: Species, Communities and Ecosystems
        • 4.2: Energy Flow
        • 4.3: Carbon Cycling
        • 4.4: Climate Change
      • 5: Evolution and Biodiversity >
        • 5.1: Evidence for Evolution
        • 5.2: Natural Selection
        • 5.3: Classification and Biodiversity
        • 5.4: Cladistics
      • 6: Human Physiology >
        • 6.1: Digestion and Absorption
        • 6.2: The Blood System
        • 6.3: Defense Against Infectious Disease
        • 6.4: Gas Exchange
        • 6.5: Neurons and Synapses
        • 6.6: Hormones, Homeostasis and Reproduction
    • Higher Level >
      • 7: Nucleic Acids >
        • 7.1: DNA Structure and Replication
        • 7.2: Transcription and Gene Expression
        • 7.3: Translation
      • 8: Metabolism, Cell Respiration & Photosynthesis >
        • 8.1: Metabolism
        • 8.2: Cell Respiration
        • 8.3: Photosynthesis
      • 9: Plant Biology >
        • 9.1: Transport in the Xylem of Plants
        • 9.2: Transport in the Phloem of Plants
        • 9.3: Growth in Plants
        • 9.4: Reproduction in Plants
      • 10: Genetics and Evolution >
        • 10.1: Meiosis
        • 10.2: Inheritance
        • 10.3: Gene Pools and Speciation
      • 11: Animal Physiology >
        • 11.1: Antibody Production and Vaccination
        • 11.2: Movement
        • 11.3: Kidney and Osmoregulation
        • 11.4: Sexual Reproduction
    • Options >
      • D: Human Physiology >
        • D.1: Human Nutrition
        • D.2: Digestion
        • D.3: Functions of the Liver
        • D.4: The Heart
        • D.5: Hormones and Metabolism
        • D.6: Transport of Respiratory Gases
  • IB Requirements
    • Learner Profile
    • Group 4 Project
    • External Exam
    • Internal Assessment >
      • Personal Engagement
      • Exploration
      • Analysis
      • Evaluation
      • Communication
    • Extended Essay
  • Investigation Skills
    • Lab Safety
    • Microscopy
    • Lab Drawings
    • Data Tables
    • Measurement
    • Statistics >
      • Descriptive Statistics >
        • Skew
        • Measures of Central Tendancy
        • Measures of Spread
        • Pearson Correlation
      • Inferential Statistics >
        • T-Test
        • ANOVA
        • Kruskal-Wallis
        • X2 Test for Independence
        • X2 Goodness of Fit
    • Graphing >
      • Graphing with Excel
      • Interpreting Error Bars
    • Error Analysis
  • Course Info
    • Above & Beyond >
      • Biology Club
      • Pumpkin Carving
      • Scavenger Hunt
      • Science News
      • IB Bio Dance
      • Wood Duck Project
      • Invasive Crayfish Project
    • Assessment >
      • Class Grading IB Bio I
      • Class Grading IB Bio II
      • Daily Quizzes
      • WICC Assessment
      • Lab Practicals
    • Assessment Statements
    • Class Photos
    • Recommendations
    • Supplemental Reading
  • Contact
  • About
    • Philosophy
    • Resume
    • Reflection
    • Site Feedback
    • Favorite Quotes
    • AEF Blog
  • Expeditions
    • Bahamas (2009)
    • Trinidad (2010)
    • Trinidad (2011)
    • Ecuador (2012)
    • Trinidad (2013)
    • Peru (2014)
    • Bahamas (2015)
    • Peru (2016)
    • Costa Rica (2017)
    • Costa Rica (2018)
    • Peru (2020)
  • Alumni
  • Summer Ecology Research