0% found this document useful (0 votes)
9 views

Hypothesis Testing Lect Notes (TR S)

Hypothesis_Testing_Lect_Notes_(Tr_s)

Uploaded by

F Hong
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Hypothesis Testing Lect Notes (TR S)

Hypothesis_Testing_Lect_Notes_(Tr_s)

Uploaded by

F Hong
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

National Junior College Mathematics Department 2016 (Teacher’s Version)

National Junior College


2015 – 2016 H2 Mathematics
Hypothesis Testing (Lecture Notes)

Topic 21: Hypothesis Testing

Key Questions to Answer:

What is meant by a hypothesis test? Pertaining to a hypothesis test,


what do each of the following terms mean?
null hypothesis (H0) and alternative hypothesis (H1);
1-tailed and 2-tailed tests;
level of significance;
critical region and critical value;
test statistic;
p-value.

How do we decide if there is sufficient evidence to reject the null


hypothesis?
How do we calculate the
p-value,
value of the test statistic
in order to answer the above question?

How do we formulate and apply hypothesis tests for a population mean


based on:
a sample from a normal population with known variance,
a large sample drawn from a normal population with unknown variance,
a large sample from any population (with an unknown distribution or
non-normal distribution),
a small sample drawn from a normal population of unknown variance?

How do we carry out 1–tailed and 2–tailed hypothesis tests?


What is the difference between the two tests?

How do we interpret the results of a hypothesis test in the context of the


problem?

Given the conclusion of a hypothesis test (H0 rejected or H0 not


rejected), how do we calculate the range of values of a
parameter/statistic (such as the sample mean, x ) whose value is
unknown?

2015 – 2016 / H2 Maths / Hypothesis Testing Page 1 of 28


National Junior College Mathematics Department 2016 (Teacher’s Version)

§1 Introduction to Hypothesis Testing

A statistical hypothesis is a claim or assumption either about the value of a


single population parameter (e.g. population mean, population proportion),
about the values of several parameters (e.g. difference between two population
means or proportions), or about the form of an entire probability distribution
(e.g. the assertion that the height of all JC1 students are normally distributed).
We shall concentrate on hypotheses involving a single population parameter –
the population mean.

Suppose a college claims that students will score an average of 72 marks for
Mathematics in the Preliminary Examination based on historical data. The
parameter of interest is the mean mark, μ, obtained by students which is
claimed to be 72, i.e. we claim that μ = 72.

A Mathematics teacher who has a class of 25 students suspects that this figure
is too high, and instead claims that < 72. In fact, based on the results of a
recent test, he believes that a better estimate would be = 60. How do we then
decide between the validity of the college’s claim and the teacher’s claim? We
can answer this question using the statistical procedure called hypothesis
testing.

In hypothesis testing, there are two contradictory claims under consideration.


We begin with an assumption (called the null hypothesis, H0) which is the
claim that is initially believed to be true. There will also be an alternative
claim (called the alternative hypothesis, H1) which is contradictory to the null
hypothesis.

In the example of the marks for Mathematics in the Preliminary Examination,


the following will be the null and alternative hypotheses:

Null Hypothesis, H0: μ = 72


Alternative Hypothesis, H1: < 72

We then use the sample data and our knowledge of statistical theory to decide
whether the sample data supports the alternative hypothesis. If the sample
data supports the alternative hypothesis, then we conclude that there is
evidence to say that the alternative hypothesis is a more reasonable claim than
the null hypothesis. Hence, we will reject the null hypothesis in favour of the
alternative hypothesis. On the other hand, if the sample data does not support
the alternative hypothesis, we will have no evidence to say that the null
hypothesis is false. Hence, we will not reject the null hypothesis, and continue
to believe in the truth of it.

Let’s clarify and seek


understanding.
Does ‘not rejecting’ the null hypothesis mean the
same as ‘accepting’ the null hypothesis?

2015 – 2016 / H2 Maths / Hypothesis Testing Page 2 of 28


National Junior College Mathematics Department 2016 (Teacher’s Version)

§2 Terms and Definitions

1. Statistical Hypothesis
It is an assumption about the value of a population parameter.

2. Hypothesis Testing
It is the process of testing the validity of the statistical hypothesis based
on observations made from random samples taken from the population.

3. Null Hypothesis, H0
This is a statement about a parameter of the population which is
initially, or conventionally believed to be true. It could be
(i) a value that occurred in the past,
(ii) a value claimed by some person, or
(iii) a (target) value that is supposed to occur.

H0 is generally identified with the hypothesis of no change, no


difference or no improvement (from current opinions). Generally, it is
the hypothesis that the researcher is hoping to reject in favour of a
proposed alternative.

In our treatment of hypothesis testing, H0 will always be stated as an


equality claim.

H0: the parameter tested = a fixed value

4. Alternative Hypothesis, H1
This is a statement about the parameter of the population mentioned in
the null hypothesis being different from what is initially, or
conventionally believed to be true. The proposition of an alternative
hypothesis is typically due to a researcher having found evidence from
sample data, or having fresh insights about the situation, that seems to
suggest the null hypothesis may not hold anymore.

Often, it is this hypothesis that the researcher hopes to prove is true, in


favour of the null hypothesis.

The formulation of the alternative hypothesis depends on what we are


testing against in a particular question.

H1: the parameter tested is:


< the fixed value (definite decrease, less than, over-estimate)
> the fixed value (definite increase, more than, underestimate)
the fixed value (change, different, affected)

2015 – 2016 / H2 Maths / Hypothesis Testing Page 3 of 28


National Junior College Mathematics Department 2016 (Teacher’s Version)

Example 2.1

In the following examples, formulate the null and alternative hypotheses.

(i) A random sample of JC students were each given an IQ test to decide


whether JC students have a mean IQ of 100 or whether their mean IQ is
above 100.

(ii) Suppose that, according to national standards, 5 year old children of


height 87.5 – 92.5cm have a mean weight of 13 kg. The weights of a
random sample of 5 year old children of height 87.5 – 92.5cm are
collected. Are 5 year old children of height 87.5 – 92.5cm below
average weight for their height?

(iii) A machine produces components of mean length 10cm if it is correctly


set up. A random sample of components produced is taken and the
length of each component is measured. Is the machine correctly set up?

(iv) The principal of a school claims that the mean ‘A’ level points of all its
students is at least 80. Has the principal overstated the mean?

Solution

(i) H0: 100 against H1: 100

(ii) H0: 13 against H1: 13

(iii) H0: 10 against H1: 10

(iv) H0: 80 against H1: 80

5. Test Statistic
A sample statistic which is used to make the decision whether or not
to reject H0 is called the test statistic. We select a random sample from
the given population and observe its relevant test statistic with respect
to the parameter of interest.

Example 2.2

Given a population which is normally distributed,

suppose we want to test H0: 0

against H1: 0 , where 0 is a given value.

Since the sample mean X is an unbiased estimator of the population mean, we


can consider using the sample mean to help us.

2015 – 2016 / H2 Maths / Hypothesis Testing Page 4 of 28


National Junior College Mathematics Department 2016 (Teacher’s Version)

2
If H0 is true, then X ~ N 0, .
n
X
So Z 0
~ N(0,1) . (after standardization)
/ n
x
Test Statistic: z 0

/ n
Note: A test that involves calculating and comparing the values of z is called a
z-test.
In hypothesis testing, the null hypothesis may be rejected (or not rejected) not
with certainty but with confidence that the likelihood of error in making the
decision is small. We control the chance of wrongly rejecting the null
hypothesis, that is, reject null hypothesis when it is actually true. This is
known as the significance level of the test.

6. Level of Significance,

The level of significance is the probability of rejecting H0 given that H0


is true. i.e. P(rejecting H0 | H0 is true) = .
That is, the significance level refers to how much error we allow to
wrongly reject H0.

For example, if the level of significance is set at 5%, we are saying that
there is a 5% chance (or probability of 0.05) that one chooses to reject
H0 when H0 is actually correct.
This value is typically set low so that the chance of wrongly rejecting
H0 is kept low. Typical significance levels used are 10%, 5% and 1%.

7. The Critical Region or Rejection Region

The level of significance determines the set of values of the test statistic
for which H0 will be rejected. This set of values of the test statistic is
called the critical region or the rejection region. The boundaries of
the critical region are called the critical values. If the observed or
calculated value of the test statistic falls within the critical region, we
reject H0, and if it falls outside the critical region, we do not reject H0.

8. The p-value

The p-value (observed significance level) is the smallest level of


significance level such that the observed value of the test statistics falls
in the rejection region.

More simply, we can understand p-value as


P Z z for lower-tailed test
p value P Z z for upper-tailed test
P Z z for two-tailed test

2015 – 2016 / H2 Maths / Hypothesis Testing Page 5 of 28


National Junior College Mathematics Department 2016 (Teacher’s Version)

Instead of comparing the observed or calculated value of the test


statistic with the critical values to determine whether or not to reject H0,
we can also consider the p-value and compare it with the level of
significance. This has been made easier with the use of the graphing
calculator.

We will reject H0 if the p-value is less than the level of significance.

§3 Types of Tests

There are two types of test, depending on how the alternative hypothesis, H1, is
formulated.

3.1 Two-Tailed Test

This test looks for any difference or change in the parameter tested.

Suppose we have a sample of size n with sample mean x , taken from a normal
population with variance 2 and it is claimed that the population mean is 100.

Step 1: Test H0: = 100


against H1: 100

Step 2: Level of significance: 5% (two-tailed)


[This means α = 0.05.]
X 100
Step 3: Since population is normal, under H0, Z ~ N(0,1) .
/ n
x 100
Test statistic: z
/ n
EITHER
Step 4(a): Method 1: Using critical region and observed test statistic, z

With 5% level of significance for a two-tailed test, it means that


each tail of the curve will have a region of 2.5%. The critical
values of z, zcritical z0.025 ( 1.96) or z0.975 ( 1.96) . The
critical region is z 1.96 or z 1.96 , i.e. z 1.96 .
x 100
The observed test statistic is z ; where x is calculated
/ n
from the sample of size n.

We will reject H0 if our observed test statistic, z , falls within


the critical region, i.e. we reject H0 if z zcritical

Note: P Z 1.96 0.05 and P Z 1.96 0.975

2015 – 2016 / H2 Maths / Hypothesis Testing Page 6 of 28


National Junior College Mathematics Department 2016 (Teacher’s Version)

0.05
If z falls within this
critical (shaded) region, we
reject H0.

1.96 0 1.96
z 1.96 z 1.96

OR
Step 4(b): Method 2: Using p-value
Using GC, we calculate the p-value
x 100
=P Z z P Z .
/ n
We will reject H0 if our p-value < 0.05.

Critical Region, 0.05 probability

x 100
p-value = P Z z P Z
/ n

1.96 0 1.96
z z

Step 5: Here, we establish an appropriate conclusion.

If z zcritical (or p-value < 0.05), then we reject H0, and


conclude that there is sufficient evidence at 5% level of
significance to claim that the population mean is not equal to
100.

If z zcritical (or p-value > 0.05), then we do not reject H0, and
conclude that there is insufficient evidence at 5% level of
significance to claim that the population mean is not equal to
100.

Note:
In general, for a two-tailed test, the critical region at 100% level of
significance is z z or z z . We will reject H0 if our test statistic z
2 2

falls within the critical region, i.e. z z or if p-value < .


2

2015 – 2016 / H2 Maths / Hypothesis Testing Page 7 of 28


National Junior College Mathematics Department 2016 (Teacher’s Version)

3.2 One–Tailed Test

A one–tailed test looks for a definite increase or definite decrease in the


parameter.

(A) Definite Increase (Upper-tailed)

Suppose we have a sample of size n with sample mean x , taken from a normal
population with variance 2 and it is claimed that the population mean is
greater than 50.

Step 1: Test H0: = 50


against H1: > 50

Step 2: Level of significance: 5% (upper-tailed)

X 50
Step 3: Since population is normal, under H0, Z ~ N(0,1) .
/ n
x 50
Test statistic: z .
/ n

EITHER

Step 4(a): Method 1: Using critical region and observed test statistic, z

At 5% level of significance for a upper-tailed test, the critical


value is zcritical z0.95 1.645 . The critical region is z 1.645 .
x 50
The observed test statistic is z ; where x is calculated
/ n
from the sample of size n.

We will reject H0 if our observed test statistic z falls within the


critical region, i.e. we reject H0 if z zcritical .

0.05
If z falls within this
critical (shaded) region, we
reject H0.

0 1.645
z 1.645

2015 – 2016 / H2 Maths / Hypothesis Testing Page 8 of 28


National Junior College Mathematics Department 2016 (Teacher’s Version)

OR
Step 4(b): Method 2: Using p-value
Using GC, we calculate the p-value
x 50
=P Z z P Z .
/ n
We reject H0 if the p-value < 0.05.
Critical Region, 0.05 probability

x 50
p-value = P Z z P Z
/ n

0 1.645
z

Step 5: Here, we establish an appropriate conclusion.

If z zcritical (or p-value < 0.05), then we reject H0, and conclude
that there is sufficient evidence at 5% level of significance to
claim that the population mean is greater than 50.

If z zcritical (or p-value > 0.05), then we do not reject H0, and
conclude that there is insufficient evidence at 5% level of
significance to claim that the population mean is greater than
50.

Note:
In general, for an upper-tailed test, the critical region at 100% level of
significance is z z(1 ) . We will reject H0 if our observed test statistic z
falls within the critical region, i.e. z z(1 ) or if p-value < .

(B) Definite Decrease (Lower-tailed)

Suppose we have a sample of size n with sample mean x , taken from a normal
population with variance 2 and it is claimed that the population mean is less
than 15.

Step 1: Test H0: = 15


against H1: < 15
Step 2: Level of significance: 5% (lower-tailed)
X 15
Step 3: Since population is normal, under H0, Z ~ N(0,1) .
/ n
x 15
Test statistic: z .
/ n

2015 – 2016 / H2 Maths / Hypothesis Testing Page 9 of 28


National Junior College Mathematics Department 2016 (Teacher’s Version)

EITHER
Step 4(a) Method 1: Using critical region and observed test statistic, z

At 5% level of significance for a lower-tailed test, the critical


value is zcritical z0.05 1.645 . The critical region is
z 1.645 .
x 15
The test statistic is z ; where x is calculated from the
/ n
sample of size n.

We will reject H0 if our observed test statistic z falls within the


critical region, i.e. we reject H0 if z zcritical .

0.05
If z falls within this
critical (shaded) region,
we reject H0.

1.645 0
z 1.645

OR
Step 4(b): Method 2: Using p-value
Using GC, we calculate the p-value
x 15
=P Z z P Z .
/ n
We reject H0 if the p-value < 0.05.

Critical Region, 0.05 probability

x 15
p-value = P Z z P Z
/ n

1.645 0
z

Step 5: Here, we establish an appropriate conclusion.

If z zcritical (or p-value < 0.05), then we reject H0, and conclude
that there is sufficient evidence at 5% level of significance to
claim that the population mean is less than 15.

If z zcritical (or p-value > 0.05), then we do not reject H0, and
conclude that there is insufficient evidence at 5% level of
significance to claim that the population mean is less than 15.

2015 – 2016 / H2 Maths / Hypothesis Testing Page 10 of 28


National Junior College Mathematics Department 2016 (Teacher’s Version)

Note:
In general, for a lower-tailed test, the critical region at 100% level of
significance is z z . We will reject H0 if our test statistic z falls within the
critical region, (i.e. z z ) or if p-value < .

Example 3.1
Experience has shown that the scores obtained in a particular test are normally
distributed with mean score 70 and variance 36. When the test is taken by a
random sample of 36 students, the mean score is 68.5. Is there sufficient
evidence, at 3% level of significance, that these students have not performed as
well as expected?

Solution
Let X be the random variable for the score of the particular test and be its
population mean.
From the sample data, n 36 and x 68.5.

H0: μ = 70
H1: μ < 70

Level of significance: 3% (lower-tailed)

X 70
Since population is normal, under Ho, Z ~ N(0,1)
36
36
x 70
Test Statistic: , z .
/ n

Method 1: Using critical region and observed test statistic, z

At 3% level of significance, critical region is z < 1.881


68.5 70
The observed test statistic is z 1.5 .
6 / 36

0.03

1.881 0
1.5
Since z 1.5 1.881 lies outside the critical region, we do not reject H0.

2015 – 2016 / H2 Maths / Hypothesis Testing Page 11 of 28


National Junior College Mathematics Department 2016 (Teacher’s Version)

Method 2: Using p-value


Using GC, we calculate the p-value = 0.0668.
Since p-value = 0.0668 > 0.03, we do not reject H0.

We conclude that there is insufficient evidence at 3% level of significance to


claim that these students have not performed as well as expected.

Performing the z-test with the Graphing Calculator (Using Example 3)


(when summarised data is given)

Step 1:
“STAT” “TESTS” (on the top menu) Choose the
appropriate test “1 : Z-Test”

Step 2:
Select Input “Data” or “Stats”. If “Data” is selected, then
enter the list in which the data is found. If “Stats” is
selected, then enter the statistics like , x and n.

In this problem, we select “Stats”.

Enter the null hypothesis value at “ 0:”. Choose the


alternative hypothesis.

Go to “Calculate” and press enter.

The next screen will show you the results of the z-test.
The z-value shown is the test statistic, z. The p-value is
also shown.

2015 – 2016 / H2 Maths / Hypothesis Testing Page 12 of 28


National Junior College Mathematics Department 2016 (Teacher’s Version)

§4 Testing Population Mean, µ

In our syllabus, we shall focus on tests involving the population mean only.
In this section, we shall discuss the various situations you will encounter in
problems involving testing of population means.
2
4.1 Population Variance, is Known

Case 1: Population distribution of X is normal.

Case 2: Population distribution is NOT normal but sample size n is


large (n 30), then use Central Limit Theorem to
approximate the distribution of X .

Case 3: Population distribution is NOT normal and sample size n is


small (n < 30). We assume population distribution of X is
normal.

X
In all cases, under H0, Z 0
~ N(0,1) .
/ n

x 0
Test Statistic: z
/ n

We will carry out a z-test.


2
4.2 Population Variance, is Unknown

When 2 is unknown, we find the unbiased estimate of the population


variance, s2.
2
2 n 2 1 2 1 2
x
s x xi x x
n 1 n 1 n 1 n

Case 1: Sample size n is small (n < 30)


a) Population distribution of X is normal.
b) Population distribution of X is NOT given to be normal.
We have to assume population distribution of X is normal in
this case.

X 0
Under H0, T ~ t v , where v = n – 1 (degrees of freedom),
S n

x 0
Test Statistic: t
s n

We will carry out a t-test .

2015 – 2016 / H2 Maths / Hypothesis Testing Page 13 of 28


National Junior College Mathematics Department 2016 (Teacher’s Version)

The t-distribution is very much similar to the normal distribution. The


overall shape of the probability density function of the t-distribution resembles
the bell-shape of the standard normal distribution with mean 0 and variance 1,
except that it is a bit lower and wider. As the number of degrees of freedom
grows, the t-distribution approaches the standard normal distribution. i.e. as
v ,T Z.

Z ~ N 0 ,1
t distribution
t distribution
v 2
v 9

In performing the t-test, we go about effectively the same way as for the Z-test.

Two-Tailed t-test

If t falls within this


critical (shaded) region, we
reject H0.

t 0 t
2 2

Critical Region

p-value
x 0
= P T t P T
s/ n
t 0 t
2 2
t t

We reject H0 if test statistic, t falls within the critical region ie.


t tcritical t or if p-value < α.
2

2015 – 2016 / H2 Maths / Hypothesis Testing Page 14 of 28


National Junior College Mathematics Department 2016 (Teacher’s Version)

One-Tailed t-test

(A) Upper-Tailed

If t falls within this


critical (shaded) region, we
reject H0.

0 t(1 )

Critical Region

p-value
x 0
= P T t P T
s/ n
0 t(1 )

We reject H0 if test statistic, t falls within the critical region ie.


t tcritical t(1 ) or if p-value < α.

(B) Lower-Tailed

If t falls within this


critical (shaded) region, we
reject H0.

t 0

Critical Region

p-value
x 0
= P T t P T
s/ n
t 0
t

We reject H0 if test statistic, t falls within the critical region ie. t tcritical t
or if p-value < α.

2015 – 2016 / H2 Maths / Hypothesis Testing Page 15 of 28


National Junior College Mathematics Department 2016 (Teacher’s Version)

Note: We will treat the term “degree of freedom” merely as a parameter of the
t-distribution. An in-depth understanding of the meaning of the term is
beyond the scope of the syllabus.

Case 2: Sample size n is large (n 30).


a) Population distribution of X is normal.
b) Population distribution of X is NOT normal. By Central
Limit Theorem, distribution of X is normal
approximately.

X
Under H0, Z 0
~ N(0,1) approximately.
S/ n
x 0
Test statistic: z
s/ n

We will carry out a z-test.

Note: In both cases, we use the unbiased estimate of the population variance
s2, in place of the true population variance 2 , which is an unknown.

Example 4.1

‘Family’ packs of bacon slices are sold in 1.5 kg packs. A sample of 50 packs
was selected at random and the masses x, measured in kg, are noted. The
following results were obtained :
2
x 0.2 64.2 and x 0.2 85 .
Assuming that the masses of the packs follow a normal distribution with
variance σ2, test at 1% level whether the packs are significantly underweight if

2 2
(a) 0.002 , (b) is unknown.

Solution

From the sample data, n 50.


Let y x 0.2 y x 0.2 x y 0.2 1.484

2
(a) 0.002

H0: = 1.5
H1: < 1.5
Level of significance: 1% (lower-tailed)
X 1.5
Since population is normal, under H0, Z ~ N(0,1) .
/ n
x 1.5
Test statistic: z
/ 50

2015 – 2016 / H2 Maths / Hypothesis Testing Page 16 of 28


National Junior College Mathematics Department 2016 (Teacher’s Version)

Method 1: Using critical region and observed test statistic, z

Critical region: z 2.326


0.01
1.484 1.5
z 2.530
0.002
50
2.326 0
Since z 2.530 2.326 , we reject H0.
2.530

Method 2: Using p-value

p-value = 0.00571

Since p-value = 0.00571 < 0.01, we reject H0.

We conclude that there is sufficient evidence at 1% level of significance to


claim that the packs are significantly underweight.
2 2
(b) Since is unknown, we need to estimate .

2 2
2 2 1 2 y 1 64.2
s x s y y 85 0.052392
n 1 n 49 50

H0: = 1.5
H1: < 1.5

Level of significance: 1% (lower-tailed)


X 1.5
Since population is normal, under H0, Z ~ N(0,1) approximately.
S / 50
x 1.5
Test statistic: z
sx / 50

Method 1: Using critical region and test statistic, z

Critical region: z 2.326 0.01

1.484 1.5
z 0.494
0.052392
50
2.326 0
Since z 0.494 2.326 , we do not 0.494
reject H0.

2015 – 2016 / H2 Maths / Hypothesis Testing Page 17 of 28


National Junior College Mathematics Department 2016 (Teacher’s Version)

Method 2: Using p-value

p-value = 0.311

Since p-value = 0.311 > 0.01, we do not reject H0.

We conclude that there is insufficient evidence at 1% level of significance to


claim that the packs are significantly underweight.

Example 4.2

A normal distribution is thought to have a mean of 50. A random sample of


100 gave a mean of 52.6 and a standard deviation of 14.5. Is this evidence that
the population mean has increased at 5% level of significance? What is the
least value of that would result in the conclusion that the population mean
has increased at 100 % level of significance?

Solution
Let X be an observation in the normal distribution.

Given n = 100, x = 52.6, x = 14.5 (sample standard deviation).

n
Unbiased estimate of population variance, s 2 x
2

n 1
100 2
14.5 212.373
99
H0: 50
H1: 50

Level of Significance: 5% (upper-tailed)


X 50
Under H0, Z ~ N(0,1) approximately.
212.373
100
x 50
Test Statistic: z
212.373
100

Method 1: Using critical region and observed test statistic, z

Critical region: z > 1.645 0.05


52.6 50
z = 1.784
212.373
100 0 1.645

Since z 1.784 1.645 , we reject H0. 1.784


Method 2: Using p-value

2015 – 2016 / H2 Maths / Hypothesis Testing Page 18 of 28


National Junior College Mathematics Department 2016 (Teacher’s Version)

p-value = 0.0372024 = 0.0372

Since p-value = 0.0372 < 0.05, we reject H0.

We conclude that there is sufficient evidence at 5% level of significance to


claim that the population has increased.

In order to be able to reject H0, we need p-value < α, i.e. α > 0.0372024
Hence, the least value of is 0.0373 (to 3 sig. fig.).

Example 4.3

The height of 5-years-old children in the country of Utopia is said to have


mean 70. The heights of six 5-years-old children were taken. They are

64 73 71 72 67 74

It was claimed that the mean height of 5-years-old children in Utopia has
increased.
(i) Carry out a suitable hypothesis test on the claim at 5% level of
significance, stating any assumptions made.

(ii) It was found that the standard deviation in height of 5-years-old children
in Utopia was 0.2. Carry out a suitable hypothesis test on the claim at
5% level of significance, stating any assumptions made.

Solution
(i) Let X be the height of a 5-years-old child in Utopia.

H0: 70
H1: 70

Level of Significance: 5% (upper-tailed)

Assumption: The heights of 5-years old children in Utopia follow a normal


distribution.

X 70
Under H0, T ~ t (5)
S
6
x 70
Test Statistic: t
s
6

2015 – 2016 / H2 Maths / Hypothesis Testing Page 19 of 28


National Junior College Mathematics Department 2016 (Teacher’s Version)

Method 1: Using critical region and observed test statistic, t .

Critical region: t 2.015


0.05
70.167 70
t 0.106 ( s 3.869)
s/ 6

Since t 0.106 2.015 , we do not reject H0. 0 2.015


Method 2: Using p-value 0.106

p-value = 0.460

Since p-value = 0.460 > 0.05, we do not reject H0.

We conclude that there is insufficient evidence at 5% level of significance to


claim that the mean height of 5-years old children has increased.

Note: We can also use the t-distribution Table (in MF15) to obtain the Critical
Value(s) for t-distribution. Refer to Appendix for the technique required to
find the critical value in Example 4.3.

2015 – 2016 / H2 Maths / Hypothesis Testing Page 20 of 28


National Junior College Mathematics Department 2016 (Teacher’s Version)

Obtaining the Critical Value(s) for the t-distribution using the


Graphing Calculator (Example 4.3(i))
(When full sample data is given)

Step 1:
Select “2nd" “Var” to activate the
“Distr” Options.
Select item 4 “invT(”

Step 2:
Enter the parameters as follows:
area : 0.95
df :5
i.e. entering “invT(0.95, 5)”

Generally, enter the parameters as follows:


invT(value of P(T a) , degree of
freedom)

In this problem,

P(T a) 1 0.05 0.95 , the relevant


lower-tailed probability corresponding to
the upper-tailed level of significance.

0.05

0 2.015
degree of freedom, v = n – 1 = 6 – 1 = 5

2015 – 2016 / H2 Maths / Hypothesis Testing Page 21 of 28


National Junior College Mathematics Department 2016 (Teacher’s Version)

Performing the t-test using the Graphing Calculator (Example 4.3(i))


(when full sample data is given)

Step 1:
Enter the 6 data values into List L1.

Step 2:
“STAT” “TESTS” (on the top menu)
Choose the appropriate test “2 : T-Test”

Step 3:
Select Input “Data” or “Stats”. In this problem,
we select “Data”.

Enter the null hypothesis value at “ 0:” and the


List: L1 where the data is found. Then, choose
the alternative hypothesis. Leave the Freq as 1.

Go to “Calculate” and press enter.

The next screen will show you the results of the


t-test. The t-value shown is the observed test
statistic, t. The p-value is also shown. Values
of x (sample mean), sx (where s x2 is the
unbiased estimator of the population variance)
and n (sample size) are also displayed.

Note:
1. A similar procedure can be used to carry out a z-test when the full sample
data is given.
2. If only summarised data is given to carry out a t-test, refer to the
procedure on Page 12 (but use a t-test instead of a z-test).

2015 – 2016 / H2 Maths / Hypothesis Testing Page 22 of 28


National Junior College Mathematics Department 2016 (Teacher’s Version)

(ii)

H0: 70
H1: 70

Level of Significance: 5% (upper-tailed)

Assumption: The heights of 5-years old children in Utopia follow a normal


distribution.

X 70
Under H0, Z ~ N(0,1)
0.2 / 6

x 70
Test Statistic: z
0.2 / 6

Method 1: Using critical region and test statistic, z

Critical region: z > 1.645


70.167 70 0.05
z 2.041
0.2 / 6

Since z 2.041 1.645 , we reject H0.


0 1.645
Method 2: Using p-value 2.041
p-value = 0.0206

Since p-value = 0.0206 < 0.05, we reject H0.

We conclude that there is sufficient evidence at 5% level of significance to


claim that the mean height of 5-years old children has increased.

Note:
In the event that a population distribution in a question is not given to be
2
normal, the sample size is small and unknown, we may need to assume that
the population is normal in order to carry out a t-test. Likewise, if sample size
2
is small but known, we also need to assume a normal population for a z-
test to be valid.

2015 – 2016 / H2 Maths / Hypothesis Testing Page 23 of 28


National Junior College Mathematics Department 2016 (Teacher’s Version)

Example 4.4

(i) At a wholesale market, a wholesaler claimed that the mass of his


watermelons is normally distributed with a mean mass of 2 kg and
standard deviation 0.5 kg. The consumer association decided to
investigate this claim. The mean mass of a sample of 50 watermelons
from this wholesaler was measured and there was insufficient evidence
to reject his claim at 10% level of significance. What is the range of the
mean mass of the 50 watermelons in the sample?

(ii) Another wholesaler claimed that the mass of his watermelons is


normally distributed with mean mass of at least 3 kg. The mean mass of
a sample of 15 watermelons from the wholesaler was measured and the
mass of watermelons in the sample was found to have a standard
deviation of 0.6 kg. The consumer association subsequently found
sufficient evidence to refute the wholesaler’s claim at 5% level of
significance. What is the largest possible mean mass of the 15
watermelons in the sample?

Solution
(i) Let X be the mass of a watermelon in kg.

H0: 2
H1: 2

Level of significance: 10% (two-tailed)

X 2
Under H0, Z ~ N(0,1)
0.5 / 50
x 2
Test Statistic: z
0.5 / 50

Critical region is z 1.645


0.10
x 2
z
0.5 / 50

1.645 0 1.645

Since, it is given that we do not reject H0 at 10% level of significance,


we must have

x 2
1.645 1.645
0.5 / 50
0.1163 x 2 0.1163
1.88 x 2.12

2015 – 2016 / H2 Maths / Hypothesis Testing Page 24 of 28


National Junior College Mathematics Department 2016 (Teacher’s Version)

(ii) H0: 3
H1: 3

15 2
Unbiased estimate of population variance, s 2 0.6 0.3857
14

Level of significance: 5% (lower-tailed)

X 3
Under H0, T ~ t (14 )
S
15
x 3
Test Statistic: t
s
15

Critical region: t 1.761 .

x 3
t
s
15

Since, it is given that we reject H0 at 5% level of significance,

x 3
we must have 1.761 x 2.71756
s
15

Largest possible x 2.71 kg (to 3 sig. fig.)

Therefore the largest possible mean mass of the 15 watermelons in the


sample is 2.71 kg.

Remark:
We cannot compute p-value in Example 4.4 since x is unknown.

2015 – 2016 / H2 Maths / Hypothesis Testing Page 25 of 28


National Junior College Mathematics Department 2016 (Teacher’s Version)

APPENDIX

Below is a section of the t-distribution table available in MF15.

P(T t)

degree of freedom

In this problem, we may obtained the critical value by looking for a value of
P(T t ) 0.95 and (6 – 1) = 5 degree of freedom.

(Refer to the next page for the full t-distribution table available in MF15.)

2015 – 2016 / H2 Maths / Hypothesis Testing Page 26 of 28


National Junior College Mathematics Department 2016 (Teacher’s Version)

The t-Distribution Table From MF15

2015 – 2016 / H2 Maths / Hypothesis Testing Page 27 of 28


National Junior College Mathematics Department 2016 (Teacher’s Version)

SUMMARY

To summarise the use of suitable test statistics

Sample Size, n
Population Small ( n 30 ) Large ( n 30 )
2
Variance,

X X 0
Z 0
N(0,1) Z N(0,1)
2 n n
known

X must be normally distributed. Otherwise we must assume X X may be normally distributed. If not, we may
is normally distributed. approximate X to a normal distribution by applying
Central Limit Theorem.

X X 0
2 T
0
~ t v ,where v = n – 1 Z N(0,1)
unknown S s
n n
(use of unbiased
estimate for population
variance, s) X must be normally distributed. Otherwise we must assume X X may be normally distributed. If not, we may
is normally distributed. approximate X to a normal distribution by applying
Central Limit Theorem.

2015 – 2016 / H2 Maths / Hypothesis Testing Page 28 of 28

You might also like