34
두 모집단의 비교 Inference about two populations

Inference about two populations - KOCWcontents.kocw.net/KOCW/document/2013/koreasejong/Ryu...Inference about two populations 학습내용 두 모분산의 비교 두 모평균의 비교

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Inference about two populations - KOCWcontents.kocw.net/KOCW/document/2013/koreasejong/Ryu...Inference about two populations 학습내용 두 모분산의 비교 두 모평균의 비교

두 모집단의 비교

Inference about

two populations

Page 2: Inference about two populations - KOCWcontents.kocw.net/KOCW/document/2013/koreasejong/Ryu...Inference about two populations 학습내용 두 모분산의 비교 두 모평균의 비교

학습내용

두 모분산의 비교

두 모평균의 비교

모집단이 독립이 경우

모분산이 같은 경우

모분산이 다른 경우

모집단이 종속인 경우

두 모비율의 비교

류문찬 [email protected]

Page 3: Inference about two populations - KOCWcontents.kocw.net/KOCW/document/2013/koreasejong/Ryu...Inference about two populations 학습내용 두 모분산의 비교 두 모평균의 비교

두 모분산의 비교

류문찬 [email protected]

Page 4: Inference about two populations - KOCWcontents.kocw.net/KOCW/document/2013/koreasejong/Ryu...Inference about two populations 학습내용 두 모분산의 비교 두 모평균의 비교

활용

계측기기의 정확성

제조공정의 안정성

평가방식의 변별력

투자대안의 위험도(risk)

two-sample t-test

류문찬 [email protected]

Page 5: Inference about two populations - KOCWcontents.kocw.net/KOCW/document/2013/koreasejong/Ryu...Inference about two populations 학습내용 두 모분산의 비교 두 모평균의 비교

가정

두 모집단이 서로 독립

정규분포

류문찬 [email protected]

Page 6: Inference about two populations - KOCWcontents.kocw.net/KOCW/document/2013/koreasejong/Ryu...Inference about two populations 학습내용 두 모분산의 비교 두 모평균의 비교

F 분포

).1,1(~/

/212

2

2

2

2

1

2

1 nnFS

SF

),(~2

111 NX

n1

),(~2

222 NX

n2 2

1S2

2S

류문찬 [email protected]

Page 7: Inference about two populations - KOCWcontents.kocw.net/KOCW/document/2013/koreasejong/Ryu...Inference about two populations 학습내용 두 모분산의 비교 두 모평균의 비교

F 분포 ...

F(m,n)

류문찬 [email protected]

Page 8: Inference about two populations - KOCWcontents.kocw.net/KOCW/document/2013/koreasejong/Ryu...Inference about two populations 학습내용 두 모분산의 비교 두 모평균의 비교

Excel 함수- Office 2010

확률

P(F<a) = f.dist(a,m,n,true)

P(F>a) = f.dist.rt(a,m,n)

F 값

P(F>a) = 인 a=F(m,n)

a = f.inv(1- ,m,n)

a = f.inv.rt(, m,n)

m=5, n=10

P(F<3.33) = f.dist(3.33,5,10,true)=0.9502

P(F>a)=0.05 인 a = f.inv(0.95,5,10)=3.3258

F(m,n)

류문찬 [email protected]

Page 9: Inference about two populations - KOCWcontents.kocw.net/KOCW/document/2013/koreasejong/Ryu...Inference about two populations 학습내용 두 모분산의 비교 두 모평균의 비교

검정통계량

),(~2

111 NX

n1

),(~2

222 NX

n2

2

1S2

2S

true.is H if )1,1(~/

:

021

2

2

2

1

2

2

2

10

nnFSSF

H

)1,1(~/

/212

2

2

2

2

1

2

1 nnFS

SF

류문찬 [email protected]

Page 10: Inference about two populations - KOCWcontents.kocw.net/KOCW/document/2013/koreasejong/Ryu...Inference about two populations 학습내용 두 모분산의 비교 두 모평균의 비교

가설검정

류문찬 [email protected]

For ②

For For ①

검정통계량

귀무가설

).1,1(or

)1,1( ifHreject ,:HFor (3)

).1,1( ifHreject ,:HFor )2(

).1,1( ifHreject ,:HFor (1)

:

212/1

212/ 0

2

2

2

11

211 0

2

2

2

11

21 0

2

2

2

11

2

2

2

1

2

2

2

10

nnFF

nnFF

nnFF

nnFF

S

SF

H

검정통계량

Page 11: Inference about two populations - KOCWcontents.kocw.net/KOCW/document/2013/koreasejong/Ryu...Inference about two populations 학습내용 두 모분산의 비교 두 모평균의 비교

기각역

류문찬 [email protected]

).1,1( ifHreject ,:HFor 2112

2

2

1 0

2

2

2

11 nnFS

SF

),(),(

1

1

mnFnmF

).1,1()1,1(

11 12

211

2

1

2

2

nnFnnFS

S

F

).1,1( ifHreject ,:HFor 122

1

2

2 0

2

1

2

21 nnFS

SF

Page 12: Inference about two populations - KOCWcontents.kocw.net/KOCW/document/2013/koreasejong/Ryu...Inference about two populations 학습내용 두 모분산의 비교 두 모평균의 비교

가설검정

류문찬 [email protected]

For ②

For For ①

검정통계량

귀무가설

.)1,1( ifHreject ,:HFor (3)

).1,1( ifHreject ,:HFor )2(

).1,1( ifHreject ,:HFor (1)

:

2/2

2

0

2

2

2

11

122

1

2

2 0

2

1

2

21

212

2

2

1 0

2

2

2

11

2

2

2

10

SL

S

L nnFS

S

nnFS

S

nnFS

S

H

Page 13: Inference about two populations - KOCWcontents.kocw.net/KOCW/document/2013/koreasejong/Ryu...Inference about two populations 학습내용 두 모분산의 비교 두 모평균의 비교

Solution Template

선택

H0:

H1:

test statistic :

= , n1=n2=

Critical Value(s):

계산

통계량 :

검정통계량 값:

p 값 :

Decision:

해석

류문찬 [email protected]

Page 14: Inference about two populations - KOCWcontents.kocw.net/KOCW/document/2013/koreasejong/Ryu...Inference about two populations 학습내용 두 모분산의 비교 두 모평균의 비교

류문찬 [email protected]

두 모평균의 비교: 독립표본

Page 15: Inference about two populations - KOCWcontents.kocw.net/KOCW/document/2013/koreasejong/Ryu...Inference about two populations 학습내용 두 모분산의 비교 두 모평균의 비교

두 모평균 차의 분포

분포? 의 21 XX

?~//

)()(

2

2

21

2

1

2121

nn

XXZ

n1

),(~2

222 NX

n2

) , ( ~ 2

1 1 1 N X

류문찬 [email protected]

Page 16: Inference about two populations - KOCWcontents.kocw.net/KOCW/document/2013/koreasejong/Ryu...Inference about two populations 학습내용 두 모분산의 비교 두 모평균의 비교

(A) 1=2일 때(등분산 가정)

.2

)1()1( where

)2(~/1/1

)()(

21

2

22

2

112

21

21

2121

nn

SnSnS

nntnnS

XXT

p

p

true.is H if )2(~/1/1

:H

021

21

021

0210

nntnnS

DXXT

D

p

pooled estimator of 2

(합동 추정치)

류문찬 [email protected]

)1,0(~/1/1

)()(

//

)()(

21

2121

2

2

21

2

1

2121 Nnn

XX

nn

XXZ

Page 17: Inference about two populations - KOCWcontents.kocw.net/KOCW/document/2013/koreasejong/Ryu...Inference about two populations 학습내용 두 모분산의 비교 두 모평균의 비교

추론: 1=2일 때(등분산 가정)

).2(|| ifHreject ,:HFor (3)

).2( ifHreject ,:HFor )2(

).2( ifHreject ,:HFor (1)

2

)1()1(,

/1/1

:

212/ 00211

21 00211

21 00211

21

2

22

2

11

21

021

0210

nnttD

nnttD

nnttD

nn

snsns

nns

Dxxt

DH

p

p

류문찬 [email protected]

21212/21 /1/1)2( nnsnntxx p 신뢰구간 :

Page 18: Inference about two populations - KOCWcontents.kocw.net/KOCW/document/2013/koreasejong/Ryu...Inference about two populations 학습내용 두 모분산의 비교 두 모평균의 비교

검정순서

F 검정(분산을 같다고 볼 수 있는가?)

t 검정

류문찬 [email protected]

34.43,49.37

,72.3,63.6

2

2

2

1

21

ss

xx

Page 19: Inference about two populations - KOCWcontents.kocw.net/KOCW/document/2013/koreasejong/Ryu...Inference about two populations 학습내용 두 모분산의 비교 두 모평균의 비교

Solution Template

선택

H0:

H1:

test statistic :

= , n1 =n2=

Critical Value(s):

계산

통계량 :

검정통계량 값:

p 값 :

Decision:

해석

류문찬 [email protected]

Page 20: Inference about two populations - KOCWcontents.kocw.net/KOCW/document/2013/koreasejong/Ryu...Inference about two populations 학습내용 두 모분산의 비교 두 모평균의 비교

(B) 12일 때(이분산 가정)

).(|| ifHreject ,:HFor (3)

).( ifHreject ,:HFor )2(

).( ifHreject ,:HFor (1)

1

)/(

1

)/(

)//( with ,

:

2/ 00211

00211

00211

2

2

2

2

2

1

2

1

2

1

2

2

2

21

2

1

2

2

2

1

2

1

021

0210

mttD

mttD

mttD

n

ns

n

ns

nsnsm

n

s

n

s

Dxxt

DH

류문찬 [email protected]

//)( 2

2

21

2

12/21 nsnsmtxx 신뢰구간 :

Page 21: Inference about two populations - KOCWcontents.kocw.net/KOCW/document/2013/koreasejong/Ryu...Inference about two populations 학습내용 두 모분산의 비교 두 모평균의 비교

검정순서

F 검정(분산을 같다고 볼 수 있는가?)

t 검정

류문찬 [email protected]

Page 22: Inference about two populations - KOCWcontents.kocw.net/KOCW/document/2013/koreasejong/Ryu...Inference about two populations 학습내용 두 모분산의 비교 두 모평균의 비교

Excel output

F-검정: 분산에 대한 두 집단

Offspring Outsider

평균 -0.1 1.236

분산 3.787 8.035

관측수 42 98

자유도 41 97

F 비 0.471

P(F<=f) 단측 검정 0.004

F 기각치: 단측 검정 0.631

류문찬 [email protected]

t-검정: 이분산 가정 두 집단

Offspring Outsider

평균 -0.1 1.236

분산 3.787 8.035

관측수 42 98

가설 평균차 0

자유도 111

t 통계량 -3.220

P(T<=t) 단측 검정 0.001

t 기각치 단측 검정 1.659

P(T<=t) 양측 검정 0.002

t 기각치 양측 검정 1.982 2

1

2

21 :H

데이터-데이터분석-F검정 데이터-데이터분석-t검정: 이분산가정 두집단

Page 23: Inference about two populations - KOCWcontents.kocw.net/KOCW/document/2013/koreasejong/Ryu...Inference about two populations 학습내용 두 모분산의 비교 두 모평균의 비교

두 모평균의 비교: 독립표본 (요약)

).(|| ifHreject ,:HFor (3)

).( ifHreject ,:HFor )2(

).( ifHreject ,:HFor (1)

2/ 00211

00211

00211

mttD

mttD

mttD

1

)/(

1

)/(

)//(

,//

2

2

2

2

2

1

2

1

2

1

2

2

2

21

2

1

2

2

21

2

1

021

n

ns

n

ns

nsnsm

nsns

Dxxt

: 0210 DH

2

2

)1()1(

,/1/1

21

21

2

22

2

11

21

021

nnm

nn

snsns

nns

Dxxt

p

p

?)1,1(/ 2/

22 SLSL nnFSS

yes no

등분산?

Page 24: Inference about two populations - KOCWcontents.kocw.net/KOCW/document/2013/koreasejong/Ryu...Inference about two populations 학습내용 두 모분산의 비교 두 모평균의 비교

가정의 검토

가정: 두 모집단이 정규분포를 따른다.

가정에 위배될 경우

등분산 : Wilcoxon rank-sum test(비모수검정)

이분산 : 없음

류문찬 [email protected]

Page 25: Inference about two populations - KOCWcontents.kocw.net/KOCW/document/2013/koreasejong/Ryu...Inference about two populations 학습내용 두 모분산의 비교 두 모평균의 비교

두 모평균의 비교 : 대응비교

류문찬 [email protected]

Page 26: Inference about two populations - KOCWcontents.kocw.net/KOCW/document/2013/koreasejong/Ryu...Inference about two populations 학습내용 두 모분산의 비교 두 모평균의 비교

예제

새로운 종류의 비료가 현재 사용되는 비료보다 더 효과적인지를 결정하기 위해 전국적으로 흩어져 있는 12개의 2에이커 토지를 선택하였다. 각 2에이커 토지는 동일한 크기로 둘로 분할하였다. 분할된 토지에는 각각 현재의 비료와 새로운 비료를 사용하여 밀을 재배한 후 수확량을 측정하였다.

토지 1 2 3 4 5 6 7 8 9 10 11 12

현재의 비료

56 45 68 72 61 69 57 55 60 72 75 66

새로운 비료

60 49 66 75 62 71 61 60 62 75 77 68

류문찬 [email protected]

Page 27: Inference about two populations - KOCWcontents.kocw.net/KOCW/document/2013/koreasejong/Ryu...Inference about two populations 학습내용 두 모분산의 비교 두 모평균의 비교

두 모집단의 비교(독립성 가정)

류문찬 [email protected]

t-검정: 등분산 가정 두 집단

현재의 비료 새로운 비료

평균 63.000 65.500

분산 78.364 66.091

관측수 12.000 12.000

공동(Pooled) 분산 72.227

가설 평균차 0.000

자유도 22.000

t 통계량 0.721

P(T<=t) 단측 검정 0.239

t 기각치 단측 검정 1.717

P(T<=t) 양측 검정 0.479

t 기각치 양측 검정 2.074

Page 28: Inference about two populations - KOCWcontents.kocw.net/KOCW/document/2013/koreasejong/Ryu...Inference about two populations 학습내용 두 모분산의 비교 두 모평균의 비교

대응비교

.1

)( where

true,is H if )1(~/

:H

Let

2

2

0

0

n

xxs

ntns

DxT

D

YWX

j

YW

iii

류문찬 [email protected]

Page 29: Inference about two populations - KOCWcontents.kocw.net/KOCW/document/2013/koreasejong/Ryu...Inference about two populations 학습내용 두 모분산의 비교 두 모평균의 비교

대응비교 ...

류문찬 [email protected]

토지 1 2 3 4 5 6 7 8 9 10 11 12

현재의 비료

56 45 68 72 61 69 57 55 60 72 75 66

새로운 비료

60 49 66 75 62 71 61 60 62 75 77 68

차이 4 4 -2 3 1 2 4 5 2 3 2 2

000.0

722.412/834.1

0.05.2

/

0

834.1,5.2

valuep

ns

xt

sx

Page 30: Inference about two populations - KOCWcontents.kocw.net/KOCW/document/2013/koreasejong/Ryu...Inference about two populations 학습내용 두 모분산의 비교 두 모평균의 비교

가정의 검토

가정: 두 모집단의 차이가 정규분포를 따른다.

가정에 위배될 경우

Wilcoxon signed rank-sum test

류문찬 [email protected]

Page 31: Inference about two populations - KOCWcontents.kocw.net/KOCW/document/2013/koreasejong/Ryu...Inference about two populations 학습내용 두 모분산의 비교 두 모평균의 비교

두 모비율의 비교

류문찬 [email protected]

Page 32: Inference about two populations - KOCWcontents.kocw.net/KOCW/document/2013/koreasejong/Ryu...Inference about two populations 학습내용 두 모분산의 비교 두 모평균의 비교

두 모비율의 비교

DppH 210 :

류문찬 [email protected]

),(~ 111 pnBX ),(~ 222 pnBX

n1 n2

1

11ˆ

n

xp

2

22ˆ

n

xp

Page 33: Inference about two populations - KOCWcontents.kocw.net/KOCW/document/2013/koreasejong/Ryu...Inference about two populations 학습내용 두 모분산의 비교 두 모평균의 비교

검정통계량

)(0 if )11

)(1(

0 if )1()1(

)ˆˆ(

)ˆˆ(

21

21

21

2

22

1

1121

2121

pppDnn

pp

ppDn

pp

n

ppppV

ppppE

0.D when (0,1) ~ /1/1)1(

)ˆˆ(

0D when )1,0(~)1()1(

)ˆˆ(

21

21

2

22

1

11

21

Nnnpp

pp

N

n

pp

n

pp

DppZ

류문찬 [email protected]

Page 34: Inference about two populations - KOCWcontents.kocw.net/KOCW/document/2013/koreasejong/Ryu...Inference about two populations 학습내용 두 모분산의 비교 두 모평균의 비교

추론

류문찬 [email protected]

2

22

1

11

21

210

)ˆ1(ˆ)ˆ1(ˆ

)ˆˆ(

)0(:

n

pp

n

pp

Dppz

DppH

2

22

1

112/21

)ˆ1(ˆ)ˆ1(ˆˆˆ

n

pp

n

ppzpp

신뢰구간 :

21

21

21

2211

21

21

210

ˆˆˆ

/1/1)ˆ1(ˆ

ˆˆ

0:

nn

xx

nn

pnpnpwhere

nnpp

ppz

DppH

.|| ifHreject ,:HFor (3)

. ifHreject ,:HFor )2(

. ifHreject ,:HFor (1)

2/ 0211

0211

0211

zzDpp

zzDpp

zzDpp

pooled

estimator