Overview
This lecture explains the chi-square (χ²) test, a statistical method used to determine whether differences between observed and expected data are due to chance or an experimental variable. The lesson uses coin and dice examples to illustrate the process.
What is a Chi-Square Test? What Does It Tell You?
- The chi-square (χ²) test is a statistical method for comparing observed data (what you actually measure) to expected data (what you predict based on probability).
- It helps you decide if the differences between observed and expected results are simply due to random chance or if they are likely caused by a variable you are testing.
- The test is especially important in science for analyzing experimental results and determining statistical significance.
What is a Null Hypothesis?
- The null hypothesis is a statement that there is no statistically significant difference between the observed and expected values.
- In other words, it assumes that any variation in the data is due to random chance, not because of the variable being tested.
- The chi-square test is used to decide whether to accept or reject the null hypothesis based on the data.
Key Elements of the Chi-Square Test
- Observed values (O): The actual counts or results collected from an experiment.
- Expected values (E): The predicted counts based on probability, calculated before the experiment.
- The chi-square formula: χ² = Σ[(O – E)² / E], where you sum this calculation for each category or outcome.
- Developed by Carl Pearson in the early 1900s.
Degrees of Freedom and Critical Values
- Degrees of freedom (df): Calculated as the number of possible outcomes minus one (df = outcomes – 1). For example, with two outcomes (heads/tails), df = 1.
- Critical value: A threshold from the chi-square table that your calculated χ² value is compared to. It determines if your results are statistically significant.
- Scientists almost always use a p-value of 0.05 (5% significance level), which corresponds to the 0.05 column in the chi-square table.
What If Your Chi-Squared Value is Greater or Less Than the Critical Value?
- If χ² is GREATER than the critical value:
- You reject the null hypothesis.
- This means the difference between observed and expected values is statistically significant and likely not due to chance. There may be another factor affecting the results.
- If χ² is LESS than the critical value:
- You accept (fail to reject) the null hypothesis.
- This means there is no statistically significant difference between observed and expected values; any variation is likely due to chance.
Example: Coin Flip
- Expected outcome: Flipping 50 coins should give 25 heads and 25 tails.
- Observed outcome: For example, 28 heads and 22 tails.
- Calculate χ²: [(28–25)²/25] + [(22–25)²/25] = (9/25) + (9/25) = 18/25 = 0.72.
- Degrees of freedom: 2 outcomes – 1 = 1.
- Critical value (df = 1, p = 0.05): 3.841.
- Since 0.72 < 3.841, accept the null hypothesis (no significant difference).
Example: Dice Roll
- Expected outcome: Rolling 36 dice, expect 6 of each number (1–6).
- Observed values: Count how many times each number appears.
- Calculate χ² for each outcome and sum.
- Degrees of freedom: 6 outcomes – 1 = 5.
- Critical value (df = 5, p = 0.05): 11.07.
- If calculated χ² < 11.07, accept the null hypothesis.
Practice Problem: Pill Bugs
- With 10 pill bugs, the expected distribution is 5 in wet and 5 in dry.
- Use the chi-square test to compare observed and expected values and determine if the difference is statistically significant.
Key Terms & Definitions
- Chi-square (χ²) test: A statistical method to compare observed and expected data and assess significance.
- Observed value (O): Actual data collected from an experiment.
- Expected value (E): Predicted data based on probability.
- Null hypothesis: Statement that there is no significant difference between observed and expected values.
- Degrees of freedom (df): Number of outcomes minus one.
- Critical value: Threshold from a chi-square table used to accept or reject the null hypothesis.
- p-value (0.05): The probability level used to determine statistical significance (5%).
Action Items / Next Steps
- Apply the chi-square test to the pill bug example to see if the results are statistically significant.