Chapter 6. Hypothesis Testing 2023
Chapter 6. Hypothesis Testing 2023
Chapter 6. Hypothesis Testing 2023
Hypothesis Testing
Dr. Lam Son
[email protected]
033.6969.909
1. Concept
1.1. The statistical hypothesis
P ( G W / H 0 ) =
G test criteria.
W rejection domain/ region
level of significance
1.5. Testing rule
Carry out a test with a sample that obtains a
specific value: w = ( x1 , x2 ,...xn )
From there it can be calculated:
g = f ( x1 , x2 ,...xn , 0 )
g is called the observed value of the test
criterion.
g W reject H0 (accept H1)
g W accept H0
2. The characteristic parameters Test
2.1. Hypothesis testing a mathematical expectation
of a normally distributed random variable.
H0: = 0
H1: 0
P (G u ) = W = (u ; + )
H 0: = 0
H1: 0
H0: = 0
H1: 0
P (G −u 2 ) + P (G u 2 ) =
W = ( −; −u 2 ) (u 2 ; + )
Example:
A management report: the average processing time
for 1 machine part is 26 minutes. Machining time
for a machine part is a normally distributed random
variable with standard deviation of 5.2 minutes. A
sample of size n=100 is randomly taken and an
average of 27.56 minutes is calculated.
At 5% significance level, what can be concluded
about the above report?
H0: = 0
H1: 0
(
W = −; −t (n −1)
) (t (n −1)
; + )
Ex:
A company produces light bulbs with an average
lamp life of 1200 hours. The company just
imported a new production line. This line, when
tested for 40 balls and tested, showed an
average life of 1260 hours with a standard
deviation of 215 hours. At the 5% level of
significance, determine whether the new chain is
better than the old one?
H0 : 1 = 2
X1 − X 2
G= N (0,1)
2
2
1
+ 2
n1 n2
H 0 : 1 = 2
H1 : 1 2
H 0 : 1 = 2
H1 : 1 2
X1 − X 2
G= N (0,1)
S 2
S 2
+
1 2
n1 n 2
Ví dụ: At a factory, two production lines are
assembled to produce the same product. to evaluate
whether the average fuel consumption in a production
shift along these two lines is different.
Line 1: xi 2,5 3,2 3,5 3,8 3,5
ni 9 6 6 4 8
Line 2: yi 2,0 2,7 2,5 2,9 2,3 2,6
ni 8 7 8 9 5 8
At the 5% level of significance, conclude on the above
problem knowing that the material costs along both
lines are normally distributed random variables.
Let X1, X2 be….
X1 − X 2
H 0 : 1 = 2 G=
S 2
S 2
H1 : 1 2 +
1 2
n1 n 2
W = (−, −u /2 ) (u /2 , +) = ( −, −1.96 ) (1.96, + )
n1 = 5, x1 = 3,3; n 2 = 6, x 2 = 2,5
3,3 − 2,5
g= = 3,33 W
0, 42 0,52
+
5 6
So at 5% significance level, it can be said that the
material waste of the two production lines is really
different.
H 0 : 1 = 2
W = (−, −u /2 ) (u /2 , +)
H1 : 1 2
= ( −, −1.96 ) (1.96, + )
X1 − X 2 3,3 − 2,5
G= = = 3,33 W
2 2 2 2
0, 4 0, 4 0, 4 0, 4
+ +
n1 n2 5 6
2.3 Test for a probability value
( f − p0 ) n
H 0 : p = p0 G= N (0,1)
p0 (1 − p0 )
H 0 : p = p0
H1 : p p0 W = (u , +)
H 0 : p = p0
H1 : p p0 W = (−, −u )
H 0 : p = p0
H1 : p p0
W = (−, −u /2 ) (u /2 , +)
Ex
The traffic police agency said that 62% of
motorcyclists on the road carried a license,
randomly checking 130 motorcyclists found 68
people carrying a license. At 1% significance level,
does this data show that the percentage of
people carrying a driving license is lower than
62%?
H 0 : p = p0
H1 : p p0 W = (−, −u ) = ( −, −1.645 )
H0 : p1 = p2
m1 m2 m1 + m 2
f1 = , f2 = ,f =
n1 n2 n1 + n 2
f1 − f2
G= N (0,1)
1 1
f (1 − f ) +
n1 n 2
H 0 : p1 = p2
W = (u , +)
H1 : p1 p2
H 0 : p1 = p2
H1 : p1 p2 W = (−, −u )
H 0 : p1 = p2
H1 : p1 p2 W = (−, −u /2 ) (u /2 , +)
Ex:
0
2
0
H 0 : =
2 2
0
H : 2
= 2
H 0 : = 0
2 2
W = ( − , 2(n −1)
− ) ( 2(n −1)
, + )
H1 : 0
1 /2 /2
2 2
H 0 : = 0
2 2
W = (
2(n −1)
, +)
H1 : 0
2 2
H 0 : =
2 2
0
W = ( − , 2(n −1)
− )
H1 : 0
1
2 2
0
H : 2
= 2
0
H1 : 0
2 2
S 2
G= F (n1 − 1, n 2 − 1) if H0 is true
1
S 2
2
H 0 : =
2 2
1
W
2
= f (
(n1 −1,n 2 −1)
; + )
H1: 1 2
2 2
H 0 : 1 = 2
2 2
(
W = −; f (n1 −1,n 2 −1)
1− /2 )(f(n1 −1,n 2 −1)
/2 ; + )