Home › IB Maths AI HL › Exam practice › Chi-Square Goodness of Fit, Independence and Error Types

IB Maths AI HL · Unit 4

Chi-Square Goodness of Fit, Independence and Error Types: AI HL exam practice with markscheme

Covers chi-square goodness of fit, independence and error types. Work through the 10 questions on paper as if it were the exam, then open each solution and mark your work against the markscheme.

10 questions · 43 marks · about 52 minutes · 7 Paper 1 style, 3 Paper 2 style

Download the PDF 6 pages, worked solutions after the questions

Question 1

2 marks · Paper 1 style · calculator allowed

A χ2 goodness of fit test is performed to see if data fits a Poisson distribution. The data is grouped into 5 categories: 0, 1, 2, 3, and ≥4 events. The parameter λ is estimated from the sample data. Calculate the exact number of degrees of freedom for this test.

[2]

Show solution

Use ν=k−1−m with k=5 categories and m=1 estimated parameter (λ): ν=5−1−1 M1
ν=3 A1

Answer: 3

Question 2

3 marks · Paper 1 style · calculator allowed

The mean of a normal population with standard deviation σ=5 is tested with a sample of size n=25: H0:μ=50 is rejected in favour of H1:μ<50 if x¯<48.355. Given that the true population mean is actually μ=48, calculate the probability of making a Type II error, correct to 3 significant figures.

[3]

Show solution

A Type II error is failing to reject H0 when it is false, so find P(X¯≥48.355) where X¯∼N(48,12) M1
Standardise: z=48.355−481=0.355 (A1)
P(Z≥0.355)=0.361 (3 s.f.) A1

Answer: 0.361

Question 3

4 marks · Paper 1 style · calculator allowed

A researcher conducts a Chi-Square test for independence to see if eye color (Blue, Green, Brown, Hazel) is independent of hair color (Blonde, Brown, Black, Red, Other).
Calculate the exact number of degrees of freedom (df) for this test.

[4]

Show solution

Formula for degrees of freedom in an r×c contingency table: df=(r−1)(c−1). [M1]
Eye color has 4 categories (rows r=4) and hair color has 5 categories (columns c=5). [A1]
Substitute: df=(4−1)(5−1). [M1]
df=3×4=12. [A1]

Answer: 12

Question 4

2 marks · Paper 1 style · calculator allowed

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

Define a type I error and state its probability. [2]

Show solution

rejecting H0 when it is true A1

0.05 A1

Answer: 0.05

Question 5

2 marks · Paper 1 style · calculator allowed

A medical test has H0: the patient is healthy.

Describe a type II error in context. [2]

Show solution

not rejecting H0 when it is false A1

concluding a sick patient is healthy A1

Answer: a proof: the worked solution above is the full answer

Question 6

5 marks · Paper 2 style · calculator allowed

A dice is rolled 120 times. The frequencies of 1 to 6 are 15, 22, 18, 25, 17, 23. Test at the 5% level whether the dice is fair.

Carry out the test. [5]

Show solution

H0: the dice is fair; H1: it is not A1

expected 20 each A1

χ2=3.8, p=0.579 A1A1

p>0.05: do not reject H0; no evidence the dice is unfair R1

Answer: χ2=3.8, p=0.579; do not reject H0

Question 7

5 marks · Paper 2 style · calculator allowed

The table shows preferred sport by gender for 200 students. Test at the 5% level whether preference is independent of gender.

FootballTennisSwimming
Male452530
Female303535

Carry out the test. [5]

Show solution

H0: independent A1

df=2 A1

χ2=5.05 A1

p=0.0800 A1

p>0.05: do not reject H0 R1

Answer: χ2=5.05, p=0.0800; do not reject H0

Question 8

5 marks · Paper 2 style · calculator allowed

A seed company claims its mix is 50% red, 30% white and 20% yellow. In a sample of 150 flowers there are 64 red, 52 white and 34 yellow.

Test the claim at the 5% level. [5]

Show solution

expected 75, 45, 30 A1

df=2 A1

χ2=3.24 A1

p=0.198 A1

do not reject the claim R1

Answer: χ2=3.24, p=0.198; do not reject

Question 9

7 marks · Paper 1 style · calculator allowed

The diagram shows the distributions for a 1-tailed hypothesis test. H0:μ=50, against H1:μ=55. The population standard deviation is σ=10, and sample size n=25. The decision rule is to reject H0 if the sample mean x¯>53.29.
Calculate the exact probability of making a Type II error (β).

Sampling distributions of the sample mean under H0 and H1

[7]

Show solution

A Type II error (β) is the probability of failing to reject H0 when H1 is true. [M1]
The decision rule is to accept H0 if x¯≤53.29. [M1]
We must calculate P(x¯≤53.29) using the H1 distribution (μ=55). [M1]
Since we are dealing with a sample mean x¯, the standard deviation of the sampling distribution is σn. [R1]
Standard error =1025=105=2. [M1][A1]
Use GDC Normal CDF: Lower = −1×1099, Upper = 53.29, μ=55, σ=2.
β=P(x¯≤53.29)=0.196 (to 3 s.f.). [A1]

Answer: 0.196

Question 10

8 marks · Paper 1 style · calculator allowed

A researcher claims that the heights of plants in a greenhouse follow a Normal distribution with μ=120 cm and σ=15 cm. He categorizes 200 plants into three intervals: - Group 1: <105 cm - Group 2: 105 cm to 135 cm - Group 3: >135 cm
Calculate the expected frequency (fe) for each of the three groups, correct to 1 decimal place.

[8]

Show solution

We use the Normal distribution N(120,152) to find the theoretical probability of falling into each group. [M1]
Group 1 (<105): Normal CDF (Lower=-9E99, Upper=105, μ=120,σ=15) =0.15865... [M1][A1]
Group 2 (105−135): Normal CDF (Lower=105, Upper=135) =0.68268... [M1][A1]
Group 3 (>135): Normal CDF (Lower=135, Upper=9E99) =0.15865... [A1]
To find expected frequencies, multiply probabilities by total plants (n=200). [M1]
fe(Group 1)=0.15865×200=31.7.
fe(Group 2)=0.68268×200=136.5.
fe(Group 3)=0.15865×200=31.7. [A1]

Answer: (Group 1) 31.7; (Group 2) 136.5; (Group 3) 31.7

How the marks work: M marks are for a correct method, A marks for an accurate answer that follows it, R marks for a reason, and AG means the answer is given in the question. A mark in brackets, like (M1), can be implied by later correct work.

Notes, worked examples and more questions on this topic: AI HL Chi-Square Goodness of Fit, Independence and Error Types. Previous topic: Bivariate Data. Next topic: Confidence Intervals and Hypothesis Testing for Means. Every AI HL topic.

Revise first with the AI HL revision notes, then finish on real papers: IB Maths AI HL past papers.