Professional Documents
Culture Documents
STAL2073 Chapter4 2020 2021 6af2b89854d8f7bccb4ff4 231017 010847
STAL2073 Chapter4 2020 2021 6af2b89854d8f7bccb4ff4 231017 010847
STAL2073 – Chapter 4
Hypothesis
• Hypothesis: a statement regarding the population
• To validate a hypothesis, testing is required. A
sample must be obtained, and testing procedure
must be followed.
• E.g., pollutant released by a factory is said to
pollute the river causing growth retardation of
fishes in the river
• How to test and validate this hypothesis?
• Let’s begin by understanding some basic
concepts: Null hypothesis, Alternative hypothesis,
Error Type I, Error Type 2
1
10/20/2020
Real Situation
Decision Made
Ho CORRECT Ha CORRECT
2
10/20/2020
When making a decision we may commit Type I Error (α) i.e. when we Reject Ho
or Type II Error (β) i.e. when we accept Ho.
However, if the computed statistics does not allow us to reject Ho and we decided to
accept it (Ho), we’re risking ourselves to commit Type II Error (β) which is >> than α.
In such situation where we fail to reject Ho, we may not accept it. Instead, we may
say that the data does not support your Ha and this requires you to collect further
evidences or modify Ha.
3
10/20/2020
Example
4
10/20/2020
Area
• If the mean sample we collected exceeds or equal
to 11.316, hence we reject Ho with significance
level of 0.05 of 5% (or level of confidence of 95%)
• What is the Type Error II (β) for this Rejection
Area?
• Test II
H : Lwn.H :
o A o a A o
• Test III
H : ³ Lwn.H :
o A o a A o
x
• Test statistic used : Z=
/ n
0
10
5
10/20/2020
• Rejection:
Test I: Reject Ho if |Z| > zα/2
Test II: Rejectk Ho if Z > Z α
Test III: Reject Ho if Z < - Z α
x
t= 0
s/ n
11
• Rejection:
Test I: Reject Ho if |t|>tα/2,n-1
Test II: Reject Ho if t >tα,n-1
Test III: Reject Ho if t < - tα,n-1
12
6
10/20/2020
13
_
_
[x z , x z ]
n n
/2 /2
14
7
10/20/2020
15
16
8
10/20/2020
17
Case I: Reject Ho if 2 2
1 ,n 1
or 2 2
,n 1
2 2
(n 1)s 2 (n 1)s 2
2 , 2
/ 2 ,n 1 1 / 2 ,n1
18
9
10/20/2020
s2A
F=
s2B
• If both samples are drawn from normally distributed
populations then would follow F distribution.
19
TEST I:
Reject Ho if F < F1-α/2,nA-1, nB-1
TEST II:
Reject Ho if F > Fα,nA-1, nB-1
TEST III
Reject Ho if F < F1-α,nA-1, nB-1
20
10
10/20/2020
CASE II (one-tail)
H o : 1 2 Lwn .H a : 1 2
H o : 1 ³ 2 Lwn .H a : 1 2
21
Test statistic:
_ _
x1 x 2
Z=
21 2 2
n1 n2
22
11
10/20/2020
Test Statistic: x1 x 2
t=
s2 1 s2 2
n1 n 2
s12 s 22
n n
1 2
= =
df dk 2 2
s12 s 22
n1 n 2
n1 1 n 2 1
23
Test statistic: _ _
x1 x 2
t=
1 1
s pooled
n1 n 2
( n1 1)s12 ( n 2 1)s22
s2pooled = n1 n 2 2
24
12
10/20/2020
25
However, we can’t treat this as two independent samples, but instead two
dependent samples.
26
13
10/20/2020
Hypothesis testing:
Ho:µd=0 vs. Ho: µd≠0 (two-tail)
Ho:µd≤0 vs. Ho: µd>0 (one-tail)
Ho:µd≥0 vs. Ho: µd<0 (one-tail)
27
Example #1:
Assume X ~ N(µ,(78.5)2). One sample of
n=100 is taken and x_ =520.
Researcher is interested to test this hypothesis:
Ho:µ=500 vs. Ha: µ ≠ 500.
using α=0.05
This is a case of two-tail test with σ is known.
Statistik ujian:
520 500
Z= = 2.55
78.5 / 100
Reject Ho if Z > Zα/2=Z0.025=1.96.
Decision: Reject Ho. What is the p-value for this
test?
28
14
10/20/2020
Example #2
X~N(µ, σ 2), σ is unknown and
_
n=25, x=520, s=75
Ho:µ=500 vs. Ha: µ ≠ 500
520 500
Test statistic: t= = 1.33
75 / 100
Example #3
Testing involving variance of 1 population.
Consider the following data: 31.2 32.5 30.8
31.5 29.5 31.1 31.3 30.7 26.7 29.2 32.1 28.3
31.6 29.2 31.5 29.7 30.4 31.0 29.1 30.5
Ho: σ ≤ .5 lwn. Ha: σ > .5
With the formula, s=1.41
2
(20 1)s 2 1.41
=
2
= 19 = 151.1 0.05,19 = 30.1435
2
2
0 .5
15
10/20/2020
Example # 4
Researcher is of the opinion that fishes in Pool A are bigger than
those in Pool B. One sample of n=12 is taken from Pool A
and another one with n=11 from Pool B. All fishes are weighed
Pool A (Weight in g): [76.9 107.2 85.5 112.3 90.1 114.8 96.4
119.8 98.9 124.9 104.4 134.5]
Pool B (Weight in g): [41.9 84.8 52.8 91.8 58.3 95.2 61.3 104.9
74.9 114.3 82.3]
31
_ _
x A = 105.5, x B = 78.4
s2A = 285.5,s2B = 520.5
32
16
10/20/2020
520.5
F= = 1.82 F0.025,10,11 = 3.53
285.5
33
34
17
10/20/2020
Example # 5
Effectiveness of a pellet food for fish growth was tested on 12
fishes in a laboratory. Researcher believes that the food can
increase the weight of the fishes by 10 g in within a week.
This is an example of
dependant samples (before and
after but readings are obtained
from the same subject).
35
åd åd ( )
2
2
1 _ n
sd =
n 1
å(d d) =
2
n 1 = 5.116
_
d10
t= = 2.34
sd / n
Can Ho be rejected?
36
18
10/20/2020
Important Concepts
• Hypothesis testing concepts
• Type I, Type II error, α, β, p-value
• Rejection area (or set)
• Hypothesis testing for 1 population with normal
distribution with known variance
• Hypothesis testing for 1 population with normal
distribution with unknown variance
• Central Limit Theorem
• Testing involving 2 populations
• Testing involving variance
37
19