You are on page 1of 42

Chapter 4: Test of

Hypotheses
Assumption
3

DR. ADINA NAJWA KAMARUDIN


1415

Introduction
With the data from sample, an engineer can make a generalization or
a conclusion about the population parameter through estimation.
The estimation can be in an interval between two values depends on
the level of confidence.
Several situations have to be considered; the availability of the
population variance, sample size, equality of the population variances
when involve two populations.
There are formal tests to check the significance of the parameters.

(opinion) about something/system/product.


In statistics, these assumptions and opinions are called statistical
hypotheses and can be tested using test of hypotheses.
How probability is used in hypothesis testing?
The test is done with the awareness of the probability of a wrong
conclusion.
Since we take a random sample to test the hypothesis, rejection of
the hypothesis implies there is a small probability that the hypothesis
is true.
Rejection tends to rule out the hypothesis
Acceptance/fail to reject does not rule other possibilities
The Null and Alternative Hypotheses
Null hypothesis
7 /

a) hypothesis we wish to test


lement
2

soml b)
c) this is true until enough evidence to reject

Alternative hypothesis I

a) the question to be answered


b) the theory to be tested
c) conjecture
d) all situations not covered by null hypothesis
reject to
Always want
* to

Reject ; in favor of because of sufficient evidence in the data


2
probability
Fail to reject ; because of insufficient evidence in the data
How to set the null and alternative
hypotheses?
Null hypothesis always include equal sign.
7

At least, at most include equal sign so these define the null


hypothesis.
Alternative hypothesis does not include equal sign and the
complement of the null hypothesis.
More than, less than, increase, decrease do not include equal sign
thus define the alternative hypothesis.
Testing a Statistical Hypothesis /Steps]
General procedure >
M, M, O

1. Identify the parameter of interest Ho H,

2. Formulate a null hypothesis and an alternative hypothesis


3. Choose a significance level 0.05
=
*If not given, 2=0.05

2 It
4. Specify an appropriate test statistic and calculate the value of the
2 = P -

[test statisticI from a random sample of data


TO

in".F
5. Determine the distribution and state the rejection region of the test
statistic
6. Decide whether to reject null hypothesis or fail to reject null
hypothesis by comparing the calculated value of the test statistic
with the value in the critical region
Step 3: Significance level
How hypothesis testing works?
All tests are exposed to some error in concluding a hypothesis
This error is explained by the significance level
It is a probability of rejecting a null hypothesis when the null
hypothesis is true.
There are typical values of which are 0.01, 0.05 and 0.1
These values are based on the certainty that we need. Lower
indicates more accurate test we are conducting
Step 4: Test Statistic
It is a sample statistic computed from the data obtained from random
sampling
This value is used to determine whether the null hypothesis should be
rejected or not
In order to compute the test statistic, the distribution of the data is
first has to be determined whether z distribution or t distribution.
The situations to be considered are similar with those in Chapter 3
when constructing the confidence interval.
To test the mean, some conditions have to be considered which are
the availability of the population variance and the sample size.
Step 5: Rejection Region and Decision Rule
Rejection region is determined once the critical value is assessed.
The critical value is depends on the type of the test (one-tailed or
two-tailed) and the distribution whether z or t.
For two-tailed test, the critical value is while for one-tailed test
the critical value is
The rejection region is defined as the area or the probability of any
value greater than |critical value|.
This region is considered as the region where the observed
standardized value (calculated test statistic) is far from the mean and
enough evidence to reject the null hypothesis. A
-
0.51 M1 -M2 =
5.003

I I

Is there any significantdifferent?


No, the interval contains zero valu

①M. > M1 0 =
② O,
1
=

M, -
Mc 0=
O
Mi M2 =

O 0, =

Lew value
* value
I
*
Hypothesis testing for a single mean
Aim: to test whether the random samples come from a population with
< A
constant or claim

Assumption: the sample mean is normally distributed or approximately


normal (n 30 using CLT)
The availability of the population variance will determine the test statistic to
be used in the hypothesis testing
Once the population variance is known, z distribution is consider and
en *
case
is calculated as the test statistic
I
rejection 161 rejection
Hypothesis
"zak
Test region <12 region
EX:

①:*I* 3
r
-
1.90 1.96 Itailedtest
Case Test Statistic Rejection region
⑧ 2:0.05

1 or ③ Test statistic: 2
tests.
⑦ Decision:
Since I test (3.2)<20.025(1.90),
2 enough evidence to rejectto
⑤ conclusion:M 5.7 =

-
#X
3 a
cases

en
rejection
region,//X
If the population variance is unknown, the sample size is then checked. 212

For n 30, is calculated while for n<30 is calculated -Xque, rejection


region
111/
2x12
Hypothesis testing for a single mean
For unknown and n 30, is calculated
Case Test Statistic Rejection region
1 or

2
3
while for unknown and n<30 is calculated
Case Test Statistic Rejection region

1 or

3
Exercises
1. A manufacturer claims that a battery life model 7Z1 exceeds200790 hr.
The life in hours of a battery is known to be approximately normally
distributed, with standard deviation
n
hr. A random sample
of 19 batteries has a mean life of hr. Is there evidence to
support the claim? Use =0.01.
① Ho:M 90/M 90
= =

H,:M>90 (claim)
⑧ a 0.01
=

③ Ztest=X
Mo
=

95.5-90
=

8.5

19
=

2.8205

④ 20.01 6.3263
=

e 11II,
2.32038205
Since test (2.8205) < 0.01 (2.3203),
enough evidence to rejectto
③ Con:There enough is evidence to supportthe claim at 2:0.01
2. Suppose you are a buyer of large supplies of mobile phone
H > 900 n

phone batteries can last more than 900 hr. You test 40 batteries and
find that the sample mean is 922 hr and the sample standard
Use
=0.05.
① Ho:M2900
As:M(900 (claim)
② x 0.05
=

③ I test:X-Mo
O

922-900
=

68

40

2.0462
=

④ 20.05:1.6449

e IIII
1.6449
2.0462

Since I test (2.0462) > 20.00(1.0449), there isenough evidence to rejectto


③ Con:There to the
support claim 2 0.05
at
=

enough evidence
is
3. A manufacturer of transistors claims that its transistors will last an
M>2100 n

average of 2100 hr. To maintain this average, 20 transistors are


tested each month. What conclusions should be drawn from a
sample that has a mean 2140 hr and a sample standard deviation
87 hr? Assume that distribution of the lifetime of the transistors is
normal. Use =0.01.
① Ho:M12100
A,:M<2100 (claim)
2 x 0.01
=

③ I test X
=
- M
S

2140-2100
=

87

20

2.0562
=

④ 20.01 2.3263
=

S IC1161
2.0582
2.3203

Since Itest(2.0562) < 20.0,


not enough
(2.3203), there is evidence to rejectto.

③ Con:There evidence to supportclaim 2


at 0.01
=

not
is enough
4. Test the hypothesis that a random sample:
30.4 31.2 30.8 29.9 30.4 30.7 29.9 30.1
came from a normal population with mean 30.5. The standard
deviation of the measurements is known to be 0.1. Use =0.05.
5. Assume the standard deviation is unknown is (4), test whether the
true mean is 30.5.
6. A random sample of size 60 produces values and
Test the hypothesis that against the alternative that
. Use =0.05.
7. A manufacturer claims that the standard mean volume per bottle of
shampoo is 250ml. Ten random samples are taken from a batch and
the volume per bottle is measured. The 10 measurements have a
sample mean of 243 ml and a standard deviation of 7 ml. Assume
approximate normality of the data. Is this sample mean significantly
below the claimed value? Use =0.01. ↑
-

X

Ho: M 30.5
=

H:M = 30.5

8 x 0.05

~If given,
=

x 30.425
=

3 0.1
=

be
need to use ③ Ttest=X-Mo
S

n
① Ho:M 30.5
=

H:M =30.5 30.425


=
-
30.5
0.459

⑦ a 0.05
=
S

③ I test:X -
M
=
-
0.4622
S

H

T0.025,7 2.365
=

30.428
= -
30.5

S
0.1

=- 2.121 11 11 I
-
0.4622

20.025 1.96
=

- 2.365 2.365

S ③
Since to test (-0.4622) > +0.025,7)-2.365), there isenough
not evidence to reject to

"n" 1.96
not the true
Cone:30.5 is mean

-
2. 121
2. 12 1

Since 2 test (-2.121) s 20.025)-1.96), there enough


is evidence to reject to

③ There is
enough sndence
support daim
to 2 0.025
at =
M 25
=

0
Ho:M 45 =

H:M-45

② x 0.05
= ① Ho:M7,250
③ I test:X - M H1:M < 250
S

n 2 x 0.01
=

46.7
= -
45 ③ Etest=X - M
6.44 S
60 n

2.0447
=
243-25
=

④ 20.05 1.6449
=
10

3.1623 7. Ho:M1,250, 10,x 243,5:7,x

M
=- n =
=
0.01
=


t0.01, 9=2.821 H:M,<250
-
X

r
1.6449
2.0447

Since2 test (2.0447)> Z0.05 (1.6449), there is enough evidence to rejectto. /


3.1623

-

Con2:M245 -
2.821

Since - test (-3.1623) t0.01, 9(-2.821), there isenough to


<
evidence reject
to

⑤ Con:There is
evidence to
supportthe claim ata 0.01 =
1815

Hypothesis testing for a single proportion


Aim: to test whether the true value of proportion, probability or
percentage, equals to a certain constant.
Assumption: the trials of this binomial experiment are independent
and the probability of success is the same for all trial.
When n is large, the proportion is normally distributed with mean
and variance .

2
claims /opinion

Case Test Statistic Rejection region Refering *


H. (Alternative (

a-tailed
* test 111 Il
1 C
or -2212, 2x12
[test> x12, enough
* evidence reject
to to c

Itest<Zal2, not enough


* evidence to reject to

2
3
p g1
=
+

35 288

Exercises
=

p
+

p
5
=

0.875
=

77,0.9

1. An electrical company claimed that at least 90% of the parts which


they supplied to a government conformed to specifications. A R
q
sample of 280 parts was tested and 35 did not meet the

significance?
① Ho:i2,0.9 (claim)
11: 7<0.9

8 x 0.05
=

③ I test P-i =

i (1 -
7)
M

=
0.875-0.9
0.9(1-0.9)
280

= -
1.3944

④ 20.05 1.6449
=

n -
1.3944

Since I test (-1.3944) = 0.05) not enough evidence to


1.6449), there is
=

reject to.

⑧ Con:No. There is
not enough evidence to
acceptthe claim at x 0.05
=
2. The manufacturer of electronic devices informed its buyer about
the proportion of defective devices in its shipments. It claims that 7 - 0.06

the proportion of defective devices is less than 6%. A random


sample of 100 electronic devices indicates that five are defective.
Using =0.05, test whether the buyer will accept the
① Ho:1 >,0.06
H,:i <0.06 (claim)

8 x 0.05
=

③ I test P-4
=

n(1 -
7)
U

0.05
= - 0.06

0.06(1-0.86)
100

=-0.4211


20.05 1.0449 =

-
11
-0.4211

-
16449
Since I test (-0.4211) > 20.051-1.6449), there is not enough evidence to reject(o-

Con:No. There enough
is not evidence acceptthe claim
to x
at 0.05
=
↑ 2,0.99

3. A semiconductor company claims that at least 99% of the exported n

electronic components are defect free. A sample of 150 electronic q


components was tested, and 12 with defect. Can we accept the
1
Pq
=
+

12 150
① Ho:410.99 p
+ =

138
=

H1: 4 <0.99 p
150
& a 0.01
=

0.92
=

③ I test P-A =

T(1 4)-

0.92-8.99
=

0.99(1-0.99)
158

= -
8.6164

④ [0.01 2.3263
=

-
X
-
8.6164
-
2.3263
evidence reject(o
to
Since test (-8.6164)< 20.0,(-2.3263), there isenough
evidence to accept

the claim at
Con:Yes. There enough
is 0.01
a =
2115

Hypothesis testing for a single variance


Aim: to test whether the random sample is drawn from a normal
population of a specific know variance or standard deviation
Investigating the variance involves chi-square distribution. Thus the
test statistic is the chi-square random variable Alas,
sample variance
hidin-1 Mass, n-1
a

claimed
value

Case Test Statistic Rejection region


1
, n-1 dof or

2
3
Exercises
1. A manufacturer of motorcycle batteries guarantees that his ⑧

batteries will last, on average 24 months with a standard deviation n

of 12 months. If 10 of these batteries have lifetimes of 20, 15, 27,


15, 30, 12, 18, 26, 14, and 22 months is the manufacturer still S

convinced that its batteries have a standard deviation of 12


months? Use 5% significance level.
① Ho:0 12
=

54x 38-1
=

H:0 f12

⑧ a 0.05
=

③ N'test=(n-1)s
02

=(10-1) (38.1)
12

h
2.38125
=

I, III
④ 40.975,9=2.7004

Since "test (2.38125)


(0.025,9=19.0222
< rejectto
U0.275.9 (2.7004). There isenough evidence to
27004238125
butteries have a standard deviation of 12.

⑤ conviced thatits
19.0228
Con:Yes. The manufacturer should not
2.38125
2. A company specifies that the standard deviation of the weight of a 62 0.85

brick should be at most 0.85kg. A QC engineer makes an inspection D


so that the process could meet the specification. A sample of 10 S

bricks is randomly selected and the standard deviation is 0.90 kg. Is


there sufficient evidence to conclude that the weight meets the
specification? Assume that the sample is taken from a normal
population. Test at 0.05 significance level.
=
① Ho:0 0.85

H1:0 > 0.85

⑧ x 0.05
=

s2
③ Nest=(n-1)

M
O

=(10 1) (0.90)2
-

0.852
=10.09
10.09 16.9198
④ 20.05,9=16.9190
Since U"test (10.09) <n0.05,9(16.9190).
There is
not
enough evidence to rejectto
conclude the
sufficientevidence to
⑤ Con:No. There
a 0.05.
is specification at =
Hypothesis testing for
Aim: to test whether the means from two populations are significantly
different; ,
Let say there are two random samples with size and with size
drawn from two populations and respectively.
Both populations are normally distributed with known variances;
and .
Thus and
To investigate whether the two population means are significantly
different, is calculated as the test statistic
Case Test Statistic Rejection region

1 or

2
3

When the variances from both populations are unknown and the sample size for both and are large ( ), the
as in table above is used by replacing the population variances with the sample variances and
respectively.
If the sample sizes are small, is used. However, the information on the equality of the population variances is required.
For equal variances between two populations the pooled variance is calculated instead for calculation of the test
statistic,
Case Test Statistic Rejection region

1 or

2
3

With dof
For unequal variances between two populations as
the test statistic as in table below is calculated
Case Test Statistic Rejection region

1 or

2
3

With dof
Exercises
1. A manufacturer is comparing the settings of two machines, M1 and
M2, which should produce rods of the same length. Both have, over
a long period, produced rode whose lengths were normally
distributed with variance 37 cm2. Although the two machines are
supposed to produce the same length of rod, he suspects that this
is not so. Examine the suspicion, if the total length of the 15 rods
from M1 is 513cm and the total length of 20 rods from M2 is
575cm. Use 5% significance level.
M, < 0 2
37,
=
n 15,i
= 513 34.2
=

=
① Ho:M, M2/M,
=
-
M2 0 =
4
Z0.025:1.96
15 H,:M, FM2/M. M2 F0
-
-

M2 > 0
=

37, 20,5 575 28.75


& x 0.05
=

IS II
n
(M-Mu)
= =
=

③ Zest (x, -x2) 1.96


-
-
1.96
20
=

-
2.62312.6231
0 + O
ni U2
Since test enough evidence to
(2.6231) > 20.025 (1.90). There is rejectto
O
=(34.2-28.75)
-

0.85
⑤ Con: there enough evidence to supportthe claim 2
at =

is
372 372
+

15 20

2.6231
=
Ni Na

2. A problem solving test was given to two groups of 35 and 40


engineers. In the first group, the mean score was 82cm with a Si
Xi

standard deviation of five while in the second group, the mean 82


2
x
score was 77 with a standard deviation of 10. Is there exist a
0 significant difference between the performances of the two groups
=

at 5% level of significance?
① Ho:M. -
M2 0=

H:M, -M2 0

② 2 0.05=

(m, -Mc)
③ I test (x, -x2)
=
-

0 + O
ni U2

(82-77)
-

0
=

2
52 10
+

35 40

2.788
=

④ 2002:1.96
-
IS II
-
1.96 1.96

2.788
-
2.777

Since test(2.75(< 20.025 (1.90). There enough


is evidence to rejectto
evidence to 0.05
There enough supportthe claim a
at

significantdifferent.
=

⑤ Con: Yes. There is


is
3. An experiment is done to test the strength of two types of rock ni

climbing ropes, namely R1 and R2. A sample of 15 pieces of rope R1 Xi Si

has a mean strength of 200kg and a standard deviation of 5kg. A


n2 Xz

sample of 20 pieces of rope R2 has a mean strength of 188kg and a


S2

standard deviation of 6kg. Assume the two population variances are


equal. Please conduct a test whether the mean strength R1 is
greater than R2 at 1% level of significance.
Mz 0
2000 Ho:M, =M2 /M.
=

R,
2
5,n 15,i
=

<0 = =

0
Hs:M, > M2 /M1-M2 >

R2 < 0
2

6,n 20,i
= 118
=
a 0.01
=

test (X,-xa) -
(M,-Mal
③ Sp (n,-1)S,+(Mn-1S =
=

so
O,:02 4, + 12 -
2
ine
(20-1)(6)
"
=(200-125) -0
=(15-1)(5)
15 20
+ -
2 5.59761
+1
15 20
5.5976
:

6.276
=

④ To.01,35 2.445
=

Since Test (6.270) > enough evidence to


To.01,33. There is rejectto

Cons:R1> R2
Hypothesis testing for
Aim: to test whether the proportions from two populations are
significantly different; ,
Let say there are two random sample proportions with large
sample size and with large sample size drawn from two
populations and respectively.
Both populations are binomially distributed; and
.
Thus and
To investigate whether the two population proportions are
significantly different, is calculated as the test statistic
Case Test Statistic Rejection
region
1
or
2
3 Where
Exercises
D,
182 0.6
= =

n,

1. A random sample of 150 students showed that 102 were in favour na

of a new grading system while another sample of 180 students 12 100/100


=
0.60
=

revealed that 108 were favour of the new system. Do the results
indicate a significant difference in the proportion between the two
group of students? Use 1% significance level.
4,:0.68
& Ho:D, Ra
=

H:M, F M2 772:0.60

⑦ a 0.01
=

z P, Pu
8 Pp X, Xz
-

=
+
=

n, 12
,i)
+
Ppcl-p)
=102 108 +

150 180 0.68-0.60


+ =

0.636
=

0.636(1-0.636)
(i* in)
1.5043
=

④ 20.005=2.5755

e
so its
-
2.57582.5776

Since (1.5043) <20.005(2.575). There is


I test
not
enough evidence to
between both
group. reject (o.

8 Con:Yes. There is different


significant
2. A geneticist would like to study the proportion of males and
females in the population that have a certain minor blood disorder. ni
He did a survey by taking a random sample of 100 males and 100
Na 1, 31/100
=
0.31
=

females. Thirty one of the males are found to be afflicted, whereas


only 24 of the females appear to have the disorder. Can we
72 24/100: 0.24
=

conclude that the proportion of men in the population afflicted


with this blood disorder is significantly greater than women? Use
1% significance level.
①Ho: , -
R 0 =

Hi:M. -
12 30

2 x 0.01
=

Z test P.-P2
③ Pp Xi X:
=
+
=

ni n2 Pp (1-Pp) (i ni)
+

=31 24 +

=0.31-0.24
100 +100
=

0.275
0.255(1
0.275)()
-

=
1. 1085


Z0.01 2.3263
=

- 11/1,
1.10852.3263

sincetests 2012.soos
of n
there ot enoughendencetoresetfly greater thant h e

I
Hypothesis testing for

h
Aim: to test whether the variances from two populations are
significantly different; ,
Let say there are two random sample from two populations
Fi-EN,Nz
Both populations are normally distributed; and
.
To investigate whether the two population variances are significantly
different, is calculated as the test statistic
Case Test Statistic Rejection region
1 or

2 With dof
3 and
Exercises
1. Two types of equipment for measuring the amount of carbon
monoxide in the atmosphere is being compared in an air-pollution
experiment. It is desired to determine whether the two types of
equipment yield measurements having the same variability. A
random sample of 10 from equipment E1 has a sample standard
deviation of 0.10. A random sample of 16 from equipment E2 has a
sample standard deviation of 0.09. Assuming the populations of
measurements to be approximately normal distributed. Test
whether both equipment E1 and E2 have significant difference of
variances? Use 5% significance level.
variance

ni

Si n2

Ja


Ho:8, If given value, single-tailed test
* iti s

O,
Hi:F1
O

8 x 0.05
=

8 ftest 0.102
=

1
0.09"
/
1.2346
=

④ f0.975,9,15 1 ils
=

1 0.2653
=
=

f0.975,9,15=3.12
0.2053
sis'
f0.025,15,93.77

Since test (1.2340) <


f0.025,9,15 (3.05). There is
not
enough evidence to reject to

⑤ Con:No.E, and En has similar significantdifferent ofvariances -


Ch3

P,:0.95
P2:0.9

ii) No. Notidentical. Itissignificant.

i) x 1 -0.95:0.05:0.025
=
I, F Mr

No, because the interval does not contain


zero-

(11 12)
-
-
2 , (1 4.)
-
+ Ma(1-42) - (1, D2) (D1 12)
-
-
-
2 , (1- 4.) + Ma(1-D2)

ni nu ni nu

10.95-0.97 -1.96 0.95(1-0.95) +0.9(1-0.9) (0.95-0.97-1.96


=(4 -42) = 0.95(1-0.95) 0.9)1-0.9)
+

I 300 I 300

:.(4.559x10- 3,0.09544)
x O

11 1.48
150
18
5.554.32

--

i) x 1 -0.95 0.05
=
= ii) x 1 -0.98 0.02
= =

Sp:(n,-115,+ (n-1)S2"

>famine,
8, 4, Hz
+
2
Si
-

I ↳ fx/2, rc-1, n.-1

O, Sch
no
(11 1) (5.55)
= -
(10-1) (4.32)"

5.552 5.5 12 + 10 - 2
I
↳ o, - (3.78)

4.763.96 O, 4.12 =

5
2.539
O,
0.4168 I C 6.2389 0.01, 19
8,
x,x2-taxa, nitra-esp (M.-Ma)=
= (x,-xn)+ tala, mienn-xsp 1 + 1
ni n2
:Yes. The variabilities ofthe two equal. There value of
1 the interval.
processes are is in

(150-148) 2.539(5 ( =(n, M) =


(150 140) 2.539(5)
I +
I
-
+
- -

10

... -3.5460,7.5408)
Ho:M,

2 til
test

① Ho:7 0.03
=

A:A F0.03

⑦ 2 0.01
=

③ I test= P -
MO

Mo-(1-Mol

=0.06-0.03

0.83(1 0.02)
-

200

2.487
=

④ 20.005:2.5751

M
Since test (2.487) <20.005 (2.5555). There not
is enough evidence to reject to.

Thus, there not evidence to indicate the defective


of buckles changed.
is
enough percentage produced has

III
2.457
2.5753
22
~ - ·
- ~ 18
----
- -
-
~ - ~
~ ~
~ ~ ~

P, 0.55
=
P 2 0.45 =
ii) iii) Ao: 1.2.0.6, H:1, 20.6

i) H0:4 0.5/1 = 0.5


= I test:0.45-0.6 I test:- 1.9365

H:4

-
- 0.5 0.6(1-0.6)

a 0.01
= 40

I test P
=
- MO = -
1.9365 ⑲

1.93652x
7o(
-

Mo (1 -

n X

From table, -20.026


0.55-0.5
=
=.1.4431,2 0.026
=

-
0.5 (1-0.5( :. 60% use R95

40 Since test (0.6325) < 20.0, (2.3263). There

0.6325
= 11Il is not
enough evidence to
rejectto.
70.01:2.3263 0.6325
Yes. We cannot since there are notenough
2.3263

evidence to supportthe claim

You might also like