ch6: continuous random variableswmnet.cs.nthu.edu.tw/course/ps/slides/ch6.pdf · 6.1 probability...

41
Ch6: Continuous Random Variables

Upload: others

Post on 18-Sep-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

Ch6: Continuous Random Variables

Page 2: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

2

6.1 Probability density functions

In the case of discrete random variables a very small change in t may cause relatively large changes in the values of F.In cases such as the lifetime of a random light bulb, the arrival time of a train at a station, and the weight of a random watermelon grown in a certain field,

where the set of possible values of X is uncountable, small changes in x produce correspondingly small changes in the distribution of X. In such cases we expect that F, the distribution function of X, will be a function.

Page 3: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

3

DefinitionLet X be a random variable. Suppose that there exists a nonnegative real-valued function f : R →[0,∞) such that for any subset of real numbers A that can be constructed from intervals by a countable number of set operations,

Then X is called absolutely continuous or, in this book, for simplicity, . Therefore, whenever we say that X is continuous, we mean that it is absolutely continuous and hence satisfies (6.2). The function f is called the , or simply the density function of X.

A

AXP .)(

Page 4: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

4

Probability density functions

Let be the density function of a random variable X with distribution function .

)()()()()(

)( b,anumber realFor )(

.continuous is at which every for

still ,continuousnot is ifEven

then ,continuous is If)(

)()(

)()(

bXaPbXaPbXaPbXaPe

bXaPd

fx

f

fc

dxxfb

tFa

Page 5: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

5

Property (d) states that the probability of X being between a and b is equal to the area under the graph of f from a to b. Letting a = b in (d), we obtain

This means that for any real number a, P(X = a) = 0. That is, the probability that a continuous random variable assumes a certain value is

)( aXP

Page 6: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

6

The area over an interval I under the graph of f represents the probability that the random variable X will belong to .

The area under f to the left of a given point t is, the value of the distribution function of X at t .

Page 7: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

7

Page 8: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

8

Example 6.1

Experience has shown that while walking in a certain park, the time X, in minutes, between seeing two people smoking has a density function of the form

(a) Calculate the value of λ.

(b) Find the probability distribution function of X.

(c) What is the probability that Jeff, who has just seen a person smoking, will see another person smoking in 2 to 5 minutes? In at least 7 minutes?

.0

0)(

otherwise

xxexf

x

Page 9: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

9

Example 6.1(a) We use the property :

By integration by parts,

But as ,using l’Hoptial’s rule, we get

Therefore, it implies that

)( dxxf

dxxf )(

1)1(,)1(0

xxx exexdxxe

x

x

x

x

x e

xex

)1()1( limlim

Page 10: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

10

Example 6.1

(b) The distribution function of X, note F(t)=0 if t < 0.

For t >= 0,

Thus,

(c)

1)1()1( )( 0 ttx etextF

0

)(tF0t

0t

37.063)31()61(

)52()52(

5225

eeee

XPXP

)7(1)7(1)7( XPXPXP

Page 11: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

11

Example 6.2

(a) Sketch the graph of the function

and show that it is the probability density function of a random variable X.

(b) Find F, the distribution function of X, and show that it is continuous.

(c) Sketch the graph of F.

,0

51|3|4

1

2

1

)(

otherwise

xxxf

Page 12: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

12

Example 6.2(a) Note that

The graph of f is as shown in next slide.

Now since f(x) >= 0 and the area under f from 1 to 5, being the area of the triangle ABC is (1/2)(4x1/2)=1, f is a density function of X.

5,0

1,0

)(

x

x

xf

Page 13: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

13

Page 14: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

14

Example 6.2

(b) Using the formula

t

dxxftF )()(

12

1

2

1 )(,5

8

17

4

5

8

1

)(,53

8

1

4

1

8

1 )()(,31

)(,1

2

2

tFtfor

tt

tFtfor

ttdxxftFtfor

tFtfor

t

Page 15: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

15

Example 6.2

F is continuous because

(c) See next slide.

)5( )(lim

),3(8

17)3(

4

5)3(

8

1

2

1 )(lim

, )(lim

5

2

3

1

FtF

FtF

tF

t

t

t

Page 16: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

16

Page 17: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

17

6.2 Density function of a function of a random variable

f is the density function of a random variable X, then what is the density function of h(X)?

Two methods:• the method of : to find

the density of h(X) by calculating its distribution function;

• the method of : to find the density of h(X) directly from the density function of X.

Page 18: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

18

Example 6.3

Let X be a continuous random variable with the probability density function

Find the distribution and the density functions of Y = X2.

.0

21 /2)(

2

elsewhere

xifxxf

Page 19: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

19

Example 6.31. Let G and g be the distribution function and the density function of Y, respectively. By definition,

elsewhere

tiftg

isgYoffunctiondensityThe

t

t

t

tG

ttXP

t

t

t

tXtPtG

0

41 )(

:,,

41

41

10

)(

22 )1(

41

41

10

)( )(

Page 20: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

20

Example 6.4

Let X be a continuous random variable with distribution function F and probability density function f .

In terms of f , find the distribution and the density functions of Y = X3.

1. Let G and g be the distribution function and the density function of Y. Then

)(3

1 )(,

)()( )()(

3

3 2

33

tft

tgHence

tFtXPtYPtG

Page 21: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

21

Example 6.5

The error of a measurement has the density function

Find the distribution and the density functions of the magnitude of the error.

otherwise

xifxf

0

112/1)(

Page 22: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

22

Example 6.5

1. Let X be the error of the measurement. We want to find G, the distribution, and g, the density functions of |X|, the magnitude of the error. By definition,

elsewhere

tiftg

t

t

t

tG

0

10 )(

11

10

00

)(

Page 23: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

23

6.3 Expectations and variances

Definition If X is a continuous random variable with probability density function f, the expected value of X is defined by

)(XE

Page 24: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

24

Example 6.8

In a group of adult males, the difference between the uric acid value and 6, the standard value, is a random variable X with the following probability density function:

Calculate the mean of these differences for the group.

.0

33/2 )23(490

27

)(2

elsewhere

xifxxxf

Page 25: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

25

Example 6.8

36.2120

283]

3

2

4

3[

490

27

)(

3

32

34

xx

XE

Page 26: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

26

Remark 6.2

If X is a continuous random variable with density function f, X is said to have a finite expected value if

that is, X has a finite expected value if the integral of xf(x) converges absolutely. Otherwise, we say that the expected value of X is not finite.

Page 27: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

27

Example 6.9

A random variable X with density function

is called a Cauchy random variable.

(a) Find c.

(b) Show that E(X) does not exist.

,x- ,1

)(2

x

cxf

Page 28: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

28

Example 6.9

(a)

(b)

1

1

1

arctan1

111

2

2

22

c

cx

dxc

xx

dx

x

dxcdx

x

c

existnot does E(X)

)1(2

)1(

||

0 22

x

xdx

x

dxx

Page 29: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

29

Theorem 6.2

For any continuous random variable X with probability distribution function F and density function f,

)(XE

Page 30: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

30

Theorem 6.2

Proof:

Note that

0 0

0

0 00

0

0

)()(

)()(

)()()()(

dtdxxfdtdxxf

dxxfdtdxxfdt

dxxxfdxxxfdxxxfXE

t

t

xx

Page 31: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

31

Theorem 6.2

where the last equality is obtained by changing

the order of integration. The theorem follows

since

and

t

tFdxxf )()(

t

tFtXPdxxf )(1)()(

Page 32: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

32

Remark 6.4

For any random variable X,

In particular, if X is nonnegative, that is, P(X < 0) = 0, this theorem states that

00

)()()( dttXPdttXPXE

)(XE

Page 33: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

33

Theorem 6.3

Let X be a continuous random variable with probability density function f (x); then for any function h: R → R,

(Theorem 4.2)

)]([ XhE

Page 34: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

34

Corollary

Let X be a continuous random variable with probability density function f (x). Let h1, h2, . . . , hn be real-valued functions, and α1, α2, . . . , αn be real numbers. ThenE[α1h1(X) + α2h2(X)+· · ·+αnhn(X) ]=

This corollary implies that if α and β are constants, thenE(αX + β) =

Page 35: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

35

Example 6.10

A point X is selected from the interval (0, π/4) randomly. Calculate E(cos 2X)and E(cos2 X).

1. Calculate the distribution function of X:

41

40

00

)()(

t

t

t

tXPtF

Page 36: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

36

Example 6.10

2. Thus f , the probability density function of X, is

3.

otherwise0

)(tf

1

2

1 )(cos

2/)2cos1(cos

2]2sin

2[ )2(cos

2

2

40

XE

XX

xXE

Page 37: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

37

Variances of Continuous Random Variables

Definition If X is a continuous random variable with E(X) = μ, then Var(X) and σX, called the variance and standard deviation of X, respectively, are defined by

Therefore, if f is the density function of X, then by Theorem 6.3,

)(XVar

X

XVar

)(

Page 38: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

38

Var(X) =

Var(aX + b) =

σaX+b =

a and b being constants.

Page 39: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

39

Example 6.11

The time elapsed, in minutes, between the placement of an order of pizza and its delivery is random with the density function

(a) Determine the mean and standard deviation of the time it takes for the pizza shop to deliver pizza.

(b) Suppose that it takes 12 minutes for the pizza shop to bake pizza. Determine the mean and standard deviation of the time it takes for the delivery person to deliver pizza.

.0

4025 15/1)(

otherwise

xifxf

Page 40: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

40

Example 6.11

(a) Let the time elapsed between the placement of an order and its delivery be X minutes.

(b) The time it takes for the delivery person to deliver pizza is X −12.

33.4

75.18 )(

107515

1)( ,5.32 )(

40

25

22

X

XVar

dxxXEXE

33.4

5.20125.32 )12(

12

XX

XE

Page 41: Ch6: Continuous Random Variableswmnet.cs.nthu.edu.tw/Course/PS/slides/Ch6.pdf · 6.1 Probability density functions In the case of discrete random variables a very small change in

41

Remark 6.5

For a continuous random variable X, the moments, absolute moments, moments about a constant c, and central moments are all defined in a manner similar to those of Section 4.5 (the discrete case).