Photo AI

Last Updated Sep 27, 2025

Chi Squared Tests for Contingency Tables Simplified Revision Notes

Revision notes with simplified explanations to understand Chi Squared Tests for Contingency Tables quickly and effectively.

user avatar
user avatar
user avatar
user avatar
user avatar

458+ students studying

21.2.4 Chi Squared Tests for Contingency Tables

Testing for Statistical Independence

Two events, AA andB B, are statistically independent if the fact that one occurs, the probability of the other occurring is not affected.

infoNote

An example of two events that are statistically dependent is the situation in which there are 77 red tokens in a bag and 66 blue. If RR is the event of choosing a red token and BB the event of choosing a blue, if two tokens are chosen (without replacement), then the probability of the second depends on the outcome of the first.

Mathematical Definition of Independence

Events AA and BB are independent if:

P(A and B)=P(A)×P(B)P(A \text{ and } B) = P(A) \times P(B)

In the above example:

P(R and B)=713×612=726P(R \text{ and } B) = \frac{7}{13} \times \frac{6}{12} = \frac{7}{26} P(R)×P(B)=713×613=42169726P(R) \times P(B) = \frac{7}{13} \times \frac{6}{13} = \frac{42}{169} \neq \frac{7}{26}

Thus, RR and BB are not independent.

Chi-Squared Test for Statistical Independence

If we are given a two-way table of data outlining the overlapping occurrence of 22 events, we can use this data to test whether the two events are dependent or independent from one another.

lightbulbExample

Example: Test at the 5% significance level whether the number of bedrooms in a home and the number of children in the home are statistically independent.

Number of Bedrooms0 Children1 Child2 Children3 or More ChildrenTotal
2 or fewer12186440
322180040
4 or more21619340
Total3652257120

Step 1: State the null and alternate hypotheses, assuming independence as the null hypothesis:

H0H_0: Number of bedrooms and number of children are statistically independent

H1H_1: Number of bedrooms and number of children are not statistically independent


Step 2: Based on the assumption that the events are independent, calculate from the totals the expected frequencies.

36120×40120×120=12\frac {36}{120} \times \frac{40}{\cancel{120}} \times \cancel{120} = 12

36120P(0 Children)\frac {36}{120} \quad \text {P(0 Children})

40120P(2 Rooms)\frac {40}{120} \quad P(\le 2 \ Rooms)

120 (Total)120 \ (Total)


Step 3: This method leads to large errors if any entries in the table of expectations are less than 5. If this is the case, columns should be combined to eliminate these values.

Ex012+3+
≤ 21217.38.32.3
31217.38.32.3
≥ 41217.38.32.3

Since there are expectations less than 55, we should combine the "3+3+" column with a neighboring column. Try to combine with a column that has similar characteristics.

Ex012+
≤ 21217.310.6
31217.310.6
≥ 41217.310.6

Now we have all entries greater than or equal to 5.


Step 4: Perform the same column combination to the table of observations.

Obs012+
≤ 2121810
322180
≥ 421622

Step 5: Using the formula:

Contributions=(ObservationsExpectations)2Expected\text{Contributions} = \frac{(\text{Observations} - \text{Expectations})^2}{\text{Expected}}

For the contributions table:

Cont012+
≤ 200.025670.04159
38.3330.0256710.667
≥ 48.3330.1025112.04384
(1212)212=0\frac{(12 - 12)^2}{12} = 0(1817.333)217.333=0.02567\frac{(18 - 17.333)^2}{17.333} = 0.02567

Step 6: The test statistic is the sum of all those contributions. It is called:

χcalc2=:highlight[39.571]\chi^2_{calc} = :highlight[39.571]

To get χ2\chi^2 from the graphical calculator, follow these steps:


This shows us that we need to combine columns 33 and 44. Do this, then re-input the combined observations matrix.


Step 7**: Calculate the number of "degrees of freedom"** and compare your χcalc2\chi^2_{\text{calc}} to the χcrit2\chi^2_{\text{crit}} in the table.

Degrees of freedom are variables whose values are left to advance. If we can deduce the value of a variable, then it is not "free."

The number of degrees of freedom, represented by the Greek letter ν\nu ("nu"), is:

(no of rows1)×(no of columns1)(\text{no of rows} - 1) \times (\text{no of columns} - 1)

Here ν=2×2=:highlight[4]\nu = 2 \times 2 = :highlight[4] (as our combined observations matrix was 3×33 \times 3).

This is the acceptance level but sig level is the rejection level


Step 8: Conclude

:highlight[39.571>9.488]:highlight[39.571 > 9.488]:success[Reject] H0\Rightarrow \text {:success[Reject]} \ H_0

Sufficient evidence to suggest that the number of bedrooms and number of children are not independent.

Yates' Correction

The χ2\chi^2 test is known to provide unreliable results when r = 1. In order to correct for this error, we adjust the contribution formula as follows:

Contribution=(OE0.5)2E\text{Contribution} = \frac{(|O - E| - 0.5)^2}{E}
lightbulbExample

Example: The following contingency table shows the results of 100100 people in a driving test along with their gender:

ResultMaleFemale
Pass3424
Fail2418

Test at the 10% significance level if the outcome of the test is independent of the gender.

  • Null Hypothesis (H0H_0): Result and gender are independent.
  • Alternative Hypothesis (H1H_1): Result and gender are not independent. Since r=1r = 1, we must perform a Yates' correction.

Observed Table:

Expected Table:

Note: Do not use the calculator's test statistic χcalc2\chi^2_{\text{calc}} as Yates' correction is not performed by the calculator.

Contributions:

(3433.640.5)233.64=4984100\frac{(|34 - 33.64| - 0.5)^2}{33.64} = \frac{49}{84100}(2424.360.5)224.36=78300×2\frac{(|24 - 24.36| - 0.5)^2}{24.36} = \frac{7}{8300} \quad \times 2(1817.640.5)217.64=1900\frac{(|18 - 17.64| - 0.5)^2}{17.64} = \frac{1}{900}χcalc2=4984100+278700+1900=257359:highlight[3.303×103]\chi^2_{\text{calc}} = \frac{49}{84100} + 2\frac{7}{8700} + \frac{1}{900} = \frac{25}{7359} \approx :highlight[3.303 \times 10^{-3}] :highlight[3.303×103<2.706]:highlight[3.303 \times 10^{-3} < 2.706]

Conclusion:

  • Do not reject H0H_0
  • Insufficient evidence to suggest that gender and results are dependent.
Books

Only available for registered users.

Sign up now to view the full note, or log in if you already have an account!

500K+ Students Use These Powerful Tools to Master Chi Squared Tests for Contingency Tables

Enhance your understanding with flashcards, quizzes, and exams—designed to help you grasp key concepts, reinforce learning, and master any topic with confidence!

40 flashcards

Flashcards on Chi Squared Tests for Contingency Tables

Revise key concepts with interactive flashcards.

Try Further Maths Further Statistics 1 Flashcards

4 quizzes

Quizzes on Chi Squared Tests for Contingency Tables

Test your knowledge with fun and engaging quizzes.

Try Further Maths Further Statistics 1 Quizzes

29 questions

Exam questions on Chi Squared Tests for Contingency Tables

Boost your confidence with real exam questions.

Try Further Maths Further Statistics 1 Questions

27 exams created

Exam Builder on Chi Squared Tests for Contingency Tables

Create custom exams across topics for better practice!

Try Further Maths Further Statistics 1 exam builder

50 papers

Past Papers on Chi Squared Tests for Contingency Tables

Practice past papers to reinforce exam experience.

Try Further Maths Further Statistics 1 Past Papers

Other Revision Notes related to Chi Squared Tests for Contingency Tables you should explore

Discover More Revision Notes Related to Chi Squared Tests for Contingency Tables to Deepen Your Understanding and Improve Your Mastery

96%

114 rated

Chi Squared Tests

Goodness of Fit

user avatar
user avatar
user avatar
user avatar
user avatar

425+ studying

189KViews

96%

114 rated

Chi Squared Tests

Product Moment Correlation Coefficient

user avatar
user avatar
user avatar
user avatar
user avatar

411+ studying

193KViews

96%

114 rated

Chi Squared Tests

Chi Squared Tests for Standard Distributions

user avatar
user avatar
user avatar
user avatar
user avatar

308+ studying

195KViews
Load more notes

Join 500,000+ A-Level students using SimpleStudy...

Join Thousands of A-Level Students Using SimpleStudy to Learn Smarter, Stay Organized, and Boost Their Grades with Confidence!

97% of Students

Report Improved Results

98% of Students

Recommend to friends

500,000+

Students Supported

50 Million+

Questions answered