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.

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 sizeUses compostDoes notTotal
Small682290
Large9258150
Total16080240

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.

BakePassFailTotal
Morning8436120
Evening6654120
Total15090240

Compute the chi-square statistic term by term, give the degrees of freedom, and decide at α=0.05\alpha = 0.05 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 groupInsuredNot insuredTotal
Reptile83240
Bird5712
Small mammal72128
Total206080

(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 α=0.05\alpha = 0.05.

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.

FormatCompletedWithdrewTotal
In person10218120
Hybrid9030120
Online7842120
Total27090360

(a) Name the test and state the hypotheses. (b) Check the conditions. (c) Compute the statistic and the degrees of freedom. (d) Conclude at α=0.01\alpha = 0.01.

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 sourceBefore 19801980 to 20092010 or laterTotal
Gas663024120
Electric423622100
Wood42241480
Total1509060300

Carry out a chi-square test for independence at α=0.05\alpha = 0.05, 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.

DistanceProducePrepared foodCraftsTotal
Under 2 miles4212660
2 to 10 miles544224120
Over 10 miles543630120
Total1509060300

(a) Compute χ2\chi^2 and the degrees of freedom. (b) Decide at α=0.05\alpha = 0.05 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 χ2\chi^2 and the degrees of freedom, then conclude at α=0.05\alpha = 0.05. (e) A manager reads the result and says it proves the Riverside location causes members to renew. Explain what is wrong with that.

Chi-square two-way table: answer key

  1. 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.

  2. A: homogeneity (four samples, one variable), df=6df = 6. B: independence (one sample, two variables), df=3df = 3. C: goodness-of-fit (one sample, one variable against a claimed distribution), df=3df = 3, and that test is no longer on the AP exam.

  3. Expected counts 75 pass and 45 fail for each bake; χ2=1.08+1.8+1.08+1.8=5.76\chi^2 = 1.08 + 1.8 + 1.08 + 1.8 = 5.76 with df=1df = 1. Since 5.76>3.8415.76 > 3.841 (p about 0.016), reject H0H_0: the pass rates differ.

  4. (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, χ2=1.0667\chi^2 = 1.0667, df=1df = 1, and 1.0667<3.8411.0667 < 3.841, so fail to reject H0H_0.

  5. (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) χ2=12.8\chi^2 = 12.8, df=2df = 2. (d) Since 12.8>9.21012.8 > 9.210 (p about 0.0017), reject H0H_0; completion rates differ by format, and random assignment supports a causal reading.

  6. χ2=4.63\chi^2 = 4.63 with df=4df = 4. Since 4.63<9.4884.63 < 9.488 (p about 0.327), fail to reject H0H_0: no convincing evidence of an association, which is not the same as evidence that the two variables are independent.

  7. (a) χ2=13.5\chi^2 = 13.5, df=4df = 4. (b) 13.5>9.48813.5 > 9.488 (p about 0.0091), so reject H0H_0: 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.

  8. (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) χ2=25.6\chi^2 = 25.6, df=2df = 2, p well under 0.001, so reject H0H_0. (e) Members chose their location, so with no random assignment the test shows a difference, not a cause.

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