IB Applications and Interpretation SL · χ² and t-tests · End of topic

IB exam questions for topic 13

44 exercises with solutions · By Álvaro López

Past IB exam questions grouped by type and, within each type, from easiest to hardest. Try each one before opening the solution.

Level
Paper
Solutions

Chi-squared test for independence

Exercise 1 BasicIB · P1 TZ2 May 2013

A researcher carries out a survey among men and women to find their preferred holiday destination. The options given were: Antigua, Barbados, Cuba, Guadeloupe and Jamaica.

A test for independence was carried out.

The calculated value was .

a) Write down the null hypothesis.

b) Find the number of degrees of freedom for this test.

c) Write down the critical value for this test.

d) Given that the critical value of this test at the significance level is , state the conclusion of this test. Give a reasoned answer.

Show answer

Answer: a) : the destination is independent of gender; b) ; c) ; d) as , is not rejected

Show working and answer

a) 1. : the preferred holiday destination is independent of gender.

b) 2. There are destinations and genders (men and women):

c) 3. The critical value of for at the significance level (from the table or the calculator, with area in the right tail) is

d) 4. We compare: . 5. Therefore is not rejected: there is no evidence, at the level, that the preferred destination depends on gender.

Answer: a) : the destination is independent of gender; b) ; c) ; d) as , is not rejected

Exercise 2 BasicIB · P1 TZ2 May 2012

A researcher interviews men and women to find out whether the colour of their car is independent of the driver's gender. A test for independence is carried out.

a) Write down the null hypothesis.

The car colours were: red, green, blue, black and silver.

b) Find the number of degrees of freedom for this test.

At the significance level, the value obtained for was .

c) Write down the critical value corresponding to this test.

d) Establish whether or not the null hypothesis is accepted. Give a reasoned answer.

Show answer

Answer: a) : the car colour is independent of the driver's gender; b) ; c) ; d) as , is not rejected

Show working and answer

a) 1. : the car colour is independent of the driver's gender.

b) 2. There are colours and genders:

c) 3. Critical value for and the level (right tail ):

d) 4. Compare: . 5. is not rejected (strictly speaking, there is not sufficient evidence to reject it): at the level it has not been possible to show that car colour depends on the driver's gender.

Answer: a) : the car colour is independent of the driver's gender; b) ; c) ; d) as , is not rejected

Exercise 3 BasicIB · P1 TZ2 May 2010

A market research study interviewed men and women to determine whether there is a relationship between the type of coffee each person usually drinks and the sex of the interviewee. The types of coffee are Cappuccino, White coffee, Americano, Cortado and Solo.

A test was carried out at a significance level, and the value of turned out to be .

a) Write down

(i) the null hypothesis;

(ii) the alternative hypothesis.

b) Write down the number of degrees of freedom for this test.

c) Write down the critical value for this test.

d) Determine whether the type of coffee a person drinks is independent of their sex. Give a reasoned answer.

Show answer

Answer: a) (i) : the type of coffee is independent of sex; (ii) : the type of coffee depends on sex; b) ; c) ; d) as , do not reject : the type of coffee is independent of sex

Show working and answer

a) (i) 1. The test of independence assumes that there is no relationship between the variables:

: the type of coffee drunk is independent of the sex of the interviewee.

(ii) 2. : the type of coffee drunk depends on the sex of the interviewee.

b) 3. The contingency table has rows (men and women) and columns (types of coffee). The degrees of freedom are

c) 4. With and a significance level, the critical value (tables or calculator, inverse with area to the right) is

d) 5. We compare the test statistic with the critical value: . 6. Therefore we do not reject : there is not enough evidence, at the level, that the type of coffee depends on sex. With these data, the type of coffee a person drinks is independent of their sex.

Answer: a) (i) : the type of coffee is independent of sex; (ii) : the type of coffee depends on sex; b) ; c) ; d) as , do not reject : the type of coffee is independent of sex

Exercise 4 BasicIB · P1 TZ1 May 2008

200 people of different ages were asked to choose their favourite type of music from the options Pop, Country and Western and Heavy Metal. The results are shown in the table below.

Age / music choice Pop Country and Western Heavy Metal Totals
11 – 25 35 5 50 90
26 – 40 30 10 20 60
41 – 60 20 25 5 50
Totals 85 40 75 200

It was decided to carry out a test for independence at the significance level.

a) Write down the null hypothesis.

b) Write down the number of degrees of freedom.

c) Write down the value of chi-squared.

d) State whether or not you will reject the null hypothesis, giving a clear reason for your answer.

Show answer

Answer: a) : the type of music is independent of age; b) ; c) ; d) as , reject

Show working and answer

a) 1. : the type of music chosen is independent of age.

b) 2. There are age groups and types of music: .

c) 3. Using the calculator, test for independence with the observed matrix (excluding the row and column of totals):

d) 4. For and the level, the critical value is . 5. As (and ), we reject : there is evidence that the favourite type of music depends on age.

Answer: a) : the type of music is independent of age; b) ; c) ; d) as , reject

Exercise 5 BasicIB · P1 TZ0 November 2006

Oral examinations are conducted separately by three examiners, A, B and C. The results of the examination are classified as credit, pass or fail. A test is applied to the data collected to test whether or not the examiners differ in their level of awards.

a) State the null hypothesis, , for these data.

b) Write down the number of degrees of freedom.

Of the students who sit the examination, obtain a credit and are assessed by examiner A.

c) Calculate the expected number of students who obtain a credit and are assessed by examiner A.

Using a significance level of , the p-value is found to be , correct to significant figures.

d) State whether should be accepted. Justify your answer.

Show answer

Answer: a) : the result is independent of the examiner; b) ; c) ; d) as , reject

Show working and answer

a) 1. The test of independence tests whether two categorical variables are related. Here, the examiners not differing in their level of awards means that the result does not depend on the examiner.

: the examination result (credit, pass or fail) is independent of the examiner.

b) 2. The contingency table has rows (examiners) and columns (results):

c) 3. The expected frequency of a cell is

d) 4. We compare the p-value with the significance level: . 5. As , we reject (it is not accepted): there is evidence, at , that the result depends on the examiner, i.e. the examiners differ in their level of awards.

Answer: a) : the result is independent of the examiner; b) ; c) ; d) as , reject

Exercise 6 MediumIB · P1 TZ0 November 2018

Abhinav carries out a test at a significance level of to determine whether the gender of people influences the professional field they choose: engineering, medicine or law.

He conducted a survey with people. The results are shown in the table below.

Engineering Medicine Law
Men 55 30 25
Women 35 45 30

a) State the null hypothesis, , for this test.

b) Calculate the expected number of male engineers.

c) Find the value of the parameter for this test.

Abhinav rejects .

d) State a reason why Abhinav is wrong to do this.

Show answer

Answer: a) : gender is independent of the chosen professional field; b) ; c) ; d) as , should not be rejected, so Abhinav is wrong

Show working and answer

a)

The test for independence assumes that there is no relationship between the two variables:

: gender is independent of the chosen professional field.

Answer: : gender is independent of the chosen professional field

b)

  1. Table totals: men ; engineering ; grand total .
  2. The expected frequency of a cell is :

Answer: male engineers

c)

  1. It is a table with rows and columns, so the degrees of freedom are .
  2. Using the GDC, carry out a test for independence with the observed matrix : and .

Answer:

d)

  1. is rejected only if . Here and .
  2. Therefore, at a significance level there is not sufficient evidence to reject : Abhinav is wrong to reject it (we cannot conclude that gender influences the professional field).

Answer: a) : gender is independent of the chosen professional field; b) ; c) ; d) as , should not be rejected, so Abhinav is wrong

Exercise 7 MediumIB · P1 TZ2 May 2017

At a school, students in grades 9 to 12 were asked to choose their favourite drink. The options were milk, juice and water. The data obtained are organised in the table below.

Milk Juice Water Total
Grade 9 25 34 15 74
Grade 10 31 13 74
Grade 11 18 35 17 70
Grade 12 9 36 26 71
Total 83 135 71 289

A test is carried out at a significance level with the hypotheses:

: favourite drink is independent of grade

: favourite drink is not independent of grade

The critical value for this test is .

a) Write down the value of .

b) Write down the number of degrees of freedom for this test.

c) Use your graphic display calculator to find the statistic for this test.

d) State the conclusion of this test. Justify your answer.

Show answer

Answer: a) ; b) ; c) ; d) as , is rejected: favourite drink depends on grade

Show working and answer

a)

The Grade 10 row sums to : , so .

Check with the juice column: .

Answer:

b)

The table has rows (grades) and columns (drinks):

Answer: degrees of freedom

c)

Using the GDC, carry out a test for independence with the observed matrix (without the totals):

This gives (with ).

Answer:

d)

  1. We compare the statistic with the critical value: (equivalently, ).
  2. Therefore is rejected: at a significance level there is evidence that favourite drink is not independent of grade.

Answer: a) ; b) ; c) ; d) as , is rejected: favourite drink depends on grade

Exercise 8 MediumIB · P1 TZ1 May 2016

The manager of a travel agency surveyed travellers. He wanted to know whether there was a relationship between a traveller's age and their preferred destination.

The travellers were asked to complete the following survey.

Traveller survey form with two sets of tick boxes: “My age is” with four age ranges (25 or under, 26–40, 41–60, 61 or over) and “My preferred destination is” with five destinations (New York, Tokyo, Melbourne, Dubai, Marrakech); below each label there is an empty box

A test is carried out, at the significance level, on the data collected.

a) Write down the null hypothesis.

b) Find the number of degrees of freedom.

The critical value for this test is .

c) Use this information to write down the values of the statistic for which the null hypothesis is rejected.

Of the travellers who took part in the survey, were aged or over and preferred Tokyo.

d) Calculate the expected number of travellers who preferred Tokyo and were aged or over.

Show answer

Answer: a) : preferred destination is independent of age; b) ; c) is rejected when ; d) travellers

Show working and answer

a)

: preferred destination is independent of the traveller's age.

Answer: : preferred destination is independent of age

b)

Age has categories and destination has , so the contingency table is :

Answer: degrees of freedom

c)

is rejected when the statistic exceeds the critical value (or, equivalently, when it falls in the rejection region):

Answer: is rejected for

d)

  1. Travellers aged or over: . Travellers who prefer Tokyo: . Total: .
  2. Expected frequency:

Answer: a) : preferred destination is independent of age; b) ; c) is rejected when ; d) travellers

Exercise 9 MediumIB · P1 TZ2 May 2016

A survey was carried out by taking a random sample of people and asking them which was their favourite TV programme. They were grouped by gender and by the type of TV programme they preferred to watch (Sport, Documentaries, News and Reality TV).

The results are shown in the following contingency table:

Sport Documentaries News Reality TV Total
Men 20 24 32 11 87
Women 18 30 20 25 93
Total 38 54 52 36 180

a) Find the expected number of women who prefer to watch documentaries.

A test is used at the significance level to determine whether the type of TV programme a person prefers to watch is independent of gender.

b) Write down the value of the -value for this test.

c) State the conclusion of this test. Give a reason to justify your answer.

Show answer

Answer: a) women; b) ; c) as , is rejected (the preferred programme is not independent of gender)

Show working and answer

a)

  1. Women: . Documentaries: . Total: .
  2. Expected frequency:

Answer: women

b)

A table (without the totals): using the GDC, carry out a test for independence with the matrix . This gives , with degrees of freedom, and a -value of .

Answer:

c)

  1. : the preferred type of TV programme is independent of gender.
  2. As , is rejected: at the significance level there is evidence that the preferred type of TV programme depends on gender.

Answer: a) women; b) ; c) as , is rejected (the preferred programme is not independent of gender)

Exercise 10 MediumIB · P1 TZ0 November 2016

A hospital has collected data on patients admitted to four different wards in order to analyse the quality of healthcare they receive. The data are combined in the table below, which shows the number of patients who contracted an infection during their stay in hospital.

Pasteur Nightingale Jenner Fleming Total
Infected patients 44 27 13 16 100
Non-infected patients 281 303 182 134 900
Total 325 330 195 150 1000

A test is carried out at the significance level.

The critical value for this test is .

The null hypothesis for this test is

: contracting an infection during a hospital stay is independent of the ward in which you are admitted.

a) Find the expected frequency of patients who contracted an infection while in the Nightingale ward.

b) For this test, write down the statistic.

c) State, giving a reasoned answer, whether the null hypothesis should be rejected or not.

Show answer

Answer: a) ; b) ; c) as , is rejected

Show working and answer

a)

  1. Infected patients: . Nightingale ward: . Total: .
  2. Expected frequency:

Answer: patients

b)

Using the GDC, carry out a test for independence with the matrix (, degrees of freedom):

(The associated -value is .)

Answer:

c)

  1. Compare with the critical value: (equivalently, ).
  2. is rejected: at the significance level there is evidence that contracting an infection depends on the ward in which the patient is admitted.

Answer: a) ; b) ; c) as , is rejected

Exercise 11 MediumIB · P1 TZ2 May 2015

The producer of a televised dance show asked a group of viewers about their age and the type of Latin dance they preferred. The Latin dances on the show were Argentine tango, samba, rumba and cha-cha-cha.

The data obtained are summarised in the table below.

Argentine tango Samba Rumba Cha-cha-cha
20 years old and under 35 23 12 10
Over 20 years old 20 17 18 15

A test is carried out at the significance level.

a) Write down the null hypothesis for this test.

b) Write down the expected number of viewers who preferred rumba and are over years old.

c) Use your GDC to find the -value for this test.

The producer claims that the type of Latin dance preferred by a viewer is independent of their age.

d) Decide whether this claim is justified. Give a reason for your decision.

Show answer

Answer: a) : preferred dance is independent of age; b) ; c) ; d) as , is not rejected, so the claim is justified

Show working and answer

a)

: the preferred type of Latin dance is independent of age (whether the viewer is 20 years old or under, or over 20).

Answer: : preferred dance is independent of age

b)

  1. Over years old: . Rumba: . Total: .
  2. Expected frequency:

Answer: viewers

c)

Using the GDC, carry out a test for independence with the matrix ( degrees of freedom): and .

Answer:

d)

  1. As , is not rejected.
  2. There is not sufficient evidence, at the level, to reject independence: the producer's claim is justified (the data are consistent with the preferred dance not depending on age).

Answer: a) : preferred dance is independent of age; b) ; c) ; d) as , is not rejected, so the claim is justified

Exercise 12 MediumIB · P1 TZ0 November 2015

In a school canteen, the gender and preferred drink (tea, coffee or hot chocolate) of some students are recorded. The results are shown in the table below.

Tea Coffee Hot chocolate
Boys 15 15 10
Girls 10 10 30

a) Write down the total number of students who took part in the survey.

A test is carried out at the significance level.

b) Write down the null hypothesis for this test.

c) Use your GDC to find the statistic.

The critical value, at the significance level, is equal to .

d) State the conclusion of this test. Give a reasoned answer.

Show answer

Answer: a) ; b) : gender and preferred drink are independent; c) ; d) as , is rejected

Show working and answer

a)

Boys: . Girls: . Total: .

Answer: students

b)

: gender and preferred drink are independent.

Answer: : gender and preferred drink are independent

c)

Using the GDC, carry out a test for independence with the matrix ( degrees of freedom):

Answer:

d)

  1. Compare with the critical value: .
  2. is rejected: at the significance level there is evidence that preferred drink depends on gender.

Answer: a) ; b) : gender and preferred drink are independent; c) ; d) as , is rejected

Exercise 13 MediumIB · P1 TZ1 May 2014

A study was carried out to determine whether the countries chosen by students for their university studies are influenced by a person's gender. A random sample was taken. The results are shown in the table below.

USA Australia UK
Male 55 26 40
Female 25 31 41

A test is carried out with a significance level of .

The critical value for this test is .

a) State the null hypothesis.

b) Write down the number of degrees of freedom.

c) Write down

(i) the statistic;

(ii) the associated -value.

d) State, giving a reason, whether the null hypothesis should be accepted.

Show answer

Answer: a) : the country chosen is independent of gender; b) ; c) (i) , (ii) ; d) as (or ), is accepted

Show working and answer

a)

: the country chosen for university studies is independent of gender.

Answer: : the country chosen is independent of gender

b)

The table has rows and columns: .

Answer: degrees of freedom

c)

Using the GDC, carry out a test for independence with the matrix :

(i) .

(ii) .

Answer: (i) ; (ii)

d)

  1. Compare with the critical value: (equivalently, ).
  2. is not rejected (it is accepted): at the level there is not sufficient evidence that the country chosen depends on gender.

Answer: a) : the country chosen is independent of gender; b) ; c) (i) , (ii) ; d) as (or ), is accepted

Exercise 14 MediumIB · P1 TZ2 May 2014

A group of students gave the following answers to the question of how they travel to school.

Walking Public transport Car Bicycle Total
Girls 18 13 14 3 48
Boys 9 17 10 16 52
Total 27 30 24 19 100

A test is carried out at the significance level to analyse the independence of the results. The null hypothesis is defined as follows

: The way students travel to school is independent of the student's gender.

a) Find the expected frequency of girls who travel to school by public transport.

b) Find the statistic.

The critical value of , at the significance level, is equal to .

c) State whether or not the null hypothesis is accepted. Give a reasoned answer.

Show answer

Answer: a) ; b) ; c) as , is rejected: the way of travelling to school depends on gender

Show working and answer

a) 1. If is true (the way of travelling to school is independent of gender), the expected frequency of each cell is 2. Girls who travel by public transport: row “Girls” () and column “Public transport” ():

b) 3. We calculate all the expected frequencies with the same method:

Walking Public transport Car Bicycle
Girls
Boys
  1. We apply to the eight cells (or, directly, the GDC test for independence with the matrix of observed frequencies): That is, .

c) 5. Decision rule: is rejected if . 6. Here , so is rejected (it is not accepted). There is evidence, at the level, that the way of travelling to school depends on the student's gender.

Answer: a) ; b) ; c) as , is rejected: the way of travelling to school depends on gender

Exercise 15 MediumIB · P1 TZ0 November 2014

Minta surveyed the students at her school about their favourite morning snack, choosing from an apple, a fruit salad or a milkshake.

She surveyed students, of whom are women.

She carried out a test at the significance level to determine whether there is a relationship between the choice of morning snack and gender.

a) State Minta's null hypothesis.

b) State the number of degrees of freedom.

students showed a preference for a milkshake.

c) Calculate the expected number of women students who chose a milkshake.

Minta found that the calculated value of the statistic was .

The critical value at the significance level is .

d) State Minta's conclusion. Justify your answer.

Show answer

Answer: a) : the morning snack is independent of gender; b) ; c) ; d) as , is not rejected: the snack choice does not depend on gender

Show working and answer

a) 1. The null hypothesis states that there is no relationship between the variables:

: the choice of morning snack is independent of the student's gender.

b) 2. There are snacks (apple, fruit salad, milkshake) and genders. The degrees of freedom are

c) 3. Total students: ; women: ; milkshakes: . Using the expected frequency formula under : So women are expected to choose a milkshake.

d) 4. We compare the statistic with the critical value: . 5. As it does not exceed the critical value, is not rejected. At the significance level there is not sufficient evidence of a relationship: the choice of morning snack is independent of the students' gender.

Answer: a) : the morning snack is independent of gender; b) ; c) ; d) as , is not rejected: the snack choice does not depend on gender

Exercise 16 MediumIB · P2 TZ1 May 2013

An agricultural cooperative uses three brands of fertiliser, A, B and C, on different crops. The crop yields are classified as High, Medium or Low. The data collected are organised in the table below.

A B C Total
High yield 10 8 12 30
Medium yield 24 14 12 50
Low yield 16 8 16 40
Total 50 30 40 120

The agricultural cooperative decides to carry out a chi-squared test at the significance level using the data.

a) State the null hypothesis, , for the test.

b) Write down the number of degrees of freedom.

c) Write down the critical value.

d) Show that the expected number of crops with medium yield that use fertiliser C is , rounded to the nearest whole number.

e) Use your GDC to find

(i) the calculated value, ;

(ii) the -value.

f) State the conclusion of the test. Give a reason for your decision.

Show answer

Answer: a) : the yield is independent of the fertiliser; b) ; c) ; d) ; e) (i) ; (ii) ; f) is not rejected (; )

Show working and answer

a) 1. : the crop yield is independent of the fertiliser brand.

b) 2. Table with rows (yields) and columns (brands):

c) 3. For and a significance level (right tail ) the critical value is

d) 4. Medium-yield crops (total ) with fertiliser C (total ), out of crops:

e) 5. Using the GDC, carry out a test for independence with the matrix of observed frequencies ():

(i) (exact: ).

(ii) .

f) 6. and, equivalently, . 7. is not rejected: at the level there is no evidence that the yield depends on the fertiliser brand.

Answer: a) : the yield is independent of the fertiliser; b) ; c) ; d) ; e) (i) ; (ii) ; f) is not rejected (; )

Exercise 17 MediumIB · P1 TZ0 November 2013

spectators at a swimming championship were asked which of four swimming styles they preferred to watch. Their answers are shown in the table below.

Swimming style Men Women
Freestyle 20 15
Butterfly 20 30
Backstroke 10 35
Breaststroke 10 40

A test is carried out at the significance level.

a) State the null hypothesis for this test.

b) Write down the number of degrees of freedom.

c) Write down the value of .

The critical value, at the significance level, is equal to .

d) State the conclusion of the test, with reasons.

Show answer

Answer: a) : the preferred style is independent of gender; b) ; c) ; d) as , is rejected

Show working and answer

a) 1. : the preferred swimming style is independent of the spectator's gender.

b) 2. There are styles and genders:

c) 3. Enter the table of observed frequencies () as a matrix in the GDC and carry out the test for independence. It can also be done by hand: the totals are men and women, and the totals per style are . The expected frequencies are, for example, for men and freestyle. Summing gives

d) 4. Compare with the critical value: . 5. is rejected: at the level there is evidence that the preferred swimming style depends on gender.

Answer: a) : the preferred style is independent of gender; b) ; c) ; d) as , is rejected

Exercise 18 MediumIB · P1 TZ1 May 2010

Tony wants to carry out a test to determine whether a person's choice of one of three professions (engineering, medicine or law) is influenced by the person's sex (gender).

a) Express the null hypothesis, , for this test.

b) Write down the number of degrees of freedom.

Of the people Tony interviewed, were men and were women. of the people had chosen engineering as their profession.

c) Calculate the expected number of female engineers.

Tony used a significance level of for his test and obtained a p-value of , correct to significant figures.

d) State Tony's conclusion to the test. Give a reason for this conclusion.

Show answer

Answer: a) : the chosen profession is independent of sex; b) ; c) ; d) do not reject ()

Show working and answer

a) 1. : the choice of profession (engineering, medicine or law) is independent of the sex of the person.

b) 2. There are professions and sexes:

c) 3. Total ; women ; engineers (both sexes) . Expected frequency of female engineers under :

d) 4. We compare the p-value with the significance level: . 5. Do not reject : at the level there is not enough evidence that the chosen profession depends on sex.

Answer: a) : the chosen profession is independent of sex; b) ; c) ; d) do not reject ()

Exercise 19 MediumIB · P1 TZ1 May 2009

A questionnaire was given to all the members of a school community to find out which drink was the most popular for breakfast. The results are given in the table below, classified by age.

Hot chocolate Tea Coffee Milk
Children aged 12 or under 55 10 1 34
Teenagers aged 13 to 19 25 35 20 10
Adults aged 20 or over 20 40 79 6

A test was carried out to decide whether the type of drink was independent of age.

a) Find the number of degrees of freedom for the test.

b) Write down the null hypothesis for the test.

c) Write down the critical value for the test at the significance level.

The calculated statistic for the test is , with a p-value of (both numbers given correct to significant figures).

d) State the conclusion reached at the significance level. Give a reason for your answer.

Show answer

Answer: a) ; b) : the breakfast drink is independent of age; c) ; d) reject (because , or because )

Show working and answer

a) 1. The table has rows (ages) and columns (drinks):

b) 2. : the preferred breakfast drink is independent of age.

c) 3. With and a significance level, the critical value is

d) 4. The test statistic is , much greater than the critical value . 5. Equivalently, the p-value is less than . 6. Reject : at the level there is evidence that the breakfast drink chosen depends on age.

Answer: a) ; b) : the breakfast drink is independent of age; c) ; d) reject (because , or because )

Exercise 20 MediumIB · P2 TZ2 May 2009

A manufacturer claims that a fertiliser has an effect on the height of rice plants. He measures the height of fertilised and non-fertilised plants. The results are given in the following table.

Height of plants Fertilised plants Non-fertilised plants
cm 115 80
cm 45 65
cm 20 35

A test is carried out to decide whether the manufacturer's claim is justified at the significance level.

a) Write down the null and alternative hypotheses for this test.

b) For the number of fertilised plants with a height greater than cm, show that the expected value is .

c) Write down the value of .

d) Write down the number of degrees of freedom.

e) Write down the critical value of , at the significance level.

f) Is the manufacturer's claim justified? Justify your answer.

Show answer

Answer: a) : height is independent of fertiliser; : height depends on fertiliser; b) ; c) ; d) ; e) ; f) reject (): the claim is justified

Show working and answer

a) 1. : the height of the plants is independent of the use of fertiliser.

: the height of the plants depends on the use of fertiliser (the fertiliser has an effect).

b) 2. Expected frequency . 3. Plants over cm: . Fertilised plants: . Total: .

c) 4. Using the calculator, test of independence with the observed matrix: (unrounded value ).

d) 5. .

e) 6. For and a significance level: .

f) 7. As , we reject (equivalently, ). 8. There is evidence, at the level, that height depends on the fertiliser: the manufacturer's claim is justified.

Answer: a) : height is independent of fertiliser; : height depends on fertiliser; b) ; c) ; d) ; e) ; f) reject (): the claim is justified

Exercise 21 MediumIB · P2 TZ0 November 2009

In a study involving students, a difference between males and females seemed to be detected when they were asked about their favourite car colour.

The results are shown in the following table. A test was carried out.

Blue Red Green
Males 14 6 8
Females 31 24 17

a) Write down the total number of male students.

b) Show that the expected frequency of males who prefer blue cars is equal to .

The calculated value of is .

c) (i) Write down the null hypothesis for this test.

(ii) Write down the number of degrees of freedom.

(iii) Write down the critical value of at a significance level of .

(iv) Determine whether the null hypothesis should be accepted. Give a reasoned answer.

Show answer

Answer: a) ; b) ; c) (i) : preferred colour is independent of gender; (ii) ; (iii) ; (iv) as , do not reject

Show working and answer

a) 1. Total males: .

b) 2. Total students who prefer blue: ; grand total: .

c) (i) 3. : preferred car colour is independent of gender.

(ii) 4. The table has rows and columns: .

(iii) 5. For and a level: .

(iv) 6. As (the p-value is ), we do not reject . 7. Accept : the data do not show, at , a difference between males and females in preferred car colour; the apparent difference may be due to chance.

Answer: a) ; b) ; c) (i) : preferred colour is independent of gender; (ii) ; (iii) ; (iv) as , do not reject

Exercise 22 MediumIB · P1 TZ0 May 2007

The neighbourhood park is used for walking dogs. The size of the dogs is observed at different times of the day. The following table shows the number of dogs present in the park at three different times last Sunday, classified by their size.

Small Medium Large
Morning 9 18 21
Afternoon 11 6 13
Night 7 8 9

a) Write down an appropriate null hypothesis for a test on these data.

b) Write down the value of for these data.

c) The number of degrees of freedom is . Show how this value is calculated.

The critical value, at a significance level, is .

d) What conclusion can be drawn from this test? Justify your answer.

Show answer

Answer: a) : dog size is independent of time of day; b) ; c) ; d) as , do not reject

Show working and answer

a) 1. : the size of the dog is independent of the time of day.

b) 2. Using the calculator, test of independence with the matrix of the data: (unrounded value ; ).

c) 3. The table has rows and columns:

d) 4. As , the statistic does not exceed the critical value, so we do not reject . 5. Conclusion: at the level there is no evidence of a relationship between dog size and time of day; they are independent.

Answer: a) : dog size is independent of time of day; b) ; c) ; d) as , do not reject

Exercise 23 MediumIB · P2 TZ0 November 2007

Manuel carries out a survey of a random sample of people to see which type of television programme they watch most, from the following: drama, comedy, films, news.

The results are as follows.

Drama Comedy Films News
Men under 25 22 65 90 35
Men aged 25 or over 36 54 67 17
Women under 25 22 59 82 15
Women aged 25 or over 64 39 38 46

Manuel decides to ignore age and test, at the significance level, whether the most-watched type of programme is independent of gender.

a) Draw a table with rows and columns of data so that Manuel can carry out a test.

b) State Manuel's null and alternative hypotheses.

c) Find the expected frequency for the number of women who chose "Comedy" as their most-watched type of programme. Give your answer to the nearest whole number.

d) Using your graphic display calculator, or otherwise, find the statistic for Manuel's data.

e) (i) State the number of degrees of freedom available for this calculation.

(ii) State the critical value of Manuel's test.

(iii) Express your conclusion.

Show answer

Answer: a) table with the totals by gender; b) : the type of programme is independent of gender; : it depends on gender; c) ; d) ; e) (i) ; (ii) ; (iii) as , reject

Show working and answer

a) 1. Ignoring age, we add the rows for each gender:

Men: ; ; ; .

Women: ; ; ; .

Drama Comedy Films News
Men 58 119 157 52
Women 86 98 120 61

Check: total men , total women , grand total .

b) 2. : the most-watched type of programme is independent of gender.

: the most-watched type of programme depends on gender.

c) 3. Women: . "Comedy" column: .

d) 4. Using the calculator, test of independence with the observed matrix: (unrounded value ).

e) (i) 5. .

(ii) 6. For and the level: .

(iii) 7. As (and ), we reject : there is evidence that the most-watched type of programme depends on gender.

Answer: a) table with the totals by gender; b) : the type of programme is independent of gender; : it depends on gender; c) ; d) ; e) (i) ; (ii) ; (iii) as , reject

Exercise 24 MediumIB · P2 TZ0 November 2019

The Casanova restaurant has a set menu in which the customer chooses one of the following dishes: pasta, fish or seafood.

The manager carried out a survey of customers, recording each customer's age and the dish they had chosen. The data are shown in the following table.

Pasta Fish Seafood Total
Adults 24 25 32 81
Children 20 14 35 69
Total 44 39 67 150

A test was carried out at the significance level.

The critical value for this test is .

a) State the null hypothesis, , for this test.

b) Write down the number of degrees of freedom.

c) Show that the expected number of children who chose seafood is , correct to two significant figures.

d) Write down

(i) the statistic;

(ii) the p-value.

e) State the conclusion that can be drawn from this test.

Give a reason to justify your answer.

f) A customer is chosen at random.

(i) Calculate the probability that the customer is an adult.

(ii) Calculate the probability that the customer is an adult or that the customer chose seafood.

(iii) Given that the customer is a child, calculate the probability that they chose pasta or fish.

Show answer

Answer: a) : age is independent of the dish chosen; b) ; c) ; d) (i) ; (ii) ; e) do not reject (); f) (i) ; (ii) ; (iii)

Show working and answer

a) 1. : the customer's age (adult or child) is independent of the dish chosen.

b) 2. The table has rows and columns:

c) 3. Expected number of children who choose seafood :

d) 4. Using the graphic display calculator, test of independence with the matrix of observed frequencies ():

(i) (unrounded value ).

(ii) .

e) 5. The statistic is less than the critical value: (equivalently, ). 6. We do not reject : there is no evidence, at the level, that the dish chosen depends on the customer's age.

f) 7. (i) There are adults among customers:

  1. (ii) By the inclusion–exclusion principle, we subtract the adults who chose seafood ():

  2. (iii) Given that the customer is a child, the sample space is the children; of these, chose pasta or fish:

Answer: a) : age is independent of the dish chosen; b) ; c) ; d) (i) ; (ii) ; e) do not reject (); f) (i) ; (ii) ; (iii)

Exercise 25 MediumIB · P2 TZ2 May 2019

The Sila Institute has students. Each of them studies exactly one language; they can choose between English, Spanish or Chinese. The following table shows the number of female and male students who have chosen each of these languages.

English Spanish Chinese Total
Sex of student Female 25 8 10 43
Male 21 14 32 67
Total 46 22 42 110

A test was carried out at the significance level to analyse the relationship between the sex of the student and the language they choose to study.

a) Write down the null hypothesis, , for this test.

b) State the number of degrees of freedom.

c) Using your graphic display calculator, write down

(i) the expected frequency of female students who choose Chinese;

(ii) the statistic.

The critical value for this test, at the significance level, is equal to .

d) State whether should (or should not) be rejected. Justify your answer.

e) A student (male or female) is chosen at random from this institute.

(i) Find the probability that the student is not studying Spanish.

Another student (male or female) from this institute is chosen at random.

(ii) Find the probability that neither of the two students is studying Spanish.

(iii) Find the probability that at least one of the two students is female.

Show answer

Answer: a) : the language is independent of sex; b) ; c) (i) ; (ii) ; d) reject (); e) (i) ; (ii) ; (iii)

Show working and answer

a) 1. : the language studied by the student is independent of their sex.

b) 2. The table has rows (sex) and columns (language):

c) 3. (i) Expected frequency of female students who study Chinese: (The calculator shows it in the matrix of expected frequencies when the test is carried out.)

  1. (ii) Using the graphic display calculator, test of independence with the observed matrix: (unrounded value ).

d) 5. Compare with the critical value: . 6. Reject : there is evidence, at the level, that the language chosen depends on the student's sex.

e) 7. (i) Students not studying Spanish: .

  1. (ii) The second student is a different person, so the first is not replaced: there are students left, of whom do not study Spanish:

  2. (iii) "At least one female" is the complement of "both are male" (there are males):

Answer: a) : the language is independent of sex; b) ; c) (i) ; (ii) ; d) reject (); e) (i) ; (ii) ; (iii)

Exercise 26 MediumIB · P2 TZ2 May 2017

At a school, all students of Mathematical Studies SL sat an examination.

The examination consisted of four questions, each corresponding to a different unit of the syllabus. The quality of each answer was marked as satisfactory or unsatisfactory. Each student answered only three of the four questions, each on a different answer sheet.

The following table shows, for each question, the number of satisfactory and unsatisfactory answers.

Calculus Probability Geometry Logic Total
Quality of answer Satisfactory 10 16 20 14 60
Quality of answer Unsatisfactory 8 6 10 6 30
Total 18 22 30 20 90

a) If the teacher chooses an answer at random, find the probability that

(i) it is an answer to the Calculus question;

(ii) it is a satisfactory answer to the Calculus question;

(iii) it is a satisfactory answer, given that it is an answer to the Calculus question.

b) The teacher groups the answers by unit and chooses two answers to the Logic question. Find the probability that both answers were unsatisfactory.

Using the data shown in the table, a test was carried out at the significance level.

c) State the null hypothesis for this test.

d) Show that the expected frequency of satisfactory answers to the Calculus question is equal to .

e) Write down the number of degrees of freedom for this test.

f) Use your graphic display calculator to find the statistic for these data.

The critical value for this test is .

g) State the conclusion of this test. Give a reason to justify your answer.

Show answer

Answer: a) (i) ; (ii) ; (iii) ; b) ; c) : quality is independent of the question; d) ; e) ; f) ; g) do not reject ()

Show working and answer

a) 1. (i) There are Calculus answers out of :

  1. (ii) Satisfactory Calculus answers: :

  2. (iii) Conditioned on Calculus, the sample space is its answers:

b) 4. In Logic there are answers, of them unsatisfactory. Two are chosen without replacement:

c) 5. : the quality of the answer (satisfactory or unsatisfactory) is independent of the question (unit) it corresponds to.

d) 6. Expected number of satisfactory Calculus answers:

e) 7. The table has rows and columns:

f) 8. Using the graphic display calculator, test of independence with the observed matrix: (unrounded value ).

g) 9. As , we do not reject : there is no evidence, at the level, that the quality of the answer depends on the question.

Answer: a) (i) ; (ii) ; (iii) ; b) ; c) : quality is independent of the question; d) ; e) ; f) ; g) do not reject ()

Exercise 27 MediumIB · P2 TZ1 May 2012

Final-year students at Gulf High School must take part in exactly one sport after school. Data were collected from a sample of students about their choice of sport. The following data were recorded.

Football Tennis Basketball Total
Gender Male 17 8 10 35
Gender Female 31 17 37 85
Total 48 25 47 120

A test at the significance level was carried out to analyse the relationship between gender and choice of after-school sport.

a) Write down the null hypothesis, , for this test.

b) Find the expected value for female football players.

c) Write down the number of degrees of freedom.

d) Write down the critical value of at the significance level.

e) Use your graphic display calculator to find the value of .

f) Determine whether should be accepted. Justify your answer.

One student is chosen at random from the students.

g) Find the probability that this student

(i) is male;

(ii) plays tennis.

Two students are chosen at random from the students.

h) Find the probability that

(i) both play football;

(ii) neither plays basketball.

Show answer

Answer: a) : choice of sport is independent of gender; b) ; c) ; d) ; e) ; f) do not reject (); g) (i) ; (ii) ; h) (i) ; (ii)

Show working and answer

a) 1. : choice of sport is independent of gender.

b) 2. Expected value for female football players:

c) 3. Table :

d) 4. With degrees of freedom and a level, the critical value is .

e) 5. Using the GDC, test for independence with the observed matrix: (unrounded, ).

f) 6. Since , we do not reject : there is no evidence, at the 5% level, that choice of sport depends on gender.

g) 7. (i) .

  1. (ii) .

h) 9. (i) Two different students, without replacement ( play football):

  1. (ii) Students who do not play basketball: 120-47=73:

Answer: a) : choice of sport is independent of gender; b) ; c) ; d) ; e) ; f) do not reject (); g) (i) ; (ii) ; h) (i) ; (ii)

Exercise 28 MediumIB · P2 TZ2 May 2008

A market research organisation carries out a survey of 400 people in two different cities, Buenos Aires and Montevideo. People are asked which brand of cereal they prefer: Chocos, Zucos or Fruti. The table below summarises their responses.

Chocos Zucos Fruti Total
Buenos Aires 43 85 62 190
Montevideo 57 35 118 210
Total 100 120 180 400

a) One person is chosen at random from those surveyed. Find the probability that this person

(i) does not prefer Zucos;

(ii) prefers Chocos, given that they live in Montevideo.

b) Two people are chosen at random from those surveyed. Find the probability that both prefer Fruti.

The market research organisation tests the survey data to determine whether the preferred cereal brand is associated with a city.

A chi-squared test is carried out at the 5% significance level.

c) State the null hypothesis.

d) State the number of degrees of freedom.

e) Show that the expected frequency for the number of people who live in Montevideo and prefer Zucos is .

f) Write down the chi-squared statistic for these data.

g) State whether the market research organisation would accept the null hypothesis. Justify your answer clearly.

Show answer

Answer: a) (i) ; (ii) ; b) ; c) : the preferred brand is independent of the city; d) ; e) ; f) ; g) reject ()

Show working and answer

a) 1. (i) Those who do not prefer Zucos: 400-120=280 people:

  1. (ii) Conditional on Montevideo (sample space: 210 people), 57 prefer Chocos:

b) 3. 180 people prefer Fruti. Two different people are chosen (without replacement):

c) 4. H0: the preferred cereal brand is independent of the city.

d) 5. Table 2×3: d.f.=(2-1)(3-1)=2.

e) 6. Expected number of people from Montevideo who prefer Zucos:

f) 7. Using the GDC, chi-squared test for independence with the observed 2×3 matrix: (unrounded, ).

g) 8. At the 5% level and with 2 degrees of freedom, the critical value is 5.99. Since 39.3>5.99 (the p-value is practically 0), we reject H0. 9. The organisation would not accept the null hypothesis: there is evidence that the preferred brand is associated with the city.

Answer: a) (i) ; (ii) ; b) ; c) : the preferred brand is independent of the city; d) ; e) ; f) ; g) reject ()

Exercise 29 HardIB · P2 TZ0 November 2008

Jorge has carried out a survey of 200 drivers. He asked them two questions:

How long have you held your driving licence?

Do you wear a seatbelt when you drive?

The responses are summarised in the following table.

Wears a seatbelt Does not wear a seatbelt
Licence held for less than 2 years 38 42
Licence held for between 2 and 15 years 30 45
Licence held for more than 15 years 30 15

a) Jorge carries out a test at the 5% significance level to investigate whether seatbelt use is associated with the length of time the driver has held a driving licence.

(i) Write down the null hypothesis, .

(ii) Write down the number of degrees of freedom.

(iii) Verify that the expected number of drivers who wear a seatbelt and who have held their licence for more than 15 years is equal to 22, rounded to the nearest whole number.

(iv) Write down the statistic for these data.

(v) Does Jorge accept ? Justify your answer.

b) Consider the 200 drivers who took part in the survey. One driver is chosen at random. Find the probability that

(i) this driver wears a seatbelt;

(ii) the driver does not wear a seatbelt, given that the driver has held their licence for more than 15 years.

c) Two drivers are chosen at random. Find the probability that

(i) both wear a seatbelt;

(ii) at least one of them wears a seatbelt.

Show answer

Answer: a) (i) seatbelt use is independent of the length of time the driver has held their licence; (ii) ; (iii) ; (iv) ; (v) no, we reject (p=0.0172<0.05); b) (i) ; (ii) ; c) (i) ; (ii)

Show working and answer

a)

(i) 1. The test for independence tests whether two categorical variables are associated. The null hypothesis states that they are not: : seatbelt use is independent of the length of time the driver has held their driving licence.

(ii) 2. The table has 3 rows and 2 columns, so the degrees of freedom are

(iii) 3. Expected frequency = (row total · column total) / grand total. The row "more than 15 years" sums to 30+15=45; the column "wears a seatbelt" sums to 38+30+30=98:

(iv) 4. Using the GDC, test for independence with the observed 3×2 matrix (without continuity correction):

(v) 5. We compare the p-value with the significance level: 0.0172<0.05. 6. Therefore Jorge rejects H0: there is evidence, at the 5% level, that seatbelt use is associated with the length of time the driver has held their licence.

b)

(i) 7. The number who wear a seatbelt is 38+30+30=98 out of 200 drivers:

(ii) 8. Conditional probability: we restrict attention to the 45 drivers who have held their licence for more than 15 years, of whom 15 do not wear a seatbelt:

c) Two drivers are chosen without replacement, so the second probability changes.

(i) 9.

(ii) 10. We use the complementary event ("none wears a seatbelt"), with 102 drivers who do not wear one:

Answer: a) (i) seatbelt use is independent of the length of time the driver has held their licence; (ii) ; (iii) ; (iv) ; (v) no, we reject (p=0.0172<0.05); b) (i) ; (ii) ; c) (i) ; (ii)

Chi-squared goodness of fit test

Exercise 30 MediumIB · IB exam

A boy buys 10 packets of sweets and counts how many of each colour (yellow, orange, red, purple and green) there are. In total he has 600 sweets. According to the sweet factory, the colours should be distributed uniformly, with 20% of each colour in a bag.

The results for the 10 bags are:

Colour Frequencies
Yellow 104
Orange 132
Red 98
Purple 129
Green 137

a) Write down the table of expected frequencies.

A goodness of fit test is carried out at the 5% significance level to determine whether the data fit a uniform distribution.

b) Write down the number of degrees of freedom.

c) Write down the null and alternative hypotheses for the test.

The critical value for this test is 9.488.

d) What are the values of and ?

e) What can you conclude from the test?

Show answer

Answer: a) for each colour; b) ; c) : uniform distribution, : not uniform; d) , ; e) reject

Show working and answer

a) 1. If the distribution were uniform, each of the 5 colours would have 20% of the 600 sweets: 0.2·600=120.

Colour Expected frequency
Yellow 120
Orange 120
Red 120
Purple 120
Green 120

b) 2. In a goodness of fit test, .

c) 3. : the data fit a uniform distribution (the five colours are equally likely). : the data do not fit a uniform distribution.

d) 4. Test statistic: 5. Using the GDC (goodness of fit test, ) we obtain .

e) 6. Since p=0.0335<0.05 (equivalently, ), we reject H0. 7. Conclusion: there is evidence, at the 5% level, that the colours are not distributed uniformly across the bags.

Answer: a) for each colour; b) ; c) : uniform distribution, : not uniform; d) , ; e) reject

Exercise 31 MediumIB · IB exam

There are 60 students in a class. The teacher asks them which month their birthday is in, and the results are shown in the following table.

Month Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
Frequencies 3 5 4 6 5 6 4 7 8 6 3 3

The months in which the students have their birthdays are uniformly distributed.

a) Write down the table of expected values.

A goodness of fit test is carried out at the 10% significance level to determine whether the data fit a uniform distribution.

b) Write down the number of degrees of freedom.

c) Write down the null and alternative hypotheses for the test.

The critical value for this test is 17.275.

d) What are the values of and ?

e) What can you conclude from the test?

Show answer

Answer: a) for each month; b) ; c) : uniform distribution, : not uniform; d) , ; e) do not reject

Show working and answer

a) 1. With 12 equally likely months, the expected frequency for each month is .

Month Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
Expected frequency 5 5 5 5 5 5 5 5 5 5 5 5

b) 2. .

c) 3. : the data fit a uniform distribution (birthdays are spread equally across the months). : the data do not fit a uniform distribution.

d) 4. Test statistic: 5. Using the GDC (goodness of fit test, ): .

e) 6. Since (equivalently, ), we do not reject . 7. Conclusion: there is no evidence, at the 10% level, against birthdays being uniformly distributed across the months.

Answer: a) for each month; b) ; c) : uniform distribution, : not uniform; d) , ; e) do not reject

Exercise 32 MediumIB · IB exam

The last digit of 500 winning lottery tickets is recorded in the following table.

Last digit 0 1 2 3 4 5 6 7 8 9
Frequencies 44 53 49 61 47 52 39 58 42 45

Each digit should have the same probability of occurring.

a) Write down the table of expected values.

A goodness of fit test is carried out at the 10% significance level to determine whether the data fit a uniform distribution.

b) What is the number of degrees of freedom?

c) Write down the null and alternative hypotheses for the test.

The critical value for this test is 14.684.

d) Calculate the values of and .

e) What can you conclude from the test?

Show answer

Answer: a) for each digit; b) ; c) : uniform distribution, : not uniform; d) , ; e) do not reject

Show working and answer

a) 1. If the 10 digits are equally likely, we expect 500/10=50 tickets per digit.

Last digit 0 1 2 3 4 5 6 7 8 9
Expected frequency 50 50 50 50 50 50 50 50 50 50

b) 2. .

c) 3. : the data fit a uniform distribution (all digits have the same probability). : the data do not fit a uniform distribution.

d) 4. Test statistic: 5. Using the GDC (goodness of fit test, ): .

e) 6. Since (equivalently, ), we do not reject . 7. Conclusion: there is no evidence, at the 10% level, against the last digits of the winning tickets following a uniform distribution.

Answer: a) for each digit; b) ; c) : uniform distribution, : not uniform; d) , ; e) do not reject

Student's t-test

Exercise 33 BasicIB · IB exam

A farmer picked some beans from two different plants and measured them, in cm. The results are shown in the following table.

Length of beans on plant 1 19 23 21 25 24 18 25 18 24 16
Length of beans on plant 2 27 24 25 28 25 27 24 26 22 23

He wanted to find out whether there was any difference in the length of the beans from the two plants, and so a -test was carried out at the 5% significance level.

a) Write down the null hypothesis and the alternative hypothesis.

b) Is this a one-tailed or a two-tailed test?

c) Find the value of and the -value for this test.

d) What can you conclude from the test?

Show answer

Answer: a) , ; b) two-tailed; c) , ; d) reject

Show working and answer

a) 1. Let and be the mean lengths of the beans from plants 1 and 2. (there is no difference in the length of the beans). (there is a difference).

b) 2. The alternative hypothesis says "different" without indicating a direction, so this is a two-tailed test.

c) 3. Using the GDC, two-sample -test for independent samples with pooled variances, with and (sample means and ):

d) 4. Since p=0.00584<0.05, we reject H0. 5. Conclusion: there is evidence, at the 5% level, that the mean length of the beans is different on the two plants (in the sample, greater on plant 2).

Answer: a) , ; b) two-tailed; c) , ; d) reject

Exercise 34 BasicIB · IB exam

The weights, in kg, of the boys and girls in Year 6 were recorded to find out whether the boys weighed less than the girls.

Weight of boys 33 32 35 36 41 32 38 34 36 31
Weight of girls 35 39 43 45 39 44 38 32

A -test is carried out at the 5% significance level.

a) Write down the null hypothesis and the alternative hypothesis.

b) Is this a one-tailed or a two-tailed test?

c) Find the value of and the -value for this test.

d) What can you conclude from the test?

Show answer

Answer: a) , ; b) one-tailed; c) , ; d) reject

Show working and answer

a) 1. Let be the mean weight of the boys and that of the girls. We want to test whether the boys weigh less: (there is no difference between the weight of boys and girls). (the boys weigh less than the girls).

b) 2. The alternative hypothesis has a specific direction (), so this is a one-tailed test.

c) 3. Using the GDC, two-sample -test for independent samples with pooled variances, with , , (sample means and ) and alternative hypothesis :

d) 4. Since p=0.0105<0.05, we reject H0. 5. Conclusion: there is evidence, at the 5% level, that Year 6 boys weigh less than girls on average.

Answer: a) , ; b) one-tailed; c) , ; d) reject

Exercise 35 BasicIB · IB exam

A dietary company claims to have a new remedy for weight loss. It claims that people who use this remedy can lose more weight than people who do not use it. A total of 20 people are weighed. Ten people receive the new remedy and the other ten receive a placebo. After two months these people are weighed again, and any weight loss, in kg, is recorded in the following table.

New remedy 1.2 2.4 1.6 3.5 3.2 4.6 2.5 0.8 1.2 3.9
Placebo 0.6 0.0 1.0 1.3 2.1 0.7 1.9 2.4 0.3 1.0

A -test is carried out at the 1% significance level.

a) Write down the null hypothesis and the alternative hypothesis.

b) Is this a one-tailed or a two-tailed test?

c) Find the value of and the -value for this test.

d) What can you conclude from the test?

Show answer

Answer: a) , ; b) one-tailed; c) , ; d) reject

Show working and answer

a) 1. Let be the mean weight loss with the new remedy and that with the placebo. The company claims that the remedy leads to greater weight loss: (there is no difference in weight loss). (more weight is lost with the remedy).

b) 2. The alternative hypothesis has a specific direction (): this is a one-tailed test.

c) 3. Using the GDC, two-sample -test for independent samples with pooled variances, with , (sample means and ) and alternative hypothesis :

d) 4. Since p=0.00539<0.01, we reject H0. 5. Conclusion: there is evidence, at the 1% level, that people who use the new remedy lose more weight on average than those who take the placebo.

Answer: a) , ; b) one-tailed; c) , ; d) reject

Exercise 36 BasicIB · IB exam

The lengths, in cm, of the corn cobs in two fields on either side of a road are measured to find out whether there is any difference between them.

Field 1 17 18 15 21 22 24 19 23 25
Field 2 19 21 23 16 18 22 23 16 19

A -test is carried out at the 10% significance level.

a) Write down the null hypothesis and the alternative hypothesis.

b) Is this a one-tailed or a two-tailed test?

c) Find the value of and the -value for this test.

d) What can you conclude from the test?

Show answer

Answer: a) , ; b) two-tailed; c) , ; d) do not reject

Show working and answer

a) 1. Let and be the mean lengths of the corn cobs in fields 1 and 2. (there is no difference in the lengths). (there is a difference).

b) 2. Any difference is sought, with no specific direction: this is a two-tailed test.

c) 3. Using the GDC, two-sample -test for independent samples with pooled variances, with , (sample means and ):

d) 4. Since p=0.600>0.10, we do not reject H0. 5. Conclusion: there is no evidence, at the 10% level, that the mean length of the corn cobs is different in the two fields.

Answer: a) , ; b) two-tailed; c) , ; d) do not reject

Combined contextual problems

Exercise 37 HardIB · P2 TZ1 May 2019

A survey was carried out on a group of people. The first question asked how many pets each person owns. The results are summarised in the table below.

Number of pets owned 0 1 2 3 4 5
Number of people 20 45 40 30 20 5

a) Write down the total number of people in this group who own pets.

b) Write down the mode of the number of pets.

c) For these data, write down

(i) the mean number of pets;

(ii) the lower quartile;

(iii) the upper quartile.

The second question asked each member of the group to state their age and preferred pet. The data obtained are organised in the table below.

Preferred pet Teenager Non-teenager
Cat 23 32
Dog 35 23
Bird 16 13
Other 11 7

d) Write down the ratio of teenagers to non-teenagers in its simplest form.

A test is carried out at the significance level.

e) State

(i) the null hypothesis;

(ii) the alternative hypothesis.

f) Write down the number of degrees of freedom for this test.

g) Calculate the expected number of teenagers who prefer cats.

h) Use your graphic display calculator to find the -value for this test.

(i) State the conclusion of this test. Justify your answer.

Show answer

Answer: a) ; b) ; c) (i) , (ii) , (iii) ; d) ; e) (i) : preferred pet is independent of age, (ii) : it is not independent; f) ; g) ; h) ; i) as , is not rejected

Show working and answer

a)

The total number of people is . The people who own pets are all those with at least one, that is, everyone except the who have :

Answer: people

b)

The mode is the value with the highest frequency: people have pet.

Answer: mode

c)

  1. Mean: .
  2. Quartiles (using the GDC, one-variable statistics with the data and their frequencies): the cumulative frequencies are . The point (the th value) falls in and the point (the th value) falls in .

Answer: (i) ; (ii) ; (iii)

d)

  1. Teenagers: . Non-teenagers: .
  2. Ratio: ; dividing by gives .

Answer: (i.e. )

e)

(i) : preferred pet is independent of age (being a teenager or not).

(ii) : preferred pet is not independent of age (it depends on it).

Answer: (i) : independence; (ii) : dependence

f)

The table has rows and columns: .

Answer: degrees of freedom

g)

  1. Row total for “Cat”: . Column total for “Teenager”: . Grand total: .
  2. Expected frequency:

Answer: teenagers

h)

Using the GDC, carry out a test for independence with the matrix : and .

Answer:

i)

  1. Compare with the significance level: .
  2. is not rejected: there is not sufficient evidence, at the level, that preferred pet depends on age.

Answer: a) ; b) ; c) (i) , (ii) , (iii) ; d) ; e) (i) : preferred pet is independent of age, (ii) : it is not independent; f) ; g) ; h) ; i) as , is not rejected

Exercise 38 HardIB · P2 TZ0 November 2012

A shop recorded its television sales during the 2010 FIFA World Cup. It observed the number of televisions bought by gender and the screen size of the televisions. This information is shown in the table below, where represents the screen size of the television in inches.

Total
Female 65 100 40 15 220
Male 20 65 140 55 280
Total 85 165 180 70 500

The shop wants to use this information to predict the probability of selling these screen sizes for the 2014 FIFA World Cup.

a) Use the table to find the probability that

(i) a woman will buy a television;

(ii) a television with a screen size of will be bought;

(iii) a television with a screen size of will be bought by a woman;

(iv) a television with a screen size larger than inches will be bought, given that it is bought by a man.

The manager of the shop wants to determine whether screen size is independent of gender. A test is carried out at the significance level.

b) Write down the null hypothesis.

c) Show that the expected frequency for women who bought a screen size of is , to the nearest whole number.

d) Write down the number of degrees of freedom.

e) Write down the calculated value.

f) Write down the critical value for this test.

g) Determine whether the null hypothesis should be accepted. Give a reason for your answer.

Show answer

Answer: a) (i) ; (ii) ; (iii) ; (iv) ; b) : screen size is independent of gender; c) ; d) ; e) ; f) ; g) is rejected ()

Show working and answer

a) Total sales: .

(i) 1. Women: out of :

(ii) 2. Screens with : out of :

(iii) 3. Women and screen : the cell is :

(iv) 4. Conditional probability: among the men, buy :

b) 5. : screen size is independent of the buyer's gender.

c) 6. Women (total ) and screen (total ):

d) 7. genders and sizes:

e) 8. Using the GDC, carry out a test for independence with the matrix of observed frequencies:

f) 9. For and the level (right tail ):

g) 10. As , is rejected: at the level there is evidence that screen size depends on gender.

Answer: a) (i) ; (ii) ; (iii) ; (iv) ; b) : screen size is independent of gender; c) ; d) ; e) ; f) ; g) is rejected ()

Exercise 39 HardIB · P2 TZ1 May 2011

Part A

One day, the number of customers at three cafés, "Alan's Diner" (), "Sarah's Snackbar" () and "Pete's Eats" (), was recorded and is shown below.

  • were customers of Pete's Eats only
  • were customers of Sarah's Snackbar only
  • were customers of Alan's Diner only
  • Ten were customers of Pete's Eats and Sarah's Snackbar, but not of Alan's Diner
  • were customers of Pete's Eats and Alan's Diner, but not of Sarah's Snackbar

a) Draw a Venn diagram, using sets labelled , and , that shows this information.

That day there were customers of Pete's Eats.

b) Calculate the number of people who were customers of all three cafés.

That day there were customers of Sarah's Snackbar.

c) Calculate the total number of people who were customers of Alan's Diner.

d) Write down the number of customers of Alan's Diner who were also customers of Pete's Eats.

e) Find .

Part B

Some of the customers of each café were given survey forms to complete, to find out whether they were satisfied with the level of service they received.

Pete's Eats Alan's Diner Sarah's Snackbar Total
Dissatisfied 16 8 16 40
Satisfied 26 20 34 80
Total 42 28 50 120

One of the survey forms is chosen at random. Calculate the probability that

a) the form showed "Dissatisfied";

b) the form showed "Satisfied" and was completed at Sarah's Snackbar;

c) the form showed "Dissatisfied", given that it was completed at Alan's Diner.

A test is carried out at the significance level to determine whether there was any difference in customer satisfaction level at each of the cafés.

d) Write down the null hypothesis, , for the test.

e) Write down the number of degrees of freedom of the test.

f) Using your GDC, find .

g) State the conclusion of the test, giving a reason.

Show answer

Answer: Part A: b) ; c) ; d) ; e) . Part B: a) ; b) ; c) ; d) : the level of satisfaction is independent of the café; e) ; f) ; g) is not rejected ()

Show working and answer

Part A

a) 1. We start with the smallest intersections. Data: only : ; only : ; only : ; without : ; without : . The regions and without are calculated in parts and , and with them the diagram is complete:

Venn diagram with three sets A, S and P: only A 15, only S 27, only P 17, A and P but not S 8, S and P but not A 10, all three A, S and P 13, and A and S but not P 0

b) 2. Let be the number of customers of all three cafés. The customers of add up the four regions of its circle:

c) 3. Let be the number of customers of and but not . The customers of : 4. Customers of : only () + without () + all three () + without ():

d) 5. Customers of who are also customers of : without plus all three cafés:

e) 6. are those who go to or but not to : only (), only () and without ():

Part B

a) 7. There are dissatisfied out of :

b) 8. “Satisfied” and at Sarah's Snackbar: out of :

c) 9. Conditional probability: among the forms from Alan's Diner, are “dissatisfied”:

d) 10. : the level of satisfaction is independent of the café.

e) 11. rows and columns:

f) 12. Using the GDC, carry out a test for independence with the matrix of observed frequencies:

g) 13. Critical value for and the level: (equivalently, ). 14. As , is not rejected: there is no evidence that the level of satisfaction depends on the café.

Answer: Part A: b) ; c) ; d) ; e) . Part B: a) ; b) ; c) ; d) : the level of satisfaction is independent of the café; e) ; f) ; g) is not rejected ()

Exercise 40 HardIB · P2 TZ0 November 2017

A group of students had to answer questions in the category of their choice, from History, Science and Literature.

For each student, the category chosen and the number of correct answers were recorded.

The results are shown in the following table.

Category Total number of students
History 46 80 68 39 233
Science 37 82 85 56 260
Literature 31 110 104 62 307
Total number of students 114 272 257 157 800

a) State whether is a discrete or continuous variable.

b) Write down, for :

(i) the modal class;

(ii) the mid-point of the interval for the modal class.

c) Use your graphic display calculator to obtain an estimate of

(i) the mean of ;

(ii) the standard deviation of .

These results are used to carry out a test at the significance level.

The critical value for this test is .

d) Find the expected value corresponding to choosing the category Science and obtaining between and correct answers.

e) Write down

(i) the null hypothesis for this test;

(ii) the number of degrees of freedom.

f) Write down

(i) the p-value for this test;

(ii) the statistic.

g) State the outcome of the test. Give a reason to justify your answer.

Show answer

Answer: a) discrete; b) (i) ; (ii) ; c) (i) ; (ii) ; d) ; e) (i) : the chosen category is independent of the number of correct answers; (ii) ; f) (i) ; (ii) ; g) do not reject ()

Show working and answer

a) 1. is a number of correct answers: it only takes whole number values (). It is a discrete variable.

b) (i) 2. Class totals: . The largest frequency is : modal class .

(ii) 3. Mid-point: .

c) 4. We take the value of each class to be its mid-point, , with frequencies (one-variable statistics of data grouped in the calculator).

(i) 5. (unrounded value ).

(ii) 6. Population standard deviation: (unrounded value ).

d) 7. Science: students. Between and answers: students. Total: .

e) (i) 8. : the chosen category is independent of the number of correct answers.

(ii) 9. The data table has rows and columns: .

f) 10. Using the calculator, test of independence with the matrix (without totals):

(i) .

(ii) (unrounded value ).

g) 11. As (or also ), we do not reject . 12. Conclusion: at the level there is no evidence that the chosen category depends on the number of correct answers.

Answer: a) discrete; b) (i) ; (ii) ; c) (i) ; (ii) ; d) ; e) (i) : the chosen category is independent of the number of correct answers; (ii) ; f) (i) ; (ii) ; g) do not reject ()

Exercise 41 HardIB · P2 TZ2 May 2011

Part A

A university required all Science students to study a language for one year. A survey was carried out among the Science students at the university.

All of these students studied French, Spanish or Russian. The results of the survey are shown below.

French Spanish Russian
Women 9 29 12
Men 31 40 29

Ludmila decides to carry out a test at the significance level to determine whether the choice of language is independent of gender.

a) State Ludmila's null hypothesis.

b) Write down the number of degrees of freedom.

c) Find the expected frequency for women who study Spanish.

d) Use your graphic display calculator to find the for these data.

e) State whether Ludmila accepts the null hypothesis. Give a reason for your answer.

Part B

At the end of the year, only seven of the Science students sat exams in Science and French. The marks of these seven students are shown in the following table.

Science (S) 23 51 56 62 12 73 72
French (F) 65 45 45 40 70 36 30

a) Draw a labelled scatter diagram for these data. Use a scale of cm to represent marks on the -axis () and marks on the -axis ().

b) Use your graphic display calculator to find

(i) , the mean of ;

(ii) , the mean of .

c) Plot the point on your scatter diagram.

d) Use your graphic display calculator to find the equation of the regression line of on .

e) Draw the regression line on your scatter diagram.

Carletta's mark in the Science exam was . She did not sit the French exam.

f) Estimate Carletta's mark for the French exam.

Monique's mark in the Science exam was . She did not sit the French exam. Her French teacher wants to use the regression line to estimate Monique's mark.

g) State whether the mark obtained from the regression line for Monique's French exam is reliable. Justify your answer.

Show answer

Answer: Part A: a) : the choice of language is independent of gender; b) ; c) ; d) ; e) do not reject (). Part B: a) scatter diagram; b) (i) ; (ii) ; c) ; d) ; e) line drawn; f) ; g) not reliable, lies outside the range of the data

Show working and answer

Part A

a) 1. : the choice of language is independent of gender.

b) 2. The table has rows and columns: .

c) 3. Women: . Spanish: . Total: .

d) 4. Using the calculator, test of independence with the matrix: (unrounded value ).

e) 5. For and the level: . 6. As (and ), we do not reject : Ludmila accepts that the choice of language is independent of gender.

Part B

a) 7. Plot the seven points with the axes labelled (Science) and (French), and a scale of cm per marks: .

Scatter diagram of French marks F against Science marks S, with seven points and the decreasing regression line, going from (0; 78.2) to (90; 22.5) and passing through the mid-point M with coordinates 49.9 and 47.3

b) 8. Using the calculator (two-variable statistics):

(i) .

(ii) .

c) 9. Mark the point on the diagram (the mid-point of the data).

d) 10. Linear regression of on with the calculator: (The line passes through ; the correlation coefficient is , a very strong negative correlation.)

e) 11. Draw the line through and another point, for example and .

f) 12. Substitute (unrounded values for the line):

g) 13. lies outside the range of Science marks used for the line (): this is an extrapolation. 14. Therefore the estimate (which would be about ) is not reliable, even though the correlation is strong.

Answer: Part A: a) : the choice of language is independent of gender; b) ; c) ; d) ; e) do not reject (). Part B: a) scatter diagram; b) (i) ; (ii) ; c) ; d) ; e) line drawn; f) ; g) not reliable, lies outside the range of the data

Exercise 42 HardIB · P2 TZ1 May 2018

On one day, flights arrived at a particular airport. The distance travelled and the arrival status of each incoming flight were recorded. Each flight was then classified as On time, Slightly delayed or Significantly delayed. The results are shown in the following table.

At most 500 km Between 500 km and 5000 km At least 5000 km TOTAL
Arrival status On time 19 17 16 52
Arrival status Slightly delayed 13 18 14 45
Arrival status Significantly delayed 28 15 40 83
TOTAL 60 50 70 180

A test is carried out at the significance level to determine whether the arrival status of incoming flights is independent of the distance travelled.

a) Express the alternative hypothesis.

b) Calculate the expected frequency of flights that travel at most km and arrive slightly delayed.

c) Write down the number of degrees of freedom.

d) Write down

(i) the statistic;

(ii) the associated p-value.

The critical value for this test is .

e) State, with reasons, whether you would reject the null hypothesis.

One flight is chosen at random from the flights recorded.

f) Write down the probability that this flight arrives on time.

g) Given that this flight arrives on time or slightly delayed, calculate the probability that it travelled between km and km.

Two flights are chosen at random from those that were slightly delayed.

h) Find the probability that each of these flights travelled at least km.

Show answer

Answer: a) : the arrival status depends on the distance; b) ; c) ; d) (i) ; (ii) ; e) reject (); f) ; g) ; h)

Show working and answer

a) 1. The alternative hypothesis denies independence:

: the arrival status of the flight depends on (is not independent of) the distance travelled.

b) 2. Expected number of flights of at most km that arrive slightly delayed:

c) 3. The table has rows and columns:

d) 4. Using the graphic display calculator, test of independence with the observed matrix:

(i) (unrounded value ).

(ii) .

e) 5. As (equivalently, ), we reject : there is evidence, at the level, that the arrival status depends on the distance travelled.

f) 6. of the flights arrived on time:

g) 7. Conditional probability: the sample space is the flights that were on time or slightly delayed, . Of these, travelled between km and km:

h) 8. There are slightly delayed flights, of which travelled at least km. Two different flights are chosen (without replacement):

Answer: a) : the arrival status depends on the distance; b) ; c) ; d) (i) ; (ii) ; e) reject (); f) ; g) ; h)

Exercise 43 HardIB · P2 TZ0 November 2011

Pam has collected data from a group of 400 IB Diploma students on the mathematics course they studied and the language in which they were examined (English, Spanish or French).

A summary of her data is given below.

Mathematics HL Mathematics SL Mathematical Studies SL Total
English 50 70 80 200
Spanish 30 50 30 110
French 20 30 40 90
Total 100 150 150 400

One student is chosen at random from the group.

a) Find the probability that the student

(i) studied Mathematics HL;

(ii) was examined in French;

(iii) studied Mathematics HL and was examined in French;

(iv) did not study Mathematics SL and was not examined in English;

(v) studied Mathematical Studies SL, given that the student was examined in Spanish.

Pam believes that the mathematics course a student chooses is independent of the language in which the student is examined.

b) Using your answers to parts a) (i), (ii) and (iii) above, state whether there is any evidence for Pam's belief. Justify your answer.

Pam decides to test her belief using a chi-squared test at the 5% significance level.

c) (i) State the null hypothesis for this test.

(ii) Show that the expected number of Mathematical Studies SL students who took the examination in Spanish is , correct to 3 significant figures.

d) Write down

(i) the calculated value of chi-squared;

(ii) the number of degrees of freedom;

(iii) the critical value of chi-squared.

e) State, giving a reason, whether there is sufficient evidence at the 5% significance level that Pam's belief is correct.

Show answer

Answer: a) (i) ; (ii) ; (iii) ; (iv) ; (v) ; b) : there is no evidence, from these data, of independence; c) (i) : the course is independent of the language of the examination; (ii) ; d) (i) ; (ii) ; (iii) ; e) do not reject (): the data do not contradict Pam's belief

Show working and answer

a) 1. In all cases the total is .

(i) .

(ii) .

(iii) .

(iv) "Not SL" and "not English": students of HL or Mathematical Studies SL, examined in Spanish or French: 30+20+30+40=120:

(v) Conditional on Spanish, the sample space is 110 students; 30 study Mathematical Studies SL:

b) 2. If the events were independent, would hold. 3. But . 4. Strictly speaking, these three values do not support independence (although the difference is small): there is no evidence in favour of Pam's belief from this single pair of events.

c) 5. (i) : the mathematics course the student studies is independent of the language in which they are examined.

  1. (ii) Expected number of Mathematical Studies SL students examined in Spanish:

d) 7. Using the GDC, test for independence with the observed matrix:

(i) (unrounded, ).

(ii) .

(iii) With degrees of freedom and a 5% significance level: .

e) 8. Since 7.67<9.49 (equivalently, p=0.104>0.05), we do not reject . 9. Conclusion: there is insufficient evidence, at the 5% level, to reject independence; the data are consistent with Pam's belief (they do not contradict it, although they do not prove it either).

Answer: a) (i) ; (ii) ; (iii) ; (iv) ; (v) ; b) : there is no evidence, from these data, of independence; c) (i) : the course is independent of the language of the examination; (ii) ; d) (i) ; (ii) ; (iii) ; e) do not reject (): the data do not contradict Pam's belief

Exercise 44 HardIB · P2 TZ0 November 2010

Section A

A survey of students was carried out, in which they were asked what they had for breakfast that morning. There were three options: cereal (), bread () and fruit (). The following results were obtained

10 students had all three options

17 students had only bread and fruit

15 students had only cereal and fruit

12 students had only cereal and bread

13 students had only bread

8 students had only cereal

9 students had only fruit

a) Represent this information on a Venn diagram.

b) Find the number of students who did not have any of the three options.

c) Write down the percentage of students who had fruit.

d) Describe in words what the students in the set had for breakfast.

e) Find the probability that a given student had at least two of the three options mentioned.

f) Two students are chosen at random. Find the probability that both students had all three options mentioned.

Section B

The same students are also asked how many meals, on average, they have per day. The data collected have been organised in the following table.

3 meals a day or fewer 4 or 5 meals a day More than 5 meals a day Total
Men 15 25 15 55
Women 12 20 13 45
Total 27 45 28 100

A test is carried out at the significance level.

a) Write down the null hypothesis, , for this test.

b) Write down the number of degrees of freedom for this test.

c) Write down the critical value for this test.

d) Verify that the expected number of women who have more than 5 meals a day is equal to (rounded to the nearest whole number).

e) Use your graphic display calculator to find, for these data, the value of .

f) Decide whether or not to accept . Justify your answer.

Show answer

Answer: Section A: a) Venn diagram; b) students; c) ; d) only cereal, or cereal and fruit but not bread; e) ; f) . Section B: a) : the number of meals is independent of gender; b) ; c) ; d) ; e) ; f) do not reject ()

Show working and answer

Section A

a) 1. Place the intersection regions first: all three sets at once (10), then the intersections of exactly two sets (12, 15 and 17). Then those with only one option (8, 13 and 9).

Venn diagram of three sets X, Y and Z: X only 8, Y only 13, Z only 9, X and Y but not Z 12, X and Z but not Y 15, Y and Z but not X 17, all three sets 10 and outside all of them 16

b) 2. Sum of the regions inside the circles: 10+17+15+12+13+8+9=84. 3. Students who had none of the three options: 100-84=16 students.

c) 4. Fruit (): 10+17+15+9=51 students out of 100, that is, 51%.

d) 5. is the set of students who had cereal but not bread: those who had only cereal (8) and those who had cereal and fruit but not bread (15).

e) 6. At least two options: 10+17+15+12=54:

f) 7. There are 10 students who had all three options; two different students are chosen (without replacement):

Section B

a) 8. H0: the number of meals per day is independent of gender.

b) 9. Table 2×3: d.f.=(2-1)(3-1)=2.

c) 10. With 2 degrees of freedom and a 5% significance level: critical value 5.99.

d) 11. Expected number of women with more than 5 meals:

e) 12. Using the GDC, test for independence with the observed 2×3 matrix: (unrounded, ).

f) 13. Since 0.0321<5.99, we do not reject H0: there is no evidence, at the 5% level, that the number of meals per day depends on gender.

Answer: Section A: a) Venn diagram; b) students; c) ; d) only cereal, or cereal and fruit but not bread; e) ; f) . Section B: a) : the number of meals is independent of gender; b) ; c) ; d) ; e) ; f) do not reject ()

Maths classes in Aldaia and online

Want to work on it together?

Free first consultation: we look at your level and your exam, and build a plan. Álvaro replies on WhatsApp.

Message us on WhatsApp