(distributions of sample statistics)hosting03.snu.ac.kr/~hokim/int/2019/chap_5.pdf ·...

27
5. 몇 가지 중요한 표집분포 (distributions of sample statistics)

Upload: lethuy

Post on 20-Mar-2019

214 views

Category:

Documents


0 download

TRANSCRIPT

5. 몇 가지 중요한 표집분포(distributions of sample

statistics)

5.1 표집분포(sampling distribution)

• 표집분포(sampling distribution)

어떤 모집단에서 무작위로 뽑은 표본에서 계산한통계량이 가질 수 있는 값들의 분포를 통계량의 표집분포라고 한다.

1. 유한모집단으로부터 크기가 n인 모든 가능한 표본을 추출한다. (Select a sample(size=n) from a population

2. 각 표본으로부터 관심 통계량을 계산한다. (Calculate a statistic from each sample)

3. 이렇게 계산한 통계량의 각 관측값별 빈도를 계산한다. (Repeat this many times, We can have a distribution of the sample statistic )

5.2 표본평균의 분포(distribution of the sample mean)

Ex.5.2.1

𝑥1=10, 𝑥2=20, 𝑥3=30, 𝑥4=40, 𝑥5=50, n=2

𝑁 = 5

𝜇 = 𝑥𝑖/𝑁 = 30 , σ2= ( 𝑥𝑖−𝜇 )2

𝑁=

1000

5= 200

𝑆2 = ( 𝑥𝑖−𝜇 )2

𝑁−1=

1000

4= 250

크기가 2인 표본의 분포와 평균(All possible samples with size=2)

2nd sample

10 20 30 40 50

1st

sample

10 10,10

(10)

10,20

(15)

10,30

(20)

10,40

(25)

10,50

(30)

20 20,10

(15)

20,20

(20)

20,30

(25)

20,40

(30)

20,50

(35)

30 30,10

(20)

30,20

(25)

30,30

(30)

30,40

(35)

30,50

(40)

40 40,10

(25)

40,20

(30)

40,30

(35)

40,40

(40)

40,50

(45)

50 50,10

(30)50,20

(35)

50,30

(40)

50,40

(45)

50,50

(50)

𝒙 도수 상대도수

10 1 1/25

15 2 2/25

20 3 3/25

25 4 4/25

30 5 5/25

35 4 4/25

40 3 3/25

45 2 2/25

50 1 1/25

합계 25 1

모집단 분포

표본평균의 분포

𝜇 𝑥 = 𝑥𝑖

𝑁𝑛 =10+15×2+20×3+25×4+⋯+50

25=

750

25= 30= 𝜇

𝒙 도수 상대도수

10 1 1/25

15 2 2/25

20 3 3/25

25 4 4/25

30 5 5/25

35 4 4/25

40 3 3/25

45 2 2/25

50 1 1/25

합계 25 1

𝜎 𝑥2 =

𝑥𝑖−𝜇 𝑥2

𝑁𝑛 =10−30 2+ 15−30 2×2+ 20−30 2×3+⋯+ 50−30 2

25

=2500

25= 100 =

200

2=

𝜎2

n

standard deviation (of the sample mean)

표준오차 (standard error) : SE( 𝑋) = 𝑣𝑎𝑟( 𝑋)*

𝜃: 표본으로부터 계산한 추정량 (estimated parameter

calculated from a sample)

SE( 𝑋) 를 보통 SE라고 하는 경우가 많다. (is usually called SE)

하지만 어떠한 통계량의 SE인지를 밝히는 것이 정확한표현이다.

Standard deviation (SD, σ) : scale parameter of the population

Standard error: SE 𝑋 = 𝑣𝑎𝑟( 𝑋)= σ / 𝑛

: measure of the uncertainty of the sample mean

• 정규분포 모집단에서의 표본추출을 할 때표본평균분포의 특징 (Characteristics of the sample mean sampled from normal dist’n)

1) is normally distributed

2)

3)

XX

22

X n

21 2

2

21 2

2 2 2

Let , , , iid ( , )

(random sample from an independently and identically distributed

normal dist'n)

then, ( , / )

( , )

( ) , ( ) / /

n

n

n

n n

X X X N

X N n

X X X N n n

E X Var X n n n

• 중심극한정리 (Central limit theorem)

sample mean ( ) from a pop with mean and the finite variance is approximately normally distributed with mean and variance when the sample size is large

enough

𝑋−𝜇

σ / 𝑛→ 𝑁(0,1) as 𝑛 → ∞

2 21, 2 , n,

2

X X X a random sample from ?( , ),

Then

( , / ) as . nX N n n

2

2 n

( 30)n

X

• 유한모집단에서 비복원추출로 표본을 뽑을 경우

(w/o replacement from a finite pop)

X

22

1X

N n

n N

𝜇 𝑋 = 𝑥𝑖𝑁𝑛

=15+20+⋯+45

10=

300

10= 30= 𝜇

𝜎 𝑋2 =

𝑥𝑖−𝜇 𝑋2

𝑁𝑛

=750

10=

75=> 𝜎2

𝑛∙𝑁−𝑛

𝑁−1=

200

2∙

5−2

4=75

2nd sample

10 20 30 40 50

1st

sample

1010,10

(10)

10,20

(15)

10,30

(20)

10,40

(25)

10,50

(30)

2020,10

(15)

20,20

(20)

20,30

(25)

20,40

(30)

20,50

(35)

3030,10

(20)

30,20

(25)

30,30

(30)

30,40

(35)

30,50

(40)

4040,10

(25)

40,20

(30)

40,30

(35)

40,40

(40)

40,50

(45)

50 50,10

(30)50,20

(35)

50,30

(40)

50,40

(45)

50,50

(50)

유한모집단 보정계수(finite population correction factor)

<Ex 5.2.2>

인간집단에서 두개골 길이 평균 185.6mm, 표준편차 12.7 로 정규분포, 이 모집단에서 크기 10인 확률표본의 평균치가 190보다 클 확률?

Let’s assume length of human skull is normally distributed with mean 185.6mm, and sd=12.7. Prob (sample mean >190, n=10)

> 1-pnorm(1.10)

[1] 0.1356661

> 1-pnorm(190,mean=185.6,sd=12.7/sqrt(10))

[1] 0.1366286

190 185.61.10

4.02

xxz

n

( 190) ( 1.10) 0.1357P X P Z (a) 모집단 분포; (b) 크기가 10인 표본평균의분포; (c) (b)를 표준화했을 때 표본평균의

분포

(a)

(b)

(C)

*

***par(mfrow=c(2,1))curve(dnorm(x,mean=185.6,sd=12.7), from=150,to=223,ylim=c(0,0.1),main="distribution of the population")curve(dnorm(x,mean=185.6,sd=12.7/sqrt(10)), from=150,to=223,ylim=c(0,0.1),main="distribution of the sample means of size=10")

<Ex 5.2.3> 건강남자 혈청철분치의 평균과 표준편차가각각 100ml당 130과 25mg, 정상남자 50명으로 구성된 확률표본의 평균이 100ml당 120-140 사이일 확률?

Mean and sd=130, 25, sample size=50

Prob of Sample mean (120~140) ?

𝑃 120 ≤ 𝑋 ≤ 140

= 𝑃120 − 130

25/ 50≤

𝑋 − 𝜇 𝑋

𝜎/ 𝑛≤140 − 130

25/ 50

= 𝑃 −2.82 ≤ 𝑍 ≤ 2.82 = 0.9975 − 0.0024 = 0.9951

5.3 두 표본평균간 차이의 분포dist of the difference between the two sample means

• 두 표본평균간의 차이

확률변수 𝑋의 평균과 분산은 각각 𝜇𝑥, 𝜎𝑥2이고, 𝑌의 평균

과 분산은 𝜇𝑦, 𝜎𝑦2라고 하자. 이때 상수 𝑎, 𝑏에 대하여

𝑎𝑋 + 𝑏𝑌의 평균은 𝑎𝜇𝑥 + 𝑏𝜇𝑦이다. 또한 확률변수 𝑋와 𝑌

가 서로 독립이면, 𝑎𝑋 + 𝑏𝑌의 분산은 𝑎2𝜎𝑥2 + 𝑏2𝜎𝑦

2이다.

𝐸 𝑎𝑋 + 𝑏𝑌 = 𝑎𝜇𝑥 + 𝑏𝜇𝑦

𝑣𝑎𝑟 𝑎𝑋 + 𝑏𝑌 = 𝑎2𝜎𝑥2 + 𝑏2𝜎𝑦

2 if 𝑋 and 𝑌 are

independent

5.3 두 표본평균간 차이의 분포*dist of the difference between the two sample means

• 두 표본평균간의 차이

평균 (𝜇𝑥, 𝜇𝑦), 분산 ( 𝜎𝑥2, 𝜎𝑦

2)인 정규분포를 따르는 모집

단에서 각각(𝑛𝑥, 𝑛𝑦)의 독립적인 표본을 추출하면 두 표

본평균의 차이는 평균과 분산이 각각 (𝜇𝑥- 𝜇𝑦),

(𝜎𝑥2/𝑛𝑥 + 𝜎𝑦

2/𝑛𝑦)인 정규분포를 따른다.

Two normally dist’ed pop’s with means (𝜇𝑥, 𝜇𝑦) and variances

( 𝜎𝑥2, 𝜎𝑦

2): Difference of the two independent sample means with

sample sizes (𝑛𝑥, 𝑛𝑦) is normally distributed with mean (𝜇𝑥- 𝜇𝑦)

and variance (𝜎𝑥2/𝑛𝑥 + 𝜎𝑦

2/𝑛𝑦)

2 21 1 2 2

2 21 2 1 1 2 2

Let ( , ) and ( , ) then

( , / / )

X N Y N

X Y N n n

[비정규분포 모집단으로부터의 표본]*중심극한의 정리 (central limit theorem)

samples from non-normal dist• 두 표본평균간의 차이

두 모집단의 평균이 (𝜇𝑥, 𝜇𝑦), 분산이 ( 𝜎𝑥2, 𝜎𝑦

2) 일때 각각

(𝑛𝑥, 𝑛𝑦)의 독립적인 표본을 추출하면 표본수가 충분한

경우 두 표본평균의 차이는 평균과 분산은 각각 (𝜇𝑥-𝜇𝑦), (𝜎𝑥

2/𝑛𝑥 + 𝜎𝑦2/𝑛𝑦)인 정규분포에 근사한다.

Two pop’s with means (𝜇𝑥, 𝜇𝑦) and variances ( 𝜎𝑥2, 𝜎𝑦

2).

Difference of the two independent sample means with sample sizes (𝑛𝑥, 𝑛𝑦) is approximately normally

distributed with mean (𝜇𝑥- 𝜇𝑦) and variance

(𝜎𝑥2/𝑛𝑥 + 𝜎𝑦

2/𝑛𝑦) for large samples.2 2

1 1 2 2

2 21 2 1 1 2 2

Let ?( , ) and ?( , ) then

( , / / )

X Y

X Y N n n

<Ex 5.3.2>

• 간호사가 질병 A를 앓는 환자의 가정을 방문하는 시간의 평균은 45분이고 표준 편차가 15분이라고 하자. 그리고 질병 B를 앓는 환자의 가정을 방문하는 시간의 평균은 30분이고 표준 편차가 20분이라고 가정하자. 간호사가 질병 A를앓는 환자 35명, 질병 B를 앓는 환자 40명을 방문할 때, 질병 A를 앓는 환자를방문하는 시간과 질병 B를 앓는 환자를 방문하는 시간의 표본평균의 차이가 20분 이상일 확률을 구하라.

Group 1: N(μ1=45,sd=15), n1=35 P 𝑋1 − 𝑋2 > 20 =?

Group 2: N(μ2=30, sd=20), n2=40

𝑃 𝑋1 − 𝑋2 > 20 = 𝑃( 𝑋1− 𝑋2)−(𝜇1−𝜇2)

𝜎12

𝑛1+𝜎22

𝑛2

>20−(𝜇1−𝜇2)

𝜎12

𝑛1+𝜎22

𝑛2

=P(Z>20−15

16.4286)

= P(Z >20−15

4.0532= 1.23)= 0.1093

5.4 표본비율의 분포(Dist’n of sample proportions)

• 표본비율 (sample proportion)

- 표본수 크면(np>5) 중심극한정리 따라 정규분포

large sample (np>5), then use normal dist. by central limit theorem

• 연속성의 보정

(continuity correction)

ˆ

(1 )

p pz

p p

n

.5 .5

, ,c c

x xp p

n nz for x np z for x nppq n pq n

ˆ( )x np

ˆ , )p p(모집단비율 표본비율

<Ex 5.4.2>

여성들 중 51%만이 적절한 산전관리를 받고 있음. 200명의 확률표본을 뽑았을 때, 적절한 산전관리를 받은여성의 비율이 45% 이하일 확률은 얼마인가?

51% women receives appropriate maternal care prior to her delivery. P(45% or less out of 200 women SES receive appropriate care)=?

P 𝑝 < 0.45 = 𝑃 𝑝−0.51

𝑝 1−𝑝

𝑛

<0.45−0.51

0.00125

= 𝑃(𝑍 <0.45−0.51

0.00125) = 𝑃(𝑍 <

−0.06

0.0353= −1.70)=0.0446

5.5 두 표본비율간 차이의 분포Dist’n of the diff of two sample proportions

2

22

1

11

2121

2

22

1

11ˆˆ

2

21ˆˆ

)1()1(

)()ˆˆ(

)1()1(21

21

n

pp

n

pp

ppppz

n

pp

n

pp

pp

pp

pp

<Ex 5.5.2>

75세 이상 성인의 34%, 65세~74세 성인의 26%가 치아가 없다고 한다. 65세~74세 성인 200명, 75세 이상인 성인 250명의 표본에서 치아가 없는 성인의 비율의 차이가 5% 미만일 확률? 34% (age>75) and 26% (age 65~74) adults are toothless. Select 250 (age>75) and 200 (age 65~74). P(difference < 5%)=? (𝑛1𝑝1 > 5, 𝑛2𝑝2 > 5, 𝑛1(1 − 𝑝1) > 5, 𝑛2(1 − 𝑝2) > 5)

𝜇 𝑝1− 𝑝2 = 0.34 − 0.26 = 0.08

𝜎2 𝑝1− 𝑝2 =

𝑝1(1 − 𝑝1)

𝑛1+𝑝2(1 − 𝑝2)

𝑛2=

0.34 (0.66)

250+

0.26 (0.74)

200= 0.00186

𝑃 | 𝑝1 − 𝑝2| < 0.05 = 𝑃 −0.05 < 𝑝1 − 𝑝2 < 0.05

= 𝑃(−0.05−0.08

0.00186<

𝑝1− 𝑝2−(𝑝1−𝑝2)

𝑝1 1−𝑝1𝑛1

+𝑝2 1−𝑝2

𝑛2

<0.05−0.08

0.00186)=𝑃 −3.0143 < 𝑍 < −0.6956 *

> pnorm(−0.6956)-pnorm(-3.0143)

[1] 0.2420518

*일반적인 검정의 형태(Wald’s test)

• 𝑍 = 𝜃−𝐸( 𝜃)

𝑆𝐸( 𝜃)~ 𝑍(0,1)

𝜃:추정치(estimator)

𝜃:모수(parameter)

예) 𝑍 = 𝑋−𝜇

𝜎/ 𝑛=

𝑋−𝐸( 𝑋)

𝑣𝑎𝑟( 𝑋)

The Normal Curve and Galton's Boardby Paul Trow

http://ptrow.com/articles/Galton_June_07.htm

Dice experiment for demonstrating CLT

http://www.math.uah.edu/stat/apps/DiceExperiment.html

clt.example<-function(sample.size){

sapply(1:1000, function(y){ mean( sample(population,sample.size,replace=T))} )

}

population<-rpois(10000,2)

hist(clt.example(1))

hist(clt.example(5))

hist(clt.example(10))

hist(clt.example(15))

hist(clt.example(25))

hist(clt.example(50))