Professional Documents
Culture Documents
010 Class 17
Testing Hypotheses about Two Populations
Null hypothesis:
H0: ax = ay = a0 or ax - ay = 0
aˆ x = aˆ x ( x1 , x 2 ,..., x Nx )
aˆ y = aˆ y ( x1 , x 2 ,..., x Ny )
(aˆ x - aˆ y ) − (a x − a y )
z (aˆ x , aˆ y , a x , a y ) =
SD[aˆ x - aˆ y ]
(aˆ x - aˆ y )
z (aˆ x , aˆ y , a 0 , a 0 ) =
SD[aˆ x - aˆ y ]
α
R z0 : z (aˆ x , aˆ y , a0 , a0 ) ≤ z L = Fz-1 ( )
2
α
z (aˆ x , aˆ y , a0 , a0 ) ≥ zU = Fz-1 (1 - )
2
1
α
Ra 0 : aˆ x − aˆ y ≤ ∆a L = Fz-1 ( ) SD[aˆ x - aˆ y ]
2
α
aˆ x − aˆ y ≥ ∆aU = Fz-1 (1 - ) SD[aˆ x - aˆ y ]
2
(aˆ x - aˆ y )
1 − p / 2 = Fz [z ] = Fz aˆ x - aˆ y ≥ 0
SD(aˆ )
(aˆ x - aˆ y )
p / 2 = F z [z ] = F z aˆ x - aˆ y ≤ 0
SD(aˆ )
aˆ x - aˆ y
For large samples use normcdf to compute p from .
SD[aˆ ]
Special Case: Large sample test of the difference between two means
σ x2 σ 2y
Var[(m x - m y ) = Var[m x ] + Var[m y ] = + (consistent)
Nx Ny
mx - m y mx - m y
z= ≈
σ x2 σ 2y s x2 s 2y
+ +
Nx Ny Nx Ny
2
α
Ra0 : m x − m y ≤ ∆a L = Fz-1 ( ) SD[m x - m y ]
2
α
m x − m y ≥ ∆aU = Fz-1 (1 - ) SD[m x - m y ]
2
s2 2 −1 / 2
s
1 − p / 2 = Fz ( z ) = Fz (m x − m y ) x +
y
N Ny mx ≥ m y
x
s2 2 −1 / 2
s
p / 2 = Fz ( z ) = Fz (m x − m y ) x +
y
N Ny mx ≤ m y
x
Consider two agricultural fields, one that is fertilized and one that is not. Yield
samples (kg/ha) from the two fields are as follows:
Fertilized (x): 66 41 77 80 52 98 99 74 81 78
Test the hypothesis H0: Mean yields are the same with and without fertilizer
mx = sx = Nx =
my = sy = Ny =
z= p=