You are on page 1of 40

Chapter 4: Test of

Hypotheses

DR. ADINA NAJWA KAMARUDIN


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 (H null)
a) hypothesis we wish to test
b)
c) this is true until enough evidence to reject

Alternative hypothesis
a) the question to be answered
b) the theory to be tested
c) conjecture
d) all situations not covered by null hypothesis

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


Fail to reject ; because of insufficient evidence in the data
①Ho:My, 3.2

H,:M 73.2
want to
always
*
reject Ho
8 x 0.05 (if the X'snot
value of
given, assume)
=

I
③ teststatistics

④decision
⑤ conclusion
How to set the null and alternative
hypotheses?
Null hypothesis always include equal sign.
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
General procedure
1. Identify the parameter of interest
2. Formulate a null hypothesis and an alternative hypothesis
3. Choose a significance level
4. Specify an appropriate test statistic and calculate the value of the
test statistic from a random sample of data
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.
bigsample: z
Hypothesis testing for a single mean smol sample:t
Aim: to test whether the random samples come from a population with
10.5
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
is calculated as the test statistic
Case Test Statistic Rejection region
1 or

2
3
If the population variance is unknown, the sample size is then checked.
For n 30, is calculated while for n<30 is calculated
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 H0:M-90/M 90 =

H,:M >90

1. A manufacturer claims that a battery life model Z1 exceeds 90 hr.


The life in hours of a battery is known to be approximately normally
distributed, with standard deviation hr. A random sample
-
of 19 batteries has a mean life of hr. Is there evidence to

!2
U
support the claim? Use =0.01.
④ decision
① Ho:M-90/M 90 =
z0.m 2.3263
=

(page 34)
H,:M> 90 calternative): since 2 test (2.8205) <
Z0.0, (2.3263),
enough evidence to refer to
8 0.5
=

③ conclusion:
evidence to
③ teststatistics. Ztest:
M =2.8985 a
there is

2
+
support the claim
0.0
=
2. Suppose you are a buyer of large supplies of mobile phone

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.

~
3. A manufacturer of transistors claims that its transistors will last an
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.
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.
QUESTION 7
is unknown
:population variance
:smol population
0 Ho: M 250 8x 0.0
= =

H,:M f250
8 teststatistic:ttest=
IM 25-palye,51
=

④ decision

70.01
!I
= -2.821

Ittest (-3.1623) <t0.01


QUESTION 6

0 Ho:M 1 45/M 45(X)


=

H,:M745
8 x 0.05
=

8 statistic:Etest=
test
IM
46.7
= -
45
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-tailed
test
Case Test Statistic Rejection region
1 or

2
3

:
8 x 0.05
=

8 test statistics:
Etest: -

=
3.2

④ decision
Exercises -

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


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

significance?
PH:#9,0.9 ⑭
z0.05=-1.6449) inside book) *1-tailed
test
<0.9 18
H,: Th

it
-

since test (-1.39)


&x 0.05
=

1.6449
enough
-1.6449, not
evidence to reject Ho
-

8 ↓

i
z-

en
1.39 ke kiv; but
graph
=

claimed XSama
2. The manufacturer of electronic devices informed its buyer about
the proportion of defective devices in its shipments. It claims that
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: T = 0.06 Lada equal)


H1:i <0.86 Cless than) Cuaim)
8 x 0.05
④70.85
=

=
-

1.6449
③ test statistics:Etest

.
=0.05(-1.6449)
:Since I test(0.427>

not enough evidence


to
reject
to
-

1.6449
7
3. A semiconductor company claims that at least 99% of the exported
electronic components are defect free. A sample of 150 electronic
components was tested, and 12 with defect. Can we accept the

proportion, P 0.4-1
=

150
defect

proportion, P
0.99-1
=

not defect
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

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
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
convinced that its batteries have a standard deviation of 12
months? Use 5% significance level. -> decision
H0:8 3 test: Since
(est
16.173 In
12
=

H,:8 F12 12.3816)

x 0.05
=

= 2.3816 >320975, 9 (74. 0 25,


=19.0228(27004),
4 3120. 975, 4
evidence
enough
to reject Ho
Ho:8 -0.85/8 0.85
=

H,:870.85

Itailed test (greater than)


2. A company specifies that the standard deviation of the weight of a
brick should be at most 0.85kg. A QC engineer makes an inspection
so that the process could meet the specification. A sample of 10
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.
3) "test: :not enough

1i evidence
reject
to
Ho

10.89
=
:Yes, Hoi our
specification
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
se

A
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.
:. 2-tailed test

0 H0:M,
Mz/m, Mz 0 (reject)
= -

Hi.M, Mz
/m,
F
fr
8 x 0.05
=

Etest=Tatein
③ statistic:
test

④ decision

70.025 =
1.96

as
2.6231

=

W
2-tailed and
bes not
equal

since test(2.6231) > 70.025 (1.96),


enough evidence to rejectHo
evidence
is
conclusion:There

to support the
claim at 1 0.05
=
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
standard deviation of five while in the second group, the mean
score was 77 with a standard deviation of 10. Is there exist a
significant difference between the performances of the two groups
at 5% level of significance?
3. An experiment is done to test the strength of two types of rock
climbing ropes, namely R1 and R2. A sample of 15 pieces of rope R1
has a mean strength of 200kg and a standard deviation of 5kg. A
sample of 20 pieces of rope R2 has a mean strength of 188kg and a
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.
① Ho: M, < Mr/M, Mr
=
:we have enough
evidence to
H1: M, Ma
0x 0.1
= reject
③ I test If Etest< calculated
not enough evidence to reject
tv.01,33 2.445
-
=

degrees of
ruytm
-
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
1. A random sample of 150 students showed that 102 were in favour
of a new grading system while another sample of 180 students
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.
2. A geneticist would like to study the proportion of males and
females in the population that have a certain minor blood disorder.
He did a survey by taking a random sample of 100 males and 100
females. Thirty one of the males are found to be afflicted, whereas
only 24 of the females appear to have the disorder. Can we
conclude that the proportion of men in the population afflicted
with this blood disorder is significantly greater than women? Use
1% significance level.
① 4O
/T, -te Yp
#
:- Te

- 42 >0
:

x 0.01
(significance)
=

⑧ Pp 0.275
=

24
=

200

ztest-west
31
③ 1.1085
Teststatistics I
- =
-

to in
Hypothesis testing for
Aim: to test whether the variances from two populations are
significantly different; ,
Let say there are two random sample from two populations
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
Ho:8, 82" /Si-8 0
=
=

Exercises H1:8, 8e F B=0.12


=

T.892
32
n 0.05
=
-1.2346
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.

You might also like