lecture 17 - pkumwfy.gsm.pku.edu.cn/miao_files/probstat/lecture17.pdf · 2020-04-22 · lecture...

Post on 07-Jul-2020

0 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

1

Lecture 17

! The Chi-Square Distribution

! Joint Distribution of the Sample Mean and Sample Variance

! The t Distribution

22

小小的复习:

很多时候,我们通过样本来了解总体。

总体样本

33

基本概念

n 总体与样本n 总体:所有个体的全体

n 样本:观测到的个体

4

为什么需要抽样?

1)总体无法得到。例:光临麦当劳的所有顾客(无限总体)。

2)时间和成本不允许。例:美国总统选举的民意测验。

3)实验具有破坏性。例:测量产品的寿命。

5

统计分析的任务: 通过样本的统计量来了解总体的参数。

n 参数与统计量n 参数:关于总体的度量,如:µ,p,sn 统计量:关于样本的度量,如: , , x p s

样本统计量 总体参数

6

参数的点估计

( )

1

22 2

1

1

1

1 1

1 , =1 0.

n

ii

n

ii

n

i ii

x xn

s x xn

p x p xn

µ

s

=

=

=

= ®

= - ®-

= ®

å

å

å 这里 或

7

考虑到所有可能的样本...

1

2

3

4

M

xxx xx

xL

对不同

的样本,

取值

通常也

不同

8

Estimation Error

n 如:样本均值

( ) ( )

( ) ( )

2 2

2

/

E( ) /

MSE x E x n

SE x E x x n

µ s

s

= - =

= - =

( ) ( )2( ) ( )MSE x E xd d q= -

9

The Chi-square Distribution

! For any given positive integer n, the distribution with n degrees of freedom.

where G is the gamma function defined as

2c

/2 1 /2n/2

1( ) 02 ( / 2)

n xf x x e xn

- -= >G

( ) ( ) 2E X n Var X n= =

0for)(0

1 >=G ò¥ -- aa a dxex x

10

n=2

n=3

n=5n=10

11

Theorem

! If the random variables X1,…,Xk areindependent and if Xi has a distributionwith ni degrees of freedom (i=1,…,k), then thesum X1+…+Xk has a distribution withn1+…+nk degrees of freedom.

2c

2c

12

Relation of the distribution with the Normal Distribution

! If a random variable X has a standard normal distribution, then the random variablewill have a distribution with one degree of freedom.

2c

2XY =

2c

13

Relation of the distribution with the Normal Distribution

! If a random variable X has a standard normal distribution, then the random variablewill have a distribution with one degree of freedom.Proof. For any y>0,

2c

2XY =

21

221

2

21)(

21)()(

21)(

21)()()(

)()()()()(

cp

pff

ff

FF

~eyyf

eyy

yy

yyy'Fyf

yyyXyPryYPryF

/y/

/y

--

-

=-=

-+==

--=££-=£=

2c

14

Theorem

! If the random variables X1,…,Xn are i.i.d., and if each has a standard normal distribution, then the sum of squareshas a distribution with n degrees of freedom.

2c

2 21 nX X+ +L

15

Example. Acid Concentration in Cheese

! The variation in concentrations of chemicals like lactic acid can lead to variation in the taste of cheese. Suppose that we model the concentration of lactic acid in several chunks of cheese as independent normal random variables with mean µ and variance .

! Let X1,…,Xn be the concentrations in n chunks, and let Zi=(Xi -µ)/s, then

is one measure of how much the n concentrations differ from µ. Suppose that a difference of u or more in lactic acid concentration is enough to cause a noticeable difference in taste. We wish to calculate

2s

åå==

=-=n

ii

n

ii Z

nX

nY

1

22

1

2||1 sµ

)Pr( 2uY £

16

! Suppose , and n=10, u=0.3,09.02 =s

2

1

22 ~/ n

n

iiZnYW cs å

=

==

56.0)10Pr(09.03.010Pr)3.0Pr(2

2 =£=÷÷ø

öççè

æ ´£=£ WWY

17

Joint Distribution of the Sample Mean and Sample Variances

! Theorem. Suppose that X1,…,Xn form a random sample from a normal distribution with mean µ and variance . Then the sample mean and the sample variance

are independent random variables, and

2s

nX( ) ( ) Unbiasedfrom

11or MLE from 1

1

2

1

2 åå ==-

--

n

i nin

i ni XXn

XXn

( ) 21

21

2

2

-=å -

÷÷ø

öççè

æ

nn

i ni

n

~/XX

n,N~X

cs

18

The t Distribution! Consider two independent random variables

Y and Z, such that Z has a standard normal distribution and Y has a distribution with ndegrees of freedom. Suppose a random variable X is defined by

Then the distribution of X is called the t distribution with n degrees of freedom.

nYZX/

=

2c

19

The p.d.f.! Let W=Y, then

! Since

WYnWXZ ==

¥<<¥-÷÷ø

öççè

æ+

÷øö

çèæG

÷øö

çèæ +

G==

úû

ùêë

é÷÷ø

öççè

æ+-

G=

•÷÷ø

öççè

æ-

G=

÷÷ø

öççè

æ-

G==

+-¥

-++

--+

--

ò xnx

nn

n

dwwxfxg

wnxw

nn

nww

nxew

nwxf

zeyn

zfyfzyf

n

nn

wnn

ynn

2/)1(2

0

212/)1(

2/)1(

22/12/

2/)1(

22/12/

2/

1

2

21

),()(

121exp

)2/(21

21exp

)2/(21),(

2exp

21

)2/(21)()(),(

p

p

p

p

20

Relation to the Normal Distribution

! When , g(x) converges to the p.d.f. f(x) of the standard normal distribution for every value of x.

! When n is large, the t distribution with n degrees of freedom can be approximated by the standard normal distribution.

¥®n

21

n=1 (Cauchy)n=2n=5n=10

¥=n (normal)

22

Mean and Variance of the t Distribution

! The mean does not exist when n=1. It exists and is equal to 0 for any value of n>1.

! If X has a t distribution with n degrees of freedom (n>2), then Var(X)=n/(n-2).

23

Relation to Random Samples from a Normal Distribution

! Suppose that X1,…,Xn form a random sample from a normal distribution with mean µ and variance . Since

and they are independent of each other,

2s

( ) ( )

( ) 21

21

2

2

~/

)10(~/,~

-=å -

nn

i ni

nn

XX

,NXnnNX

css

µsµ

( )

( )( )( ) 1

1

221

2

11

-

==

-

-

-=

-

-

-

=åå

nn

i ni

nn

i ni

n

t~

nXX

Xn

n/XX

Xn

U µ

ss

µ

24

! Define

They are often referred to as sample variance and sample standard deviation.

! When the variance is known,

when it is unknown, we can replace by S,

They can be used to make statistical inferenceabout µ.

( )221

11

ni ni

S X Xn =

= -- å

2s

( ) )10( ,N~Xn n

sµ-

s

( )1~n

n

n Xt

-

-

top related