Skip to content
Calcapedia
Number of problems

In the print window, choose “Save as PDF” as the printer (or print it on paper). Seed 1 rebuilds this exact sheet.

Showing 10 problems, seed 1.

Chi-Square Test worksheet

Grade 12 to college

Solve each problem and show your work. Round answers to 2 decimal places where needed.

  1. Problem 1.
    • Test: Independence (a contingency table of two variables)
    • Observed table (rows separated by semicolons): 1, 32; 59, 39
    • Apply Yates' continuity correction (2 × 2 tables only): No
    • Significance level (α): 0.05

    Find: p-value

  2. Problem 2.
    • Test: Independence (a contingency table of two variables)
    • Observed table (rows separated by semicolons): 19, 30; 9, 17
    • Apply Yates' continuity correction (2 × 2 tables only): No
    • Significance level (α): 0.04

    Find: p-value

  3. Problem 3.
    • Test: Goodness of fit (one row of counts against expected proportions)
    • Observed counts, one per category: 225, 100, 100, 42
    • Expected distribution: Given ratios, percentages or counts
    • Expected ratio for each category: 9, 3, 3, 1
    • Significance level (α): 0.04

    Find: p-value

  4. Problem 4.
    • Test: Goodness of fit (one row of counts against expected proportions)
    • Observed counts, one per category: 200, 130, 100, 45
    • Expected distribution: Given ratios, percentages or counts
    • Expected ratio for each category: 9, 3, 3, 1
    • Significance level (α): 0.04

    Find: p-value

  5. Problem 5.
    • Test: Independence (a contingency table of two variables)
    • Observed table (rows separated by semicolons): 21, 57; 43, 7
    • Apply Yates' continuity correction (2 × 2 tables only): No
    • Significance level (α): 0.06

    Find: p-value

  6. Problem 6.
    • Test: Goodness of fit (one row of counts against expected proportions)
    • Observed counts, one per category: 300, 100, 75, 28
    • Expected distribution: All categories equally likely
    • Significance level (α): 0.03

    Find: p-value

  7. Problem 7.
    • Test: Goodness of fit (one row of counts against expected proportions)
    • Observed counts, one per category: 280, 130, 86, 38
    • Expected distribution: Given ratios, percentages or counts
    • Expected ratio for each category: 10, 2, 3, 2
    • Significance level (α): 0.04

    Find: p-value

  8. Problem 8.
    • Test: Goodness of fit (one row of counts against expected proportions)
    • Observed counts, one per category: 315, 108, 101, 32
    • Expected distribution: Given ratios, percentages or counts
    • Expected ratio for each category: 6, 2, 3, 1
    • Significance level (α): 0.05

    Find: p-value

  9. Problem 9.
    • Test: Independence (a contingency table of two variables)
    • Observed table (rows separated by semicolons): 26, 2; 20, 18
    • Apply Yates' continuity correction (2 × 2 tables only): No
    • Significance level (α): 0.06

    Find: p-value

  10. Problem 10.
    • Test: Independence (a contingency table of two variables)
    • Observed table (rows separated by semicolons): 1, 56; 33, 23
    • Apply Yates' continuity correction (2 × 2 tables only): No
    • Significance level (α): 0.04

    Find: p-value

Answer key: Chi-Square Test worksheet

  1. 1. p-value: 1.186789e-8

    1. Add up each row and each column, since the expected counts are built from these totals. Row totals 33, 98; column totals 60, 71; grand total N

      N=131
    2. If the two things weren't related, each cell would expect its row total times its column total, divided by the grand total N

      E = (row total × column total) ÷ N
    3. For example, the expected count (E) for the top-left cell

      E₁₁=33×60131=15.114504
    4. For every cell, square the gap between observed (O) and expected (E), divide by E, and add them up

      χ²=(1−15.114504)215.114504+(32−17.885496)217.885496+(59−44.885496)244.885496+(39−53.114504)253.114504=32.508393
    5. Count the degrees of freedom (df), how many cells are free to vary once the totals are fixed: (rows − 1) × (columns − 1)

      df=(2−1)×(2−1)=1
    6. Find the p-value: the chance of a χ² at least this big if the hypothesis were true (chi-square curve with 1 df)

      p=P(χ² > 32.508393) = =0.0000000119
    7. p is at or below α, so the two variables appear to be linked (not independent)

      Significant: reject H₀ (p ≤ 0.05)
    8. Measure how strong the link is, from 0 to 1, with Cramér's V = √(χ² ÷ (N × (min(rows, columns) − 1)))

      V=32.508393N(k − 1)=0.498152
  2. 2. p-value: 0.722978

    1. Add up each row and each column, since the expected counts are built from these totals. Row totals 49, 26; column totals 28, 47; grand total N

      N=75
    2. If the two things weren't related, each cell would expect its row total times its column total, divided by the grand total N

      E = (row total × column total) ÷ N
    3. For example, the expected count (E) for the top-left cell

      E₁₁=49×2875=18.293333
    4. For every cell, square the gap between observed (O) and expected (E), divide by E, and add them up

      χ²=(19−18.293333)218.293333+(30−30.706667)230.706667+(9−9.706667)29.706667+(17−16.293333)216.293333=0.125657
    5. Count the degrees of freedom (df), how many cells are free to vary once the totals are fixed: (rows − 1) × (columns − 1)

      df=(2−1)×(2−1)=1
    6. Find the p-value: the chance of a χ² at least this big if the hypothesis were true (chi-square curve with 1 df)

      p=P(χ² > 0.125657) = =0.7229779021
    7. p is above α, so there's no significant evidence of a link

      Not significant: fail to reject H₀ (p > 0.04)
    8. Measure how strong the link is, from 0 to 1, with Cramér's V = √(χ² ÷ (N × (min(rows, columns) − 1)))

      V=0.125657N(k − 1)=0.040932
  3. 3. p-value: 0.002229

    1. Scale the expected ratios to the total count N, so expected and observed add up the same: E = N × (ratio ÷ sum of ratios)

      N=467
    2. The expected count (E) for each category

      262.6875, 87.5625, 87.5625, 29.1875
    3. For every category, square the gap between observed (O) and expected (E), divide by E, and add them up

      χ²=(225−262.6875)2262.6875+(100−87.5625)287.5625+(100−87.5625)287.5625+(42−29.1875)229.1875=14.564597
    4. Count the degrees of freedom (df): the number of categories − 1, since the last one is fixed by the total

      df=4−1=3
    5. Find the p-value: the chance of a χ² at least this big if the hypothesis were true (chi-square curve with 3 df)

      p=P(χ² > 14.564597) = =0.0022291973
    6. p is at or below α, so the counts differ significantly from the expected pattern

      Significant: reject H₀ (p ≤ 0.04)
  4. 4. p-value: 9.466972e-10

    1. Scale the expected ratios to the total count N, so expected and observed add up the same: E = N × (ratio ÷ sum of ratios)

      N=475
    2. The expected count (E) for each category

      267.1875, 89.0625, 89.0625, 29.6875
    3. For every category, square the gap between observed (O) and expected (E), divide by E, and add them up

      χ²=(200−267.1875)2267.1875+(130−89.0625)289.0625+(100−89.0625)289.0625+(45−29.6875)229.6875=44.953216
    4. Count the degrees of freedom (df): the number of categories − 1, since the last one is fixed by the total

      df=4−1=3
    5. Find the p-value: the chance of a χ² at least this big if the hypothesis were true (chi-square curve with 3 df)

      p=P(χ² > 44.953216) = =0.0000000009
    6. p is at or below α, so the counts differ significantly from the expected pattern

      Significant: reject H₀ (p ≤ 0.04)
  5. 5. p-value: 6.941503e-11

    1. Add up each row and each column, since the expected counts are built from these totals. Row totals 78, 50; column totals 64, 64; grand total N

      N=128
    2. If the two things weren't related, each cell would expect its row total times its column total, divided by the grand total N

      E = (row total × column total) ÷ N
    3. For example, the expected count (E) for the top-left cell

      E₁₁=78×64128=39
    4. For every cell, square the gap between observed (O) and expected (E), divide by E, and add them up

      χ²=(21−39)239+(57−39)239+(43−25)225+(7−25)225=42.535385
    5. Count the degrees of freedom (df), how many cells are free to vary once the totals are fixed: (rows − 1) × (columns − 1)

      df=(2−1)×(2−1)=1
    6. Find the p-value: the chance of a χ² at least this big if the hypothesis were true (chi-square curve with 1 df)

      p=P(χ² > 42.535385) = =6.941502928e-11
    7. p is at or below α, so the two variables appear to be linked (not independent)

      Significant: reject H₀ (p ≤ 0.06)
    8. Measure how strong the link is, from 0 to 1, with Cramér's V = √(χ² ÷ (N × (min(rows, columns) − 1)))

      V=42.535385N(k − 1)=0.576461
  6. 6. p-value: 0

    1. With 4 equally likely categories, each one expects the total count N ÷ 4

      N=503
    2. The expected count (E) for each category

      125.75, 125.75, 125.75, 125.75
    3. For every category, square the gap between observed (O) and expected (E), divide by E, and add them up

      χ²=(300−125.75)2125.75+(100−125.75)2125.75+(75−125.75)2125.75+(28−125.75)2125.75=343.194831
    4. Count the degrees of freedom (df): the number of categories − 1, since the last one is fixed by the total

      df=4−1=3
    5. Find the p-value: the chance of a χ² at least this big if the hypothesis were true (chi-square curve with 3 df)

      p=P(χ² > 343.194831) = =0
    6. p is at or below α, so the counts differ significantly from the expected pattern

      Significant: reject H₀ (p ≤ 0.03)
  7. 7. p-value: 0

    1. Scale the expected ratios to the total count N, so expected and observed add up the same: E = N × (ratio ÷ sum of ratios)

      N=534
    2. The expected count (E) for each category

      314.1176, 62.8235, 94.2353, 62.8235
    3. For every category, square the gap between observed (O) and expected (E), divide by E, and add them up

      χ²=(280−314.117647)2314.117647+(130−62.823529)262.823529+(86−94.235294)294.235294+(38−62.823529)262.823529=86.064919
    4. Count the degrees of freedom (df): the number of categories − 1, since the last one is fixed by the total

      df=4−1=3
    5. Find the p-value: the chance of a χ² at least this big if the hypothesis were true (chi-square curve with 3 df)

      p=P(χ² > 86.064919) = =0
    6. p is at or below α, so the counts differ significantly from the expected pattern

      Significant: reject H₀ (p ≤ 0.04)
  8. 8. p-value: 0.000057

    1. Scale the expected ratios to the total count N, so expected and observed add up the same: E = N × (ratio ÷ sum of ratios)

      N=556
    2. The expected count (E) for each category

      278, 92.6667, 139, 46.3333
    3. For every category, square the gap between observed (O) and expected (E), divide by E, and add them up

      χ²=(315−278)2278+(108−92.666667)292.666667+(101−139)2139+(32−46.333333)246.333333=22.284173
    4. Count the degrees of freedom (df): the number of categories − 1, since the last one is fixed by the total

      df=4−1=3
    5. Find the p-value: the chance of a χ² at least this big if the hypothesis were true (chi-square curve with 3 df)

      p=P(χ² > 22.284173) = =0.0000569261
    6. p is at or below α, so the counts differ significantly from the expected pattern

      Significant: reject H₀ (p ≤ 0.05)
  9. 9. p-value: 0.000441

    1. Add up each row and each column, since the expected counts are built from these totals. Row totals 28, 38; column totals 46, 20; grand total N

      N=66
    2. If the two things weren't related, each cell would expect its row total times its column total, divided by the grand total N

      E = (row total × column total) ÷ N
    3. For example, the expected count (E) for the top-left cell

      E₁₁=28×4666=19.515152
    4. For every cell, square the gap between observed (O) and expected (E), divide by E, and add them up

      χ²=(26−19.515152)219.515152+(2−8.484848)28.484848+(20−26.484848)226.484848+(18−11.515152)211.515152=12.350997
    5. Count the degrees of freedom (df), how many cells are free to vary once the totals are fixed: (rows − 1) × (columns − 1)

      df=(2−1)×(2−1)=1
    6. Find the p-value: the chance of a χ² at least this big if the hypothesis were true (chi-square curve with 1 df)

      p=P(χ² > 12.350997) = =0.000440751
    7. p is at or below α, so the two variables appear to be linked (not independent)

      Significant: reject H₀ (p ≤ 0.06)
    8. Measure how strong the link is, from 0 to 1, with Cramér's V = √(χ² ÷ (N × (min(rows, columns) − 1)))

      V=12.350997N(k − 1)=0.432593
  10. 10. p-value: 3.461109e-11

    1. Add up each row and each column, since the expected counts are built from these totals. Row totals 57, 56; column totals 34, 79; grand total N

      N=113
    2. If the two things weren't related, each cell would expect its row total times its column total, divided by the grand total N

      E = (row total × column total) ÷ N
    3. For example, the expected count (E) for the top-left cell

      E₁₁=57×34113=17.150442
    4. For every cell, square the gap between observed (O) and expected (E), divide by E, and add them up

      χ²=(1−17.150442)217.150442+(56−39.849558)239.849558+(33−16.849558)216.849558+(23−39.150442)239.150442=43.897045
    5. Count the degrees of freedom (df), how many cells are free to vary once the totals are fixed: (rows − 1) × (columns − 1)

      df=(2−1)×(2−1)=1
    6. Find the p-value: the chance of a χ² at least this big if the hypothesis were true (chi-square curve with 1 df)

      p=P(χ² > 43.897045) = =3.461109177e-11
    7. p is at or below α, so the two variables appear to be linked (not independent)

      Significant: reject H₀ (p ≤ 0.04)
    8. Measure how strong the link is, from 0 to 1, with Cramér's V = √(χ² ÷ (N × (min(rows, columns) − 1)))

      V=43.897045N(k − 1)=0.623273