Assumptions for pooled-variance t

advertisement
May 1st
One last test to learn
Pooled-variance t-test
-
Pivotal Quantity method
Likelihood Ratio test
Comparing two population means
Example.
There are 2 populations. The first population is about men and the second is about women.
Paired sample approach
Pair 1
Pair 2
Pair 3
…
Population 1
[Sample 1]
150
137
172
…
Population 2
[Sample 2]
140
167
155
…
Paired difference
There can be three cases.
 H 0 : M  W
 H 0 : d  0( M  W )


 H a : M  W
 H a : d  0
 H 0 : M  W
 H 0 : d  0( M  W )


 H a : M W
 H a : d 0
 H 0 : M  W
 H 0 : d  0( M  W )


 H a : M W
 H a : d 0
Data for d is “paired difference” in the above example.
The confidence Interval for d  the confidence interval for ( M  W )
10
-30
17
…
“unpaired data” [Independent Samples]
Population 1 (Men)
[Sample 1]
Population 2 (Women)
[Sample 2]
X1
Y1
X2
Y2
…
…
X n1
Yn2
Assumptions for pooled-variance t-test for Independent Samples
1. Both populations are normal
i .i .d .
X i ~ N ( 1 ,  12 ), i  1,
, n1
i .i .d .
Yi ~ N ( 2 ,  22 ), i  1,
, n2
The normality of the population can be verified by Shapiro-Wilk test.
2. The population variances are unknown but equal. ( 12   22   2 )
The equality of the variances can be verified by F-test
3. The two samples are independent.
Pivotal Quantity method for Independent Samples
1. Parameter of interest
1  2 (or
1
)
2
2. Point estimator for the parameter of interest
X  Y (or
X
)
Y
X  Y ~ N ( 1  2 ,
 12
n1

 22
n2
) ~ N ( 1  2 ,  2 (
1 1
 ))
n1 n2
The ratio is not used because it is very hard to figure out the point estimator.
3.
Z
X  Y  ( 1  2 )
~ N (0,1)
1 1


n1 n2
Z is not a pivotal quantity for ( 1  2 ) since  is an unknown variable.

~  n21 1 


4.
 independent
2
(n2  1) S2
2
W2 
~  n2 1 
2


W  W1  W2 ~ n21 n2 2
W1 
(n1  1) S12
2
5. W1 , W2 , X , and Y are independent.
Thus, W and Z are independent.
T

Z
~ tn1  n2  2
W
n1  n2  2
X  Y  ( 1   2 )
1 1
Sp

n1 n2
(n1  1) S12  (n2  1) S22
where S p 
n1  n2  2
S p is called the pooled-variance.
6. 100(1   )% confidence interval for ( 1  2 ) :
X  Y  tn1  n2 2, 2  S p
1 1

n1 n2
7. Test
 H 0 : 1  2  0

 H a : 1  2 0
 H 0 : 1  2  0

 H a : 1  2 0
Actually, 0 can be any value ( c ) .
 H 0 : 1  2  0

 H a : 1  2  0
Test statistic : T0 
X  Y  0 H0
~ tn1  n2  2
1 1
Sp

n1 n2
tn1  n2  2, at significance level  .
For the first case, we reject H 0 if T0
tn1  n2  2, at significance level  .
For the second case, we reject H 0 if T0
For the last case, we reject H 0 if T0
tn1 n2 2, 2 at significance level  .
Likelihood Ratio Test for Independent Samples
 H 0 : 1  2  0

 H a : 1  2  0
Data
i .i .d .
X i ~ N ( 1 ,  12 ), i  1,
, n1
i .i .d .
Yi ~ N ( 2 ,  22 ), i  1,
, n2
1. Likelihood without any restriction
L  f ( x1 , x1 ,
, yn2 ; 1, 2 ,  2 )
, xn1 , y1, y2 ,
n1
n2
i 1
i 1
  f ( xi )   f ( yi )
n1

i 1

1
2 2
 (2 )
2

( xi  1 )2
e
n1  n2
2
2 2
n2

1
2 2
 ( xi  1 )2   ( yi  2 )2


e
( yi  2 )2
2 2
i 1
e
2 2
( xi  1 )2  ( yi  2 )2
 n1  n2 

2
l  ln L   
 ln(2 ) 
2 
2 2

 l

   0
 ˆ  X
 1
 1
 l

 0   ˆ 2  Y


  2
2
2
ˆ 2   ( X i  1 )   (Yi  2 )
 l

 2 0
n1  n2
 
max L  L( ˆ1 , ˆ 2 , ˆ 2 )
( 1 , 2 , 2 )
2. Likelihood under H 0
L0  f ( x1 , x1 ,
n1

i 1

1
2
 (2 2 )

, yn2 ; ,  2 )
, xn1 , y1 , y2 ,
2
n1  n2
2
( xi   )2
2
e
2
n2

i 1
e


( xi   )2 


1
2
2
e
( yi   )2
2 2
( yi   )2
2 2
 n n 
 ( xi   )2  ( yi   )2
l0  ln L0    1 2  ln(2 2 ) 
2 
2 2


n1 X  n2 Y
 l

0
 ˆ 0 
 
n1  n2

 

2
2
ˆ 2   ( X i  ˆ 0 )   (Yi  ˆ 0 )
 l  0
 0
  2
n1  n2

max L0  L0 ( ˆ 0 , ˆ 02 )
( ˆ 0 ,ˆ 02 )
3. Likelihood Ratio
LR 
max L0
( ˆ 0 ,ˆ 02 )
max2 L
1
( 1 , 2 , )
At significance level
 , we reject H 0 if LR  c
  P(Reject H 0 | H 0 )
 P( LR  c | H 0 : 1  2  0)
LR test  At
 , we reject H 0 if T0
tn1 n2 2, 2 (Pivotal Quantity method)
Therefore, the LR test and the PQ method are the same.
Download