BIOLOGY FOR LIFE
  • 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
      • Lab Practicals
    • 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)
    • Arizona (2022)
    • Florida (2023)
  • Summer Ecology Research

Chi-Square (X2) Goodness of Fit

Chi-square Goodness of Fit is a statistical test commonly used to compare observed data with data we would expect to obtain.   Were the deviations (differences between observed and expected) the result of chance, or were they due to other factors?  

The chi-squared statistic is a single number that tells you how much difference exists between your observed counts and the counts you would expect if there were no difference at all in the population.  A low value for chi-square means there is little difference between what was observed and what would be expected.  In theory, if your observed and expected values were equal (“no difference”) then chi-square would be zero.  Tip: The Chi-square statistic can only be used on numbers. They can’t be used for percentages, proportions, means or similar statistical value. For example, if you have 10 percent of 200 people, you would need to convert that to a number (20) before you can run a test statistic.

Picture
Just like other statistical tests, the Chi-Square Goodness of Fit tests two hypotheses:
Null Hypothesis:
"There is not a significant difference between what was observed and what was expected; any difference between observed and expected is likely due to chance and sampling error."

For example:  
  • There is no significant difference between the numbers rolled on the die; the differences seen between numbers may be due to chance and sampling error.
Alternative Hypothesis:
"There is a significant difference between what was observed and what was expected; the differences between observed and expected is likely not due to chance or sampling error."

For example:  
  • There is a significant difference between the numbers rolled on the die; the differences seen between numbers are likely not due to chance or sampling error.

How to Calculate a Chi-Square Goodness of Fit

Picture
  1. The first step in the calculation of an X2 value is to determine the expected numbers.  In genetics, you'd use a Punnett square to determine the theoretical expected values. ​
  2. Then, use the formula for each observed and expected category: (O-E)2 / E
  3. The results are added together to get a final X2 value.  
  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 categories – 1. ​
​
  • ​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 our calculated value is lower than the critical value in the table at the 0.05 level of significance, we can accept our null hypothesis and conclude that there is NO significant difference between the observed and expected values. 
  • If our calculated value is higher than the critical value in the table at the 0.05 level of significance, we can reject our null hypothesis and conclude that there IS a significant difference between the observed and expected  values.  

Performing a Chi-Square test in Google Sheets

  • The formula to  use is =CHITEST(observed_range, expected_range).  Where "observed_range" is the counts associated with each category of data and "expected_range" is the expected counts for each category under the null hypothesis.

Performing a Chi-Square test in Excel 2016

  • ​Enter your observed and expected values in columns.
  • Click the box in which you want the Chi Square value to be placed
  • Select Insert Function from the Formulas tab
  • Search for Chi Square test and select the CHISQ.TEST from the menu
  • Hit OK
Picture
  • Select all of your observed (actual) results for the Actual_range and all of your expected results for the Expected_range.
  • Hit OK
Picture
  • The resulting value is the P value for the Chi-Square  test.  If you don't want it to be in scientific notation, you can change the format of the number by selecting "number"  instead of "scientific."
  • If the p-value you get is less than 0.05, reject the null hypothesis  and conclude that there is a significant difference between the observed and expected values.  Likewise, if the p-value is more than 0.05, accept the null hypothesis and conclude that there is no significance difference between the observed and expected. ​
Picture

Performing a Chi-Square test with the TI-83/84 

  1. ​Press [2nd MATRIX]
  2. Select [EDIT - > 1:A]
  3. Copy the data by typing in each number and then pressing ENTER
  4. Now press STAT. Under the TESTS sub-menu, scroll down and select C:X2 TEST.  Press ENTER.
  5. Move the cursor down to DRAW and press ENTER.​
  6. If the p-value you get is less than 0.05, reject the null hypothesis  and conclude that there is a significant difference between the observed and expected values.  Likewise, if the p-value is more than 0.05, accept the null hypothesis and conclude that there is no significance difference between the observed and expected. ​
Picture
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
  • 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
      • Lab Practicals
    • 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)
    • Arizona (2022)
    • Florida (2023)
  • Summer Ecology Research