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/b/

jmaths

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

Combining categories in a chi-squared test Problem set B 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 garage records the fuel used by 129 cars and the age of each car. The fuel type and the age of the car are assumed to be independent. The observed counts are shown.

    FuelUnder 3 years3 to 8 yearsOver 8 yearsPetrol28149Diesel192026Electric634
    1. (a) Find the expected frequency for Petrol and Under 3 years.

      • Row total = 51, column total = 53, grand total = 129
      • E = 51 × 53 ÷ 129
      • E = 21.0
    2. (b) Find all the expected frequencies that are 5 or less.

      • From the calculator: Petrol: 21.0, 14.6, 15.4; Diesel: 26.7, 18.6, 19.7; Electric: 5.34, 3.73, 3.93
      • Cells with E ≤ 5: Electric, 3 to 8 years: 3.73; Electric, Over 8 years: 3.93
  2. 179 students record their daily screen time. The results are grouped by year group. A chi-squared test for independence is planned. The expected frequencies must be greater than 5 for a chi-squared test.

    YearUnder 2 h2 to 4 h4 to 6 hOver 6 hYear 7311054Year 8451857Year 9291375
    1. (a) Use the calculator to find the expected frequencies. Which are 5 or less?

      • From the calculator: Year 7: 29.3, 11.5, 4.75, 4.47; Year 8: 44.0, 17.2, 7.12, 6.70; Year 9: 31.7, 12.4, 5.13, 4.83
      • 5 or less: Year 7, 4 to 6 h: 4.75; Year 7, Over 6 h: 4.47; Year 9, Over 6 h: 4.83
    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 4 to 6 h and Over 6 h columns. Combine Over 4 h = 4 to 6 h + Over 6 h: neighbouring categories with similar meaning
      • New table: Year 7: 31, 10, 9; Year 8: 45, 18, 12; Year 9: 29, 13, 12
      • Smallest new expected frequency: 9.22, 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. 154 pupils in three school clubs record how long they practise each week. Test, at the 5% significance level, whether practice time is independent of the club. Combine categories if you need to. Give the hypotheses, the degrees of freedom, the p-value and your conclusion.

    ClubUnder 2 h2 to 4 hOver 4 hChess32346Drama28104Football27112
    • Expected frequencies of the original table: Chess: 40.7, 25.7, 5.61; Drama: 23.7, 15.0, 3.27; Football: 22.6, 14.3, 3.12
    • Combine: 2 h or more = 2 to 4 h + Over 4 h
    • New table: Chess: 32, 40; Drama: 28, 14; Football: 27, 13. Smallest expected frequency: 17.4
    • H0: weekly practice time and club are independent. H1: weekly practice time and club are not independent.
    • df = (3 − 1)(2 − 1) = 2. From the calculator: χ² = 7.99, p = 0.0184
    • 0.0184 < 0.05, so reject H0. There is sufficient evidence, at the 5% significance level, that weekly practice time is not independent of club.

In context

  1. 177 students record how long they read each day. Test, at the 5% significance level, whether reading time is independent of year group. Combine categories if you need to. Give the hypotheses, the degrees of freedom, the p-value and your conclusion.

    ReadingYear 7Year 8Year 9Over 60 min34440 to 60 min77820 to 40 min124119Under 20 min252423
    • Expected frequencies of the original table: Over 60 min: 2.92, 4.72, 3.36; 40 to 60 min: 5.84, 9.45, 6.71; 20 to 40 min: 19.1, 30.9, 22.0; Under 20 min: 19.1, 30.9, 22.0
    • Combine: 40 min or more = Over 60 min + 40 to 60 min
    • New table: 40 min or more: 10, 11, 12; 20 to 40 min: 12, 41, 19; Under 20 min: 25, 24, 23. Smallest expected frequency: 8.76
    • H0: daily reading time and year group are independent. H1: daily reading time and year group are not independent.
    • df = (3 − 1)(3 − 1) = 4. From the calculator: χ² = 11.0, p = 0.0266
    • 0.0266 < 0.05, so reject H0. There is sufficient evidence, at the 5% significance level, that daily reading time is not independent of year group.
  2. A bookshop records the type and the format of 179 books sold. Test, at the 5% significance level, whether type of book and format are independent. Combine categories if you need to. Give the hypotheses, the degrees of freedom, the p-value and your conclusion.

    BookPaperbackHardbackLarge printAudiobookPoetry4162Plays122812Novels111175Non-fiction3852926
    • Expected frequencies of the original table: Poetry: 4.72, 0.654, 4.36, 3.27; Plays: 12.3, 1.71, 11.4, 8.55; Novels: 12.3, 1.71, 11.4, 8.55; Non-fiction: 35.6, 4.93, 32.8, 24.6
    • Combine: Poetry or plays = Poetry + Plays; Hardback or large print = Hardback + Large print
    • New table: Poetry or plays: 16, 17, 14; Novels: 11, 18, 5; Non-fiction: 38, 34, 26. Smallest expected frequency: 8.55
    • H0: type of book and format are independent. H1: type of book and format are not independent.
    • df = (3 − 1)(3 − 1) = 4. From the calculator: χ² = 4.60, p = 0.331
    • 0.331 > 0.05, so do not reject H0. There is insufficient evidence, at the 5% significance level, that type of book is not independent of format.
  3. A rail company checks 225 journeys on three routes. Test, at the 5% significance level, whether the outcome of a journey is independent of the route. Combine categories if you need to. Give the hypotheses, the degrees of freedom, the p-value and your conclusion.

    RouteCancelledDelayedOn timeRoute A5436Route B5453Route C94105
    • Expected frequencies of the original table: Route A: 3.80, 2.40, 38.8; Route B: 5.24, 3.31, 53.5; Route C: 9.96, 6.29, 102
    • Combine: Cancelled or delayed = Cancelled + Delayed
    • New table: Route A: 9, 36; Route B: 9, 53; Route C: 13, 105. Smallest expected frequency: 6.20
    • H0: the outcome of a journey and the route are independent. H1: the outcome of a journey and the route are not independent.
    • df = (3 − 1)(2 − 1) = 2. From the calculator: χ² = 2.25, p = 0.324
    • 0.324 > 0.05, so do not reject H0. There is insufficient evidence, at the 5% significance level, that the outcome of a journey is not independent of the route.

Stretch

  1. The distance from home to school of 164 students is recorded by year group. A student wants to test, at the 5% significance level, whether distance to school is independent of year group.

    YearUnder 1 km1 to 3 km3 to 5 kmOver 5 kmYear 7203274Year 8143462Year 9152262
    1. (a) The student combines 1 to 5 km = 1 to 3 km + 3 to 5 km. Show that the condition for the test is still not met.

      • New table: Year 7: 20, 39, 4; Year 8: 14, 40, 2; Year 9: 15, 28, 2
      • Expected frequencies: Year 7: 18.8, 41.1, 3.07; Year 8: 16.7, 36.5, 2.73; Year 9: 13.4, 29.4, 2.20
      • Smallest = 2.20, 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 1 km or more = 1 to 3 km + 3 to 5 km + Over 5 km
      • New table: Year 7: 20, 43; Year 8: 14, 42; Year 9: 15, 30. Smallest expected frequency: 13.4
      • H0: distance to school and year group are independent. H1: distance to school and year group are not independent.
      • df = (3 − 1)(2 − 1) = 2. From the calculator: χ² = 0.997, p = 0.607
      • 0.607 > 0.05, so do not reject H0. There is insufficient evidence, at the 5% significance level, that distance to school is not independent of year group.
  2. A survey asks 172 commuters which transport they use. The commuters live in three towns. Combine categories first. Test whether transport used is independent of town, at the 5% level and then at the 1% level.

    TownBusTrainTramTown P21355Town Q13485Town R20205
    1. (a) Carry out the test at the 5% significance level.

      • Expected frequencies of the original table: Town P: 19.2, 36.5, 5.32; Town Q: 20.7, 39.5, 5.76; Town R: 14.1, 26.9, 3.92
      • Combine: Train or tram = Train + Tram
      • New table: Town P: 21, 40; Town Q: 13, 53; Town R: 20, 25. Smallest expected frequency: 14.1
      • H0: transport used and town are independent. H1: transport used and town 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 transport used is not independent of town.
    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