The statistics section of the AP® Biology exam is without a doubt one of the most notoriously difficult sections. Biology students are comfortable with memorizing and understanding content, which is why this topic seems like the most difficult to master. In this article, The Chi Square Test: AP® Biology Crash Course, we will teach you a system for how to perform the Chi Square test every time. We will begin by reviewing some topics that you must know about statistics before you can complete the Chi Square test. Next, we will simplify the equation by defining each of the Chi Square variables. We will then use a simple example as practice to make sure that we have learned every part of the equation. Finally, we will finish with reviewing a more difficult question that you could see on your AP® Biology exam.
Null and Alternative Hypotheses
As background information, first you need to understand that a scientist must create the null and alternative hypotheses prior to performing their experiment. If the dependent variable is not influenced by the independent variable, the null hypothesis will be accepted. If the dependent variable is influenced by the independent variable, the data should lead the scientist to reject the null hypothesis. The null and alternative hypotheses can be a difficult topic to describe. Let’s look at an example.
Consider an experiment about flipping a coin. The null hypothesis would be that you would observe the coin landing on heads fifty percent of the time and the coin landing on tails fifty percent of the time. The null hypothesis predicts that you will not see a change in your data due to the independent variable.
The alternative hypothesis for this experiment would be that you would not observe the coins landing on heads and tails an even number of times. You could choose to hypothesize you would see more heads, that you would see more tails, or that you would just see a different ratio than 1:1. Any of these hypotheses would be acceptable as alternative hypotheses.
Defining the Variables
Now we will go over the Chi-Square equation. One of the most difficult parts of learning statistics is the long and confusing equations. In order to master the Chi Square test, we will begin by defining the variables.
This is the Chi Square test equation. You must know how to use this equation for the AP® Bio exam. However, you will not need to memorize the equation; it will be provided to you on the AP® Biology Equations and Formulas sheet that you will receive at the beginning of your examination.

Now that you have seen the equation, let’s define each of the variables so that you can begin to understand it!
• X2 :The first variable, which looks like an x, is called chi squared. You can think of chi like x in algebra because it will be the variable that you will solve for during your statistical test.
• ∑: This symbol is called sigma. Sigma is the symbol that is used to mean “sum” in statistics. In this case, this means that we will be adding everything that comes after the sigma together.
• O: This variable will be the observed data that you record during your experiment. This could be any quantitative data that is collected, such as: height, weight, number of times something occurs, etc. An example of this would be the recorded number of times that you get heads or tails in a coin-flipping experiment.
• E: This variable will be the expected data that you will determine before running your experiment. This will always be the data that you would expect to see if your independent variable does not impact your dependent variable. For example, in the case of coin flips, this would be 50 heads and 50 tails.
The equation should begin to make more sense now that the variables are defined.
Working out the Coin Flip
We have talked about the coin flip example and, now that we know the equation, we will solve the problem. Let’s pretend that we performed the coin flip experiment and got the following data:
Heads |
Tails |
55 | 45 |
Now we put these numbers into the equation:
Heads (55-50)2/50= .5
Tails (45-50)2/50= .5
Lastly, we add them together.
c2=.5+.5=1
Now that we have c2 we must figure out what that means for our experiment! To do that, we must review one more concept.
Degrees of Freedom and Critical Values
Degrees of freedom is a term that statisticians use to determine what values a scientist must get for the data to be significantly different from the expected values. That may sound confusing, so let’s try and simplify it. In order for a scientist to say that the observed data is different from the expected data, there is a numerical threshold the scientist must reach, which is based on the number of outcomes and a chosen critical value.
Let’s return to our coin flipping example. When we are flipping the coin, there are two outcomes: heads and tails. To get degrees of freedom, we take the number of outcomes and subtract one; therefore, in this experiment, the degree of freedom is one. We then take that information and look at a table to determine our chi-square value:

We will look at the column for one degree of freedom. Typically, scientists use a .05 critical value. A .05 critical value represents that there is a 95% chance that the difference between the data you expected to get and the data you observed is due to something other than chance. In this example, our value will be 3.84.
Coin Flip Results
In our coin flip experiment, Chi Square was 1. When we look at the table, we see that Chi Square must have been greater than 3.84 for us to say that the expected data was significantly different from the observed data. We did not reach that threshold. So, for this example, we will say that we failed to reject the null hypothesis.
The best way to get better at these statistical questions is to practice. Next, we will go through a question using the Chi Square Test that you could see on your AP® Bio exam.
AP® Biology Exam Question
This question was adapted from the 2013 AP® Biology exam.
In an investigation of fruit-fly behavior, a covered choice chamber is used to test whether the spatial distribution of flies is affected by the presence of a substance placed at one end of the chamber. To test the flies’ preference for glucose, 60 flies are introduced into the middle of the choice chamber at the insertion point. A ripe banana is placed at one end of the chamber, and an unripe banana is placed at the other end. The positions of flies are observed and recorded after 1 minute and after 10 minutes. Perform a Chi Square test on the data for the ten minute time point. Specify the null hypothesis and accept or reject it.
Time (minutes) | End With Ripe Banana | Middle of the Chamber | End with Unripe Banana |
1 | 21 | 18 | 21 |
10 | 45 | 3 | 12 |
Okay, we will begin by identifying the null hypothesis. The null hypothesis would be that the flies would be evenly distributed across the three chambers (ripe, middle, and unripe).
Next, we will perform the Chi-Square test just like we did in the heads or tails experiment. Because there are three conditions, it may be helpful to use this set up to organize yourself:
Observed |
Expected |
(O-E)2/E | |
Ripe | 45 | 20 | 31.25 |
Middle | 3 | 20 | 14.45 |
Unripe | 12 | 20 | 3.2 |
Sum | 48.9 |
Ok, so we have a Chi Square of 48.9. Our degrees of freedom are 3(ripe, middle, unripe)-1=2. Let’s look at that table above for a confidence variable of .05. You should get a value of 5.99. Our Chi Square value of 48.9 is much larger than 5.99 so in this case we are able to reject the null hypothesis. This means that the flies are not randomly assorting themselves, and the banana is influencing their behavior.
Summary
The Chi Square test is something that takes practice. Once you learn the system of solving these problems, you will be able to solve any Chi Square problem using the exact same method every time! In this article, we have reviewed the Chi Square test using two examples. If you are still interested in reviewing the bio-statistics that will be on your AP® Biology Exam, please check out our article The Dihybrid Cross Problem: AP® Biology Crash Course. Let us know how studying is going and if you have any questions!
Need help preparing for your AP® Biology exam?

Albert has hundreds of AP® Biology practice questions, free response, and full-length practice tests to try out.