Sign in to jmaths to print this page or save it as a PDF: jmaths-8ce638778fd6.herokuapp.com/maths/ai-hl/hypothesis-testing/13-4-8/problems/

jmaths

IB Mathematics: Applications and Interpretation HL · 13.4: Hypothesis Testing · 13.4.8

Combining categories in a chi-squared test Problem set A One question at a time

Try each question on paper first. Open the working a line at a time, then say whether you had it.

Skills

  1. A theatre records the seat bought by 119 customers and the customer's age group. The seat type and the age group are assumed to be independent. The observed counts are shown.

    SeatUnder 1616 to 6465 or overStalls3420Circle31545Balcony21215
    1. (a) Find the expected frequency for Stalls and Under 16.

      • Row total = 27, column total = 8, grand total = 119
      • E = 27 × 8 ÷ 119
      • E = 1.82
    2. (b) Find all the expected frequencies that are 5 or less.

      • From the calculator: Stalls: 1.82, 7.03, 18.2; Circle: 4.24, 16.4, 42.4; Balcony: 1.95, 7.55, 19.5
      • Cells with E ≤ 5: Stalls, Under 16: 1.82; Circle, Under 16: 4.24; Balcony, Under 16: 1.95
  2. 182 runners in a marathon are grouped by age and by finishing time. A chi-squared test for independence is planned. The expected frequencies must be greater than 5 for a chi-squared test.

    Finish timeUnder 2525 to 3435 to 4950 or overUnder 3.5 h4839183.5 to 4.5 h34447Over 4.5 h45379
    1. (a) Use the calculator to find the expected frequencies. Which are 5 or less?

      • From the calculator: Under 3.5 h: 4.17, 6.45, 45.5, 12.9; 3.5 to 4.5 h: 3.51, 5.42, 38.2, 10.8; Over 4.5 h: 3.32, 5.14, 36.3, 10.3
      • 5 or less: Under 3.5 h, Under 25: 4.17; 3.5 to 4.5 h, Under 25: 3.51; Over 4.5 h, Under 25: 3.32
    2. (b) Combine neighbouring columns so that every expected frequency is greater than 5. Give a reason for your choice and the new table.

      • The expected frequencies of 5 or less are in the Under 25 column. Combine Under 35 = Under 25 + 25 to 34: neighbouring categories with similar meaning
      • New table: Under 3.5 h: 12, 39, 18; 3.5 to 4.5 h: 7, 44, 7; Over 4.5 h: 9, 37, 9
      • Smallest new expected frequency: 8.46, which is greater than 5
    3. (c) State the degrees of freedom for the new table.

      • 3 rows and 3 columns: df = (3 − 1)(3 − 1) = 4
  3. 129 students are asked how often they cycle to school. Test, at the 5% significance level, whether this is independent of year group. Combine categories if you need to. Give the hypotheses, the degrees of freedom, the p-value and your conclusion.

    YearEvery dayMost daysOccasionallyYear 921310Year 1023616Year 111436
    • Expected frequencies of the original table: Year 9: 0.969, 17.8, 6.20; Year 10: 2.09, 38.5, 13.4; Year 11: 1.94, 35.7, 12.4
    • Combine: Most days or more = Every day + Most days
    • New table: Year 9: 15, 10; Year 10: 38, 16; Year 11: 44, 6. Smallest expected frequency: 6.20
    • H0: how often a student cycles to school and year group are independent. H1: how often a student cycles to school and year group are not independent.
    • df = (3 − 1)(2 − 1) = 2. From the calculator: χ² = 8.16, p = 0.0169
    • 0.0169 < 0.05, so reject H0. There is sufficient evidence, at the 5% significance level, that how often a student cycles to school is not independent of year group.

In context

  1. A cafe chain collects 186 customer ratings from three branches. Test, at the 5% significance level, whether the rating is independent of the branch. Combine categories if you need to. Give the hypotheses, the degrees of freedom, the p-value and your conclusion.

    RatingBranch ABranch BBranch C1 star1316202 stars6743 stars8354 or 5 stars511637
    • Expected frequencies of the original table: 1 star: 20.5, 11.1, 17.4; 2 stars: 7.13, 3.84, 6.03; 3 stars: 6.71, 3.61, 5.68; 4 or 5 stars: 43.6, 23.5, 36.9
    • Combine: 2 or 3 stars = 2 stars + 3 stars
    • New table: 1 star: 13, 16, 20; 2 or 3 stars: 14, 10, 9; 4 or 5 stars: 51, 16, 37. Smallest expected frequency: 7.45
    • H0: rating and branch are independent. H1: rating and branch are not independent.
    • df = (3 − 1)(3 − 1) = 4. From the calculator: χ² = 10.5, p = 0.0327
    • 0.0327 < 0.05, so reject H0. There is sufficient evidence, at the 5% significance level, that rating is not independent of branch.
  2. 160 pupils are grouped by the club they joined and their age. Test, at the 5% significance level, whether club and age are independent. Combine categories if you need to. Give the hypotheses, the degrees of freedom, the p-value and your conclusion.

    ClubAge 11Age 12Age 13Age 14 to 15Football224925Orchestra1325Drama4131013Chess217822
    • Expected frequencies of the original table: Football: 3.38, 21.4, 10.9, 24.4; Orchestra: 0.619, 3.92, 1.99, 4.47; Drama: 2.25, 14.2, 7.25, 16.2; Chess: 2.76, 17.5, 8.88, 19.9
    • Combine: Orchestra or drama = Orchestra + Drama; Age 11 or 12 = Age 11 + Age 12
    • New table: Football: 26, 9, 25; Orchestra or drama: 21, 12, 18; Chess: 19, 8, 22. Smallest expected frequency: 8.88
    • H0: club and age are independent. H1: club and age are not independent.
    • df = (3 − 1)(3 − 1) = 4. From the calculator: χ² = 1.96, p = 0.743
    • 0.743 > 0.05, so do not reject H0. There is insufficient evidence, at the 5% significance level, that club is not independent of age.
  3. A school team played 162 matches over three terms. Test, at the 5% significance level, whether the result is independent of the term. Combine categories if you need to. Give the hypotheses, the degrees of freedom, the p-value and your conclusion.

    TermWinDrawLossAutumn56815Spring36710Summer2145
    • Expected frequencies of the original table: Autumn: 55.1, 9.27, 14.6; Spring: 37.0, 6.22, 9.81; Summer: 20.9, 3.52, 5.56
    • Combine: Draw or loss = Draw + Loss
    • New table: Autumn: 56, 23; Spring: 36, 17; Summer: 21, 9. Smallest expected frequency: 9.07
    • H0: the result and the term are independent. H1: the result and the term are not independent.
    • df = (3 − 1)(2 − 1) = 2. From the calculator: χ² = 0.133, p = 0.936
    • 0.936 > 0.05, so do not reject H0. There is insufficient evidence, at the 5% significance level, that the result is not independent of the term.

Stretch

  1. The number of days 152 students were absent last term is recorded by year group. A student wants to test, at the 5% significance level, whether days absent is independent of year group.

    Year10 or more days5 to 9 days1 to 4 daysNo daysYear 9334919Year 1012287Year 11122611
    1. (a) The student combines 5 or more days = 10 or more days + 5 to 9 days. Show that the condition for the test is still not met.

      • New table: Year 9: 6, 49, 19; Year 10: 3, 28, 7; Year 11: 3, 26, 11
      • Expected frequencies: Year 9: 5.84, 50.1, 18.0; Year 10: 3.00, 25.8, 9.25; Year 11: 3.16, 27.1, 9.74
      • Smallest = 3.00, which is 5 or less, so combine again
    2. (b) Combine more categories until the condition is met. State the groups you choose and carry out the test.

      • Combine Absent at least once = 10 or more days + 5 to 9 days + 1 to 4 days
      • New table: Year 9: 55, 19; Year 10: 31, 7; Year 11: 29, 11. Smallest expected frequency: 9.25
      • H0: days absent and year group are independent. H1: days absent and year group are not independent.
      • df = (3 − 1)(2 − 1) = 2. From the calculator: χ² = 1.01, p = 0.603
      • 0.603 > 0.05, so do not reject H0. There is insufficient evidence, at the 5% significance level, that days absent is not independent of year group.
  2. A market stall records how 111 customers paid and the customer's age group. Combine categories first. Test whether payment method is independent of age group, at the 5% level and then at the 1% level.

    AgeChequeCashCardUnder 302301730 to 491121450 or over11123
    1. (a) Carry out the test at the 5% significance level.

      • Expected frequencies of the original table: Under 30: 1.77, 23.4, 23.8; 30 to 49: 0.973, 12.9, 13.1; 50 or over: 1.26, 16.7, 17.0
      • Combine: Cheque or cash = Cheque + Cash
      • New table: Under 30: 32, 17; 30 to 49: 13, 14; 50 or over: 12, 23. Smallest expected frequency: 13.1
      • H0: payment method and age group are independent. H1: payment method and age group are not independent.
      • df = (3 − 1)(2 − 1) = 2. From the calculator: χ² = 8.01, p = 0.0182
      • 0.0182 < 0.05, so reject H0. There is sufficient evidence, at the 5% significance level, that payment method is not independent of age group.
    2. (b) State the conclusion at the 1% significance level, and explain why the two conclusions differ.

      • p = 0.0182, and 0.01 < 0.0182
      • At 1%, 0.0182 > 0.01, so do not reject H0
      • The same p-value is below 0.05 but above 0.01, so the decision depends on the level

jmaths.xyz · AI HL · 13.4.8 Combining categories in a chi-squared test