Chi-square two-way table worksheet with answer key
8 problems on chi-square two-way table, ready to print for class or homework. The answer key prints on its own page, so hand out everything before it.
Name: ______________________________ Date: ______________ Period: ______
Problem 1
A community garden association takes a random sample of 240 plot holders from its county-wide membership and records the size of the plot each one rents and whether that person uses the shared compost bins.
| Plot size | Uses compost | Does not | Total |
|---|---|---|---|
| Small | 68 | 22 | 90 |
| Large | 92 | 58 | 150 |
| Total | 160 | 80 | 240 |
Find the expected count for all four cells under the null hypothesis of no association, then check the expected-counts condition.
Problem 2
For each study, name the chi-square test that fits and give the degrees of freedom it would use.
- Study A. A parks department draws independent random samples of 120 swimmers at each of four public pools and records which session each swimmer prefers: morning, afternoon, or evening.
- Study B. A librarian takes one random sample of 400 card holders and records both the genre each person borrows most (fiction, nonfiction, graphic novels, or audio) and whether that person uses the library app.
- Study C. A theater takes one random sample of 300 ticket sales and records only the showtime purchased, then asks whether the four showtimes sell in the 40%, 30%, 20%, 10% split the owner claims.
Problem 3
A bakery wants to know whether crust quality depends on when a sourdough loaf is baked. It scores a random sample of 120 loaves from the morning bake and a separate random sample of 120 loaves from the evening bake as either pass or fail on a crust check.
| Bake | Pass | Fail | Total |
|---|---|---|---|
| Morning | 84 | 36 | 120 |
| Evening | 66 | 54 | 120 |
| Total | 150 | 90 | 240 |
Compute the chi-square statistic term by term, give the degrees of freedom, and decide at using the critical value 3.841.
Problem 4
A veterinary clinic takes a random sample of 80 exotic-pet owners from its client list and records the animal group each one owns and whether that owner carries pet insurance.
| Animal group | Insured | Not insured | Total |
|---|---|---|---|
| Reptile | 8 | 32 | 40 |
| Bird | 5 | 7 | 12 |
| Small mammal | 7 | 21 | 28 |
| Total | 20 | 60 | 80 |
(a) Find the expected counts and check the expected-counts condition. (b) Say what you may and may not report. (c) The clinic decides to combine the bird and small-mammal rows into one non-reptile row. Redo the check and carry out the test at .
Problem 5
A coding bootcamp randomly assigns 360 accepted applicants to three delivery formats, 120 to each, and records at the end whether each student completed the program.
| Format | Completed | Withdrew | Total |
|---|---|---|---|
| In person | 102 | 18 | 120 |
| Hybrid | 90 | 30 | 120 |
| Online | 78 | 42 | 120 |
| Total | 270 | 90 | 360 |
(a) Name the test and state the hypotheses. (b) Check the conditions. (c) Compute the statistic and the degrees of freedom. (d) Conclude at .
Problem 6
A county energy office takes one random sample of 300 owner-occupied homes and records each home's primary heat source and the era in which the home was built.
| Heat source | Before 1980 | 1980 to 2009 | 2010 or later | Total |
|---|---|---|---|---|
| Gas | 66 | 30 | 24 | 120 |
| Electric | 42 | 36 | 22 | 100 |
| Wood | 42 | 24 | 14 | 80 |
| Total | 150 | 90 | 60 | 300 |
Carry out a chi-square test for independence at , then interpret the result carefully.
Problem 7
A county extension office takes one random sample of 300 shoppers at a farmers market and records how far each shopper traveled and the category that shopper spent the most on.
| Distance | Produce | Prepared food | Crafts | Total |
|---|---|---|---|---|
| Under 2 miles | 42 | 12 | 6 | 60 |
| 2 to 10 miles | 54 | 42 | 24 | 120 |
| Over 10 miles | 54 | 36 | 30 | 120 |
| Total | 150 | 90 | 60 | 300 |
(a) Compute and the degrees of freedom. (b) Decide at and state a conclusion in context. (c) Identify the cell that contributes most and read what it says. (d) Interpret the p-value in one sentence.
Problem 8
A gym chain wants to know whether one-year renewal rates are the same at its three locations. It takes independent random samples of 240 members from each location and reports only the renewal percentages: Riverside 85%, Downtown 75%, and Northgate 65%.
(a) Name the test and explain what in the design points to it. (b) Rebuild the two-way table of counts. (c) Check the expected-counts condition. (d) Compute and the degrees of freedom, then conclude at . (e) A manager reads the result and says it proves the Riverside location causes members to renew. Explain what is wrong with that.
From statslearn.org/worksheets/chi-square-two-way-worksheet. Free to print and copy for classroom use.
Chi-square two-way table: answer key
Expected counts: small and compost 60, small and no compost 30, large and compost 100, large and no compost 50. All four exceed 5, so the expected-counts condition is met.
A: homogeneity (four samples, one variable), . B: independence (one sample, two variables), . C: goodness-of-fit (one sample, one variable against a claimed distribution), , and that test is no longer on the AP exam.
Expected counts 75 pass and 45 fail for each bake; with . Since (p about 0.016), reject : the pass rates differ.
(a) Expected counts 10, 30, 3, 9, 7, 21; the bird-and-insured expected count of 3 is below 5, so the condition fails. (b) Report the failed condition, not a p-value. (c) Combined 2 by 2: expected 10 in each insured cell and 30 in each not-insured cell, , , and , so fail to reject .
(a) Homogeneity across three treatments. (b) Random assignment holds, the 10% condition is not needed, and expected counts of 90 and 30 all exceed 5. (c) , . (d) Since (p about 0.0017), reject ; completion rates differ by format, and random assignment supports a causal reading.
with . Since (p about 0.327), fail to reject : no convincing evidence of an association, which is not the same as evidence that the two variables are independent.
(a) , . (b) (p about 0.0091), so reject : distance and spending category are associated at this market. (c) The under-2-miles produce cell contributes 4.8 (42 observed against 30 expected). (d) Under independence, about 0.9% of samples of 300 would give a statistic this large or larger.
(a) Homogeneity: three separate samples, one categorical response. (b) Renewed 204, 180, 156; not renewed 36, 60, 84; grand total 720. (c) Expected 180 and 60 at every location, all above 5. (d) , , p well under 0.001, so reject . (e) Members chose their location, so with no random assignment the test shows a difference, not a cause.
Every step is worked at statslearn.org/practice/chi-square-two-way-practice. Free to print and copy for classroom use.
The key gives final answers only. The full worked solution for each problem is on the matching practice set, and every other sheet is on the worksheets page.
More worksheets from this unit
- Chi-square worksheet with answer key
- Checking conditions for inference worksheet with answer key
- Interpreting confidence intervals: worksheet with answer key
- Justifying claims: confidence interval worksheet
- P-value interpretation worksheet with answer key
- Proportion z-test worksheet with answer key
- Margin of error and sample size worksheet with answer key
- Sampling distribution of p-hat worksheet with answer key
- Two-proportion z interval and z test worksheet with answers
- Type I and Type II Error worksheet with answer key