Lecture 9 - pku.edu.cnmwfy.gsm.pku.edu.cn/miao_files/ProbStat/lecture9.pdf · 2020. 3. 23. ·...

27
1 Lecture 9 ! Expectation ! Properties of expectation ! Bernoulli, Binomial and Poisson Distributions, and their Expectations

Transcript of Lecture 9 - pku.edu.cnmwfy.gsm.pku.edu.cn/miao_files/ProbStat/lecture9.pdf · 2020. 3. 23. ·...

Page 1: Lecture 9 - pku.edu.cnmwfy.gsm.pku.edu.cn/miao_files/ProbStat/lecture9.pdf · 2020. 3. 23. · Lecture 9!Expectation!Properties of expectation!Bernoulli, Binomial and Poisson Distributions,

1

Lecture 9

! Expectation

! Properties of expectation

! Bernoulli, Binomial and Poisson Distributions, and their Expectations

Page 2: Lecture 9 - pku.edu.cnmwfy.gsm.pku.edu.cn/miao_files/ProbStat/lecture9.pdf · 2020. 3. 23. · Lecture 9!Expectation!Properties of expectation!Bernoulli, Binomial and Poisson Distributions,

2

总体的均值的两种算法

1 2 3 4

[ ] 4 ), 44 1, 2, 3, 4

Nx x x x

=

= = = =

例1设一个总体,含有 个元素(个体 即总体个数 。

个个体分别为 。

1 2 3 4 =2.54

xN

µ + + += =å

(1)观察到总体中所有的元素

( ) ( )2

=1 1 1 1=1 +2 +3 +4 =2.54 4 4 4

E X xf xµ =

´ ´ ´ ´

å( )知道总体分布

Page 3: Lecture 9 - pku.edu.cnmwfy.gsm.pku.edu.cn/miao_files/ProbStat/lecture9.pdf · 2020. 3. 23. · Lecture 9!Expectation!Properties of expectation!Bernoulli, Binomial and Poisson Distributions,

3

1 2 3 4

4 ), 44 1, 2, 2, 3

Nx x x x

=

= = = =

设一个总体,含有 个元素(个体 即总体个数 。 个个体分别为 。请问:总

体的均值是多少?

另一个例子

Page 4: Lecture 9 - pku.edu.cnmwfy.gsm.pku.edu.cn/miao_files/ProbStat/lecture9.pdf · 2020. 3. 23. · Lecture 9!Expectation!Properties of expectation!Bernoulli, Binomial and Poisson Distributions,

4

Expectation of A Random Variable! E. g. Among the population in a town, 20% have an

annual income of 90,000 Yuan, 60% have an annual income of 60,000 Yuan, and the remaining 20% have an annual income of 30,000. What is the average annual income?

! E.g. Supply, Inc. is a supplier for Demand, Inc. 10% of the time, it takes Supply, Inc. 9 days to fill the orders of Demand, Inc.; 50% of the time, it takes 10 days; 40% of the time, it takes 11 days. On average, what is the number of days it takes Supply, Inc. to fill the orders?

000,60%20000,30%60000,60%20000,90 =´+´+´

3.10%4011%5010%109 =´+´+´

Page 5: Lecture 9 - pku.edu.cnmwfy.gsm.pku.edu.cn/miao_files/ProbStat/lecture9.pdf · 2020. 3. 23. · Lecture 9!Expectation!Properties of expectation!Bernoulli, Binomial and Poisson Distributions,

5

! Suppose X has a discrete distribution with p.f. f. The expectation (expected value, mean) of X, is a number defined as:

! Interpretation: • weighted average with probabilities being weights; • average value of X over a large number of

repetitions; • the most common measure of central location for the

distribution of X.

å=x

xxfXE )()(

Page 6: Lecture 9 - pku.edu.cnmwfy.gsm.pku.edu.cn/miao_files/ProbStat/lecture9.pdf · 2020. 3. 23. · Lecture 9!Expectation!Properties of expectation!Bernoulli, Binomial and Poisson Distributions,

6

! If there is an infinite sequence of differentpossible values of X, then the summationconsists of an infinite series of terms, and maynot converge for a given p.f.

! It is said that E(X) exists if and only if thesummation is absolutely convergent, i.e.,

¥<åx

xfx )(||

Page 7: Lecture 9 - pku.edu.cnmwfy.gsm.pku.edu.cn/miao_files/ProbStat/lecture9.pdf · 2020. 3. 23. · Lecture 9!Expectation!Properties of expectation!Bernoulli, Binomial and Poisson Distributions,

7

Expection for Continuous Distributions! Suppose X has a continuous distribution with p.d.f. f,

then the expectation E(X) is defined as:

! It is said that E(X) exists if and only if the integral is absolutely convergent, i.e.

ò¥

¥-= dxxxfXE )()(

¥<ò¥

¥-dxxfx )(||

Page 8: Lecture 9 - pku.edu.cnmwfy.gsm.pku.edu.cn/miao_files/ProbStat/lecture9.pdf · 2020. 3. 23. · Lecture 9!Expectation!Properties of expectation!Bernoulli, Binomial and Poisson Distributions,

8

Example

! Suppose that the p.d.f. of X is

Then

îíì <<

=otherwise

xforxxf

0102

)(

322)2()(

1

0

21

0=== òò dxxdxxxXE

Page 9: Lecture 9 - pku.edu.cnmwfy.gsm.pku.edu.cn/miao_files/ProbStat/lecture9.pdf · 2020. 3. 23. · Lecture 9!Expectation!Properties of expectation!Bernoulli, Binomial and Poisson Distributions,

9

The Expectation of A Function

! The value of E[r(X)] can be calculated as:(X has a discrete dist)

if

or (X has a continuous dist)

if

! Note: the result would be the same if we first derivethe distribution of Y=r(X), and then calculate theexpectation of Y, E(Y).

å=x

xfxrXrE )()()]([

ò¥

¥-= dxxfxrXrE )()()]([

å ¥<x

xfxr )(|)(|

¥<ò¥

¥-dxxfxr )(|)(|

Page 10: Lecture 9 - pku.edu.cnmwfy.gsm.pku.edu.cn/miao_files/ProbStat/lecture9.pdf · 2020. 3. 23. · Lecture 9!Expectation!Properties of expectation!Bernoulli, Binomial and Poisson Distributions,

10

Example

! Suppose that the p.d.f. of X is:

Suppose . Thenîíì <<

=otherwise

xforxxf

0102

)(

?)( =YE2/1XY =

Page 11: Lecture 9 - pku.edu.cnmwfy.gsm.pku.edu.cn/miao_files/ProbStat/lecture9.pdf · 2020. 3. 23. · Lecture 9!Expectation!Properties of expectation!Bernoulli, Binomial and Poisson Distributions,

11

Solution1 1 1/ 2

0 0

2

4(1) ( ) ( ) ( ) (2 )5

(2) Y is a continuous, strictly increasing function for 0 1, with range 0 1. The inverse function is ( ) , for 0 1.

( ) 2

E Y r x f x dx x x dx

XY

X s Y Y Yds y ydy

= = =

< << <

= = < <

=

ò ò

3

1 1 4

0 0

( )[ ( )] , for 0 1, ( )

0, otherwise

4 , for 0 1,

0, otherwise4 ( ) ( ) 4 .5

ds yf s y yg y dy

y y

E Y yg y dy y dy

ì< <ï= í

ïîì < <

= íî

= = =ò ò

Page 12: Lecture 9 - pku.edu.cnmwfy.gsm.pku.edu.cn/miao_files/ProbStat/lecture9.pdf · 2020. 3. 23. · Lecture 9!Expectation!Properties of expectation!Bernoulli, Binomial and Poisson Distributions,

12

Functions of Several Random Variables

! Suppose that the joint p.f. or p.d.f. f(x1,...,xn) ofn random variables X1,...,Xn is given, andY=r(X1,...,Xn). The expected value E(Y) can bedetermined directly through

or 1

1 1, ,

( ) ( , , ) ( , , )n

n nx x

E Y r x x f x x= åL

L L

1 1 1( ) ( , , ) ( , , )n n n nR

E Y r x x f x x dx dx= ò òL L L L

Page 13: Lecture 9 - pku.edu.cnmwfy.gsm.pku.edu.cn/miao_files/ProbStat/lecture9.pdf · 2020. 3. 23. · Lecture 9!Expectation!Properties of expectation!Bernoulli, Binomial and Poisson Distributions,

13

Example

! Suppose a point (X,Y) is chosen at random from the square S containing all points (x,y)such that and . What is the expected value of ?

10 ££ x 10 ££ y22 YX +

Page 14: Lecture 9 - pku.edu.cnmwfy.gsm.pku.edu.cn/miao_files/ProbStat/lecture9.pdf · 2020. 3. 23. · Lecture 9!Expectation!Properties of expectation!Bernoulli, Binomial and Poisson Distributions,

14

Solution:

1 12 2 2 2

0 0

1, if 0 1, 0 1( , )

0, otherwise2( ) ( ) 1 .3

x yf x y

E X Y x y dxdy

£ £ £ £ì= íî

+ = + × =ò ò

Page 15: Lecture 9 - pku.edu.cnmwfy.gsm.pku.edu.cn/miao_files/ProbStat/lecture9.pdf · 2020. 3. 23. · Lecture 9!Expectation!Properties of expectation!Bernoulli, Binomial and Poisson Distributions,

15

Properties of Expectations

! Suppose E(X) exists.

Theorem. If Y=aX+b, where a and b are constants, then E(Y)=aE(X)+b.

Proof. For convenience, suppose X has a continuous distribution.

bXaE

dxxfbdxxxfa

dxxfbaxbaXEYE

+=

+=

+=+=

òòò

¥

¥-

¥

¥-

¥

¥-

)(

)()(

)()()()(

Page 16: Lecture 9 - pku.edu.cnmwfy.gsm.pku.edu.cn/miao_files/ProbStat/lecture9.pdf · 2020. 3. 23. · Lecture 9!Expectation!Properties of expectation!Bernoulli, Binomial and Poisson Distributions,

16

Theorem. If X1,...,Xn are n random variables such thateach expectation E(Xi) exists (i=1,...,n), then

E(X1+...+Xn)=E(X1)+...+E(Xn)

Proof. Suppose first n=2, and X1 and X2 have acontinuous joint distribution with joint p.d.f. f. Then

The theorem can be established for any positiveinteger n by induction.

1 2 1 2 1 2 1 2

1 1 2 1 2 2 1 2 1 2

1 1 2 2 1 2 1 2 1 2

1 1 1 1 2 2 2 2

1 2

( ) ( ) ( , )

( , ) ( , )

( ( , ) ) ( ( , ) )

= ( ) ( )

( ) ( )

E X X x x f x x dx dx

x f x x dx dx x f x x dx dx

x f x x dx dx x f x x dx dx

x f x dx x f x dx

E X E X

¥ ¥

-¥ -¥

¥ ¥ ¥ ¥

-¥ -¥ -¥ -¥

¥ ¥ ¥ ¥

-¥ -¥ -¥ -¥

¥ ¥

-¥ -¥

+ = +

= +

= +

+

= +

ò òò ò ò òò ò ò òò ò

Page 17: Lecture 9 - pku.edu.cnmwfy.gsm.pku.edu.cn/miao_files/ProbStat/lecture9.pdf · 2020. 3. 23. · Lecture 9!Expectation!Properties of expectation!Bernoulli, Binomial and Poisson Distributions,

17

! From the previous two theorems, for any constants a1,...,an and b,

E(a1X1+...+anXn+b)=a1E(X1)+...+anE(Xn)+b

Page 18: Lecture 9 - pku.edu.cnmwfy.gsm.pku.edu.cn/miao_files/ProbStat/lecture9.pdf · 2020. 3. 23. · Lecture 9!Expectation!Properties of expectation!Bernoulli, Binomial and Poisson Distributions,

18

Expectation of a ProductTheorem. If X1,...,Xn are n independent random

variables such that each expectation E(Xi) exists(i=1,...,n), then

Proof. Suppose X1,...,Xn have a continuous jointdistribution with joint p.d.f. f,

ÕÕ==

=n

ii

n

ii XEXE

11

)()(

1 11 1

11

1

1

( , , )

( )

( )

( )

n n

i i n ni i

n

i i i ni

n

i i i iin

ii

E X x f x x dx dx

x f x dx dx

x f x dx

E X

¥ ¥

-¥ -¥= =

¥ ¥

-¥ -¥=

¥

-¥=

=

æ ö æ ö=ç ÷ ç ÷

è ø è øæ ö

= ç ÷è ø

=

=

Õ Õò ò

Õò ò

Õò

Õ

L L L

L L

Page 19: Lecture 9 - pku.edu.cnmwfy.gsm.pku.edu.cn/miao_files/ProbStat/lecture9.pdf · 2020. 3. 23. · Lecture 9!Expectation!Properties of expectation!Bernoulli, Binomial and Poisson Distributions,

19

Example! Suppose X1, X2 and X3 are independent

random variables such that E(Xi)=0 and E( )=1 for i=1,2,3. What is the value of E[ ]?

2iX

232

21 )4( XXX -

Page 20: Lecture 9 - pku.edu.cnmwfy.gsm.pku.edu.cn/miao_files/ProbStat/lecture9.pdf · 2020. 3. 23. · Lecture 9!Expectation!Properties of expectation!Bernoulli, Binomial and Poisson Distributions,

20

Solution! Suppose X1, X2 and X3 are independent

random variables such that E(Xi)=0 and E( )=1 for i=1,2,3. What is the value of E[ ]?

2iX

232

21 )4( XXX -

17161

)()(16)()()(8)()()168(

])4([

23

2132

21

22

21

23

2132

21

22

21

232

21

=+=

+-=

+-=

-

XEXEXEXEXEXEXEXXXXXXXE

XXXE

Page 21: Lecture 9 - pku.edu.cnmwfy.gsm.pku.edu.cn/miao_files/ProbStat/lecture9.pdf · 2020. 3. 23. · Lecture 9!Expectation!Properties of expectation!Bernoulli, Binomial and Poisson Distributions,

21

Bernoulli and Binomial Distributions! Many experiments result in dichotomous

responses --- that is, responses for whichthere exist two possible alternatives, such asYes-No, Pass-Fail, Defective-Nondefective, orMale-Female.

! The experiment is often conducted for a fixednumber n of times, and we are interested inthe number X of times that one of the twopossible outcomes occurs.

Page 22: Lecture 9 - pku.edu.cnmwfy.gsm.pku.edu.cn/miao_files/ProbStat/lecture9.pdf · 2020. 3. 23. · Lecture 9!Expectation!Properties of expectation!Bernoulli, Binomial and Poisson Distributions,

22

The Bernoulli Distribution

! A random variable X has a Bernoulli distribution with parameter p if X can take only the values 0 and 1 with probabilities:

Pr(X=1)=p and Pr(X=0)=q=1-p.

! The p.f. of X can be written as:

! E(X)=p

îíì =

=-

otherwise010for

)|(1 ,xqp

pxfxx

Page 23: Lecture 9 - pku.edu.cnmwfy.gsm.pku.edu.cn/miao_files/ProbStat/lecture9.pdf · 2020. 3. 23. · Lecture 9!Expectation!Properties of expectation!Bernoulli, Binomial and Poisson Distributions,

23

Bernoulli Trials! If n random variables X1,...,Xn are i.i.d., and each

random variable Xi has a Bernoulli distribution withparameter p, then X1,...,Xn form n Bernoulli trials withparameter p.

• E.g. 1. n people are randomly chosen from certainpopulation. Xi=1 if the ith person is female, andXi=0 if the ith person is male.

• E.g. 2. Suppose 10% of the items produced by amachine are defective, and n items are selected atrandom. Xi=1 if the ith item is defective and Xi=0if it is non-defective.

Page 24: Lecture 9 - pku.edu.cnmwfy.gsm.pku.edu.cn/miao_files/ProbStat/lecture9.pdf · 2020. 3. 23. · Lecture 9!Expectation!Properties of expectation!Bernoulli, Binomial and Poisson Distributions,

24

The Binomial Distribution! If the random variables X1,...,Xn form n Bernoulli

trials with parameter p, and if X= X1+…+Xn, then Xhas a Binomial distribution with parameters n and p.

! The p.f. for a random variable having binomialdistribution with parameters n and p is

! E(X)=np

for 0,1, ,( | , )

0 otherwise

x n xnp q x n

f x n p x-ìæ ö

=ïç ÷= íè øïî

L

Page 25: Lecture 9 - pku.edu.cnmwfy.gsm.pku.edu.cn/miao_files/ProbStat/lecture9.pdf · 2020. 3. 23. · Lecture 9!Expectation!Properties of expectation!Bernoulli, Binomial and Poisson Distributions,

25

! The Poisson distribution is often used to describe thetotal number of occurrences of some phenomenonduring a fixed period of time (or within a fixedregion of space).

• The number of telephone calls received at aduring a fixed period of time.

• The number of students who are absent from theprobability and statistics course on Fridays.

• The number of typos on a specified length ofpaper.

The Poisson Distribution

Page 26: Lecture 9 - pku.edu.cnmwfy.gsm.pku.edu.cn/miao_files/ProbStat/lecture9.pdf · 2020. 3. 23. · Lecture 9!Expectation!Properties of expectation!Bernoulli, Binomial and Poisson Distributions,

26

The Poisson Distribution! A nonnegative random variable X has a

Poisson distribution with mean l (l>0) if the p.f.of X is as follows:

Note:

ïî

ïíì

==

-

otherwise0

,2,1,0for!)|( !xx

exf

xll

l

1!

)|(00

=== -¥

=

=åå lll ll eex

exfx

x

x

Page 27: Lecture 9 - pku.edu.cnmwfy.gsm.pku.edu.cn/miao_files/ProbStat/lecture9.pdf · 2020. 3. 23. · Lecture 9!Expectation!Properties of expectation!Bernoulli, Binomial and Poisson Distributions,

27

Expectation

0 11

1 1 0

( ) ( | ) ( | )

! ( 1)! !

x xx x y

x x y

E X xf x xf x

e e exx x y

l l l

l l

l l ll l l

¥ ¥

= =

- - - -¥ ¥ ¥

= = =

= =

= = = =-

å å

å å å