I.B. Mathematics HL Option: Hypothesis Testing z and t

advertisement
I.B. Mathematics HL Option: Hypothesis Testing z and t-Tests
Index:
Please click on the question number you want
Question 1
Question 2
Question 3
Question 4
You can access the solutions from the end of each question
Question 1
A machine packs sugar into 1 kg bags. A random sample of the 8 filled bags
was taken and the masses of the bags measured to the nearest gram. There
masses in grams were
1001, 998, 999, 1002, 1001, 1003, 1002, 1002
It is suspected that the machine overfills the bags. Perform a test at the 1%
level, to determine whether the machine needs maintenance. It is known that
the masses of the bags of sugar are normally distributed with a variance
2.25 g.
Click here to read the solution to this question
Click here to return to the index
Solution to question 1
Let X be the r.v. the mass of a bag of sugar filled by the machine.
(
)
Then X ∼ N µ, σ 2 ∼ N (1000, 2.25 )
x=
∑ x = 8008 = 1001g . Note: We do
n
8
not need to calculate the standard
deviation, as we are given this in the
question, therefore we perform a z-test.
H0 : µ = 1000 g The mean mass of a bag of sugar is 1000 and the machine
does not overfill the bags.
H0 : µ > 1000 g The mean mass of a bag of sugar is more than 1000 g and the
machine overfills the bags.
 σ2 
2.25 

Under H0 X ~ N  µ,
 ∼ N  1000,

n 
8 


To calculate the critical z-value you can use the tables or the graphics
calculator. In the STAT menu press F5 DIST followed by F1 NORM and then
F3 InvN.
Enter Area 0.99 ó 1 and µ = 0 . Press F1 and the calculator returns the critical
value of 2.326.
Click here to continue with solution or go to next page
We will perform a one-tailed test at the 1% level and we will reject H0 if
ztest > 2.326 .
s.d. =
z=
x − µ 1001 − 1000
=
= 1.886
σ
1.5
n
σ
n
8
1000
0
Reject H0
2.326
Now as ztest < 2.326 , we do not reject H0 and conclude that there is
significant evidence at the 1% that the machine does not overfill the bags.
Using a graphics calculator we can perform the test. In the STAT menu, using
the same list press F3 TEST followed by F1 Z and then F1 1-S.
Enter in µ > µ0 (one-tailed test), µ0 = 1000 ó = 2.25 = 1.5 , List as List 1 and
Freq as 1. Press F1 and the calculator returns z = 1.886 and a p-value as
2.96% and again we not reject H0 . Returning
to the previous screen and pressing F6
DRAW, we obtain the corresponding graph.
Click here to read the question again
Click here to return to the index
Question 2
A machine is used to fill bottled water. The bottles are to be filled to a volume
of 500 ml. Ten, random measurements of the volume of water give a mean of
499 ml with a standard deviation of 1.2 ml. Assuming that the volumes of
water are normally distributed, test at the 1% level, whether there is a
significant difference from the expected value.
Click here to read the solution to this question
Click here to return to the index
Solution to question 2
Let X be the r.v.’ the volume of water in ml each bottle of water filled by the
machine. Then X ~ N µ, σ 2 .
(
)
H0 : µ = 500ml The expected mean is 500 ml.
H0 : µ ≠ 500ml The expected mean is not 500 ml.
As we only have the sample standard deviation we will perform a two-tailed ttest at the 1% level where T ∼ t ( n − 1) ∼ t (9 ) . There are 9 degrees of freedom.
We will reject H0 if t test > 3.250 , where
t test =
x −µ
x −µ
or t test =
if you used the unbiased estimate of the
sn
sn −1
n −1
n
population standard deviation where
n 2
sn2−1 =
s
n −1
t test =
t(9)
x −µ
499 − 500
=
= −2.5
sn
1.2
n −1
10 − 1
Reject H0
-3.250
0
Reject H0
3.250
As t test < 3.250 , we do not reject H0 and that there is not significance
evidence at the 1% level that the machine is different from the expected value.
Using the graphics calculator, enter the RUN menu and calculate the
n
10
unbiased estimate of the standard deviation sn −1 =
sn =
1.2 . Enter
n −1
9
this value into memory A (Ans → ALPHA A).
Click here to continue with solution or go to next page
Enter the STAT menu, press F3 TEST followed by F2 t (see the diagrams
above), then F1 1-S. Set Data to Variable µ ≠ µ0 (one tailed test), µ0 = 500 ,
x = 499 , xón-1 = ALPHA A (the actual value will appear when you press EXE)
and n = 10 . You will need to press EXE after each item.
Pressing F1 will calculate the value of t and the corresponding p-value, which
you will have to divide by 2 to decide whether to reject of accept H0 . We have
to consider 1.6% so we do not reject.
Returning to the previous screen and pressing F6 DRAW, we obtain the
corresponding graph.
Click here to read the question again
Click here to return to the index
Question 3
A school wants to introduce a new teaching method for the IB diploma course.
It is claimed that this teaching method will give better scores in the final IB
examinations. In order to test this hypothesis the school splits its diploma
students into two different groups. The final IB diploma scores of a random
sample of both groups are given below.
Sample A: The diploma scores of a random sample of 7 students who were
taught by using the original teaching method were
24, 23, 22, 30, 32, 36, 24.
Sample B: The diploma scores of a random sample of 9 students who were
taught by using the new teaching method were
36, 32, 40, 27, 40, 32, 27, 28, 29.
Test at the 5% level whether the new teaching method has resulted in an
improvement in the scores assuming that they are normally distributed.
Find the 95% confidence interval for the difference of the two means and
decide if there is a difference between the population means
Click here to read the solution to this question
Click here to return to the index
Solution to question 3
Performing an independent sample t-test. Let the population mean of sample
A be µm and of sample B be µn .
H0 : µ n = µ m
There is no improvement in the mean scores.
H1 : µ n > µ m
The new teaching method does give an improvement in the
mean scores.
Entering the two lists in the STAT menu in the graphics calculator. Enter in the
two samples A and B into List 1 and List 2 respectively. Press F2 CALC
followed by F6 SET and set 1 Var XList to List 1 and 1 Var Freq to 1. Press
EXIT followed by F1 1VAR. Write down the sample mean and standard
deviation. The unbiased estimate is written down in green.
Now press EXIT followed by F6 SET and set 1 Var XList to List 2 and 1 Var
Freq to 1. Press EXIT followed by F1 1VAR. Write down the sample mean
and standard deviation. The unbiased estimate is written down in green.
xm =
sm =
xn =
∑x
m
=
m
∑x
2
m
m
∑x
n
n
∑x
=
2
n
191
= 27.2857142
7
2
5385  191 
− xm =
−
 = 4.97750039
7
 7 
(Sm −1 = 5.3763149 )
291
= 32.3
9
2
9627  291 
−
 = 4.92160768 (Sn −1 = 5.22015325 )
n
9
 9 
We will use a pooled variance.
Click here to continue with solution or go to next page
sn =
− xn =
ns 2 + msm2 9 ( 4.92160768 ) + 7 ( 4.97750039 )
= n
=
= 27.95918359
n+m−2
9+7−2
2
sn + m − 2
We will perform a one-tailed t-test at the 5% level of significance. We consider
the T ∼ t ( n + m − 2 ) ∼ t (14 ) distribution and will reject H0 if ttest > 1.761 .
t=
=
xn − xm − ( µ n − µ m )
T ∼ t (14 )
1 1
+
sn + m − 2
n m
32.3 − 27.285…
 1 1
27.959…  + 
9 7
= 1.8942
0
Reject H0
1.761
As ttest > 1.761 we reject H0 and conclude that there is significant evidence at
the 5% level that the new teaching methods improve IB diploma scores.
Using the graphics calculator we can also do the test. In the STAT menu
keeping the same lists, press F3 TEST, followed by F2 t and then F2 2-S.
Set Data to List, µ1 > µ2 , List 1 to List 2 and List 2 to List 1, as we are testing
whether Sample B is an improvement on Sample A. Set Freq 1 and 2 to 1 and
Pooled to on. Press F1 CALC, to obtain the value of t and notice the p-value
gives 3.9% for the one-tailed test. Scrolling down we can obtain the unbiased
estimates for the standard deviation and the pooled value. If we were to press
F6 DRAW, in the previous screen we can obtain the graph.
Click here to continue with solution or go to next page
For a 95% confidence interval we consider the difference of two population
means with 14 degrees of freedom.
T ∼ t (14 )
xn − xm ± tsn + m − 2
1 1
+
n m
 1 1
32.3 − 27.285… ± 2.145 27.954…  + 
9 7
( −0.668, 10.762) .
Reject H0
-2.145
0
Reject H0
2.145
Since zero (i.e. no difference) falls into the acceptance region we do not reject
H0 and there is no improvement in the mean scores.
A graphics calculator again can do this. In the STAT menu with the same lists,
press F4 INTR followed by F2 t and then F2 2-S. Set Data to List
C-level to 0.95 List 1 to List 2 and List 2 to List 1, as we are testing whether
Sample B is an improvement on Sample A. Also set both frequencies to 1
and Pooled to on. Press F1 and the calculator will return the required
confidence interval ( −0.668, 10.762 ) .
Scrolling down we can obtain further
information such as the unbiased estimates
for the standard deviation as well as the
pooled values.
Click here to read the question again
Click here to return to the index
Question 4
A group of 10 students were given a revision course before their final I.B.
examination. To see if there is going to be an improvement the students took
a test at the beginning and at the end of the course. These marks were
recorded in the table below.
Student
Pre- test
Post test
A
12
11
B
13
14
C
11
16
D
14
13
E
10
12
F
16
18
G
14
15
H
13
14
I
13
15
J
12
11
a.
State why it would not be appropriate to work with the difference
between the means of these two sets of scores. Hence determine a
90% confidence interval for the mean difference of the examination
scores. Explain the meaning of your answer.
b.
It was hoped that by doing the revision course that the students score
would improve. Perform an appropriate test at the 5% level of
significance to determine whether this is the case.
Click here to read the solution to this question
Click here to return to the index
Solution to question 4
a.
Since the observations are not independent, i.e. the same group of
students the difference of means is not an appropriate model.
Using a graphics calculator we can complete the table. Enter the STAT
menu and put the pre-test marks into List 1 and the post-test marks into
List 2. Then enter the RUN menu and press F1 LIST followed by
List 2 –List 1 EXE.
Press AC and then put List Ans into List 3. Go back to the STAT menu
Press F1 CALC and then F6 SET. Set 1 Var XList to List 3 and 1Var
Freq to 1. Press EXIT followed by F1 1VAR.
The completed table can be seen on the next page
From this we have
d=
∑ d = 11 = 1.1
n
10
and Sdn =
∑d
n
2
−d2 =
43
2
− (1.1) = 1.75783958
10
For those who prefer to use the unbiased estimate for the standard
deviation we have
Sdn −1 =
n
10
Sdn =
1.757… = 1.85292561
n −1
9
Click here to continue with solution or go to next page
Continued with question 8
The completed table is shown below.
Student
Pre-test
Post-test
A
B
C
D
E
F
G
H
I
J
12
13
11
14
10
16
14
13
13
12
11
14
16
13
12
18
15
14
15
11
Difference in
scores (d)
-1
1
5
-1
2
2
1
1
2
-1
∑ d = 11
Now for a 90% confidence interval look at
t (n − 1) ∼ t (9 ) . (9 degrees of freedom).
T ∼ t (9 )
90%
Using d ± t
sdn
we have
n −1
 1.757… 
11 ± 1.833 
 = (0.0259, 2.17 )
 10 − 1 
5%
5%
-1.833
0
1.833
The same answer can be obtained very easily by using the graphics
calculator. In the STAT menu press F4 INTR followed by F2 t , then F1
1-S. Enter List for data, set the C-level to 0.9 (90%), List to List 3 and
Freq to 1. Press F1 CALC to obtain the same answer.
A 90% confidence interval means that there is a probability of 0.1 that
the µd will not be in that interval.
Click here to continue with solution or go to next page
b.
Using a paired t-test
H0 : µd = 0 There was no improvement after the revision course.
H1 : µd > 0 There was an improvement after the revision course.
We will perform a one-tailed t-test at the 5% level, with 9 degrees of
freedom. Considering T ∼ t (9 ) and we
will reject H0 if t test > 1.833 where
t=
T ∼ t (9 )
d − µd
1.1 − 0
=
= 1.877
sdn
1.757…
9
n −1
0
Reject H0
1.833
As t test > 1.833 we reject H0 and say that there is significant evidence at
the 5% level that there was an improvement in the students’
Mathematics after the revision course.
The test can be done as well by the graphics calculator. In the STAT
menu, press F3 TEST followed by F2 t then F1 1-S. Enter in Data List,
µ > µ0 (one-tailed test), µ0 = 0 (no difference), List as List 3and Freq to
1. Press F1 to perform test or F6 DRAW, to draw the graph. Note the pvalue is 0.0466, which means that t test is in the rejection area, hence
reject H0 .
Click here to read the question again
Click here to return to the index
Download