35
Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung University

Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2014Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung

  • Upload
    others

  • View
    25

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2014Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung

Chapter 6Continuous Random Variables

Wen-Guey Tzeng

Computer Science Department

National Chiao Tung University

Page 2: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2014Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung

Probability density functions

Definition.• Let X be a random variable that takes values on all real

numbers • There exists a non-negative real-valued function

f: R[0, )• For an interval I=[a b], let

b

aIdxxfdxxfIXP )()()(

2

Page 3: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2014Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung

3

Page 4: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2014Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung

• X is called a continuous random variable

• The function f is called the probability density function

(pdf), or the density function of X.

• Density is not probability• f(x): we cannot say that the probability that x occurs is f(x)

• Area is probability• P(XA): the probability that X occurs in A

4

Page 5: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2014Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung

5

Page 6: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2014Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung

6

Page 7: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2014Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung

7

Page 8: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2014Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung

Distribution function for continuous random variable

• If X is a continuous random variable, then the function

𝐹 𝑡 = −∞𝑡𝑓 𝑡 𝑑𝑡

is called the (cumulative) distribution function of X.

2014 Fall 8

Page 9: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2014Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung

9

Page 10: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2014Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung

2014 Fall 10

Page 11: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2014Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung

11

F(b)-F(a)

dxxf

bXaPbXaP

bXaPbXaP

dxxfbXaP

xfxF

dxxf

dxxftF

b

a

b

a

t

)(

)()(

)()( (e)

.)()( b,a realsFor (d)

).()(' ,continuous is f If (c)

.1)( (b)

.)()( a)(

Properties

Page 12: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2014Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung

• The distribution function of a random variable X is given by

31

322/112/

212/1

104/

00

)(

x

xx

x

xx

x

xF

2014 Fall 12

Page 13: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2014Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung

• Compute the following quantities:• P(X<2)

• P(X=2)

• P(1<=X<3)

• P(X>3/2)

• P(X=5/2)

• P(2<X<=7)

2014 Fall 13

Page 14: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2014Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung

• Suppose that a bus arrives at a station every day between 10:00 A.M. and 10:30 A.M., at random.

• Let X be the arrival time; find the distribution function of X and sketch its graph.

Sol:

5.101

5.1010)10(2

00

)(

t

tt

t

tF

2014 Fall 14

Page 15: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2014Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung

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

.0

0)(

otherwise

xxexf

x

15

Page 16: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2014Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung

(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?

16

Page 17: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2014Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung

Sol:

1.or 1(-1)]-[0 Therefore

.01

lim1

lim)1(limget werule sHopital'l'By

.1])1([ Thus

.)1( parts,by n integratioBy

.)(1 )(

0

00

xxxx

x

x

x

xx

xx

ee

xex

ex

exdxxe

dxxedxxedxxfa

17

Page 18: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2014Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung

.007.0)7(1)7(

37.0)31()61()2()5()52()(

.1)1(])1([)()(

0,For t 0. tif 0)()(

25

0

FXP

eeFFXPc

etexdxxftF

tFb

ttt

x

18

Page 19: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2014Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung

• Sketch the graph of the function f(x)• Show that it is the probability density function of a

random variable X.• Find F, the distribution function of X, and show that it

is continuous.• Sketch the graph of F.

,0

51|3|4

1

2

1

)(

otherwise

xxxf

19

Page 20: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2014Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung

Density function of a function of a random variable

• f(x) is the density function of a random variable X

• What is the density function g(y) of Y=h(X)?

Two methods

• The method of distributions• Compute the distribution G(t) of Y• g(y) = G(y)’

• The method of transformations• Compute g(y) directly

20

Page 21: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2014Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung

By the method of distributions:

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

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

.0

21 /2)(

2

elsewhere

xifxxf

21

Page 22: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2014Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung

Sol: Let G and g be the distribution function and the density function of Y, respectively.

.2

2]2

[2

)1(

Now

.41

41)1(

10

)()()()(

11 2

2

txdx

xtXP

t

ttXP

t

tXtPtXPtYPtG

tt

22

Page 23: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2014Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung

.0

41 1/t(t)G'g(t)

:G ofation differenti

by found is g, Y, offunction density The

.41

412

2

10

)(

Therefore,

elsewhere

tift

t

tt

t

tG

23

Page 24: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2014Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung

By the method of transformations

• X is continuous with density function fX and the possible value set A.

• If Y=h(X) is invertible on B=h(A)={ h(a): a in A}.

• Then, the density function fY of Y is

B |,)()'(|))(()( 11 yyhyhfyf XY

24

Page 25: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2014Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung

Expectations and variances

Definition. If X is a continuous r. v. with the density function f(x), the expected value of X is defined by

.)()( dxxxfXE

25

Page 26: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2014Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung

• 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 density function:

• Calculate the mean of these differences for the group.

.0

11 )32(2

1

)(2

elsewhere

xifxxxf

26

Page 27: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2014Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung

Sol:

• Remark: If X is a continuous r. v. with density function f, X is said to have a finite expected value if

.3

2]

4

3

3

2[

2

1-

)32(2

1)()(

1

1

43

1

1

32

xx

dxxxdxxxfXE

.)(|| dxxfx

27

Page 28: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2014Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung

• A r. v. X with density function f(x) is called a Cauchy random variable

(a) Find c.(b) Show that E(X) does not exist.

,x- ,1

)(2

x

cxf

28

Page 29: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2014Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung

Sol: (a)

(b)

./1 So,

.)]2

(2

[] [arctan1

1 -- 2

c

ccxcx

dxc

.)]1[ln(1

)1(2

)1(

||)(||

02

0 2- 2-

x

x

xdx

x

dxxdxxfx

29

Page 30: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2014Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung

• Let X be a continuous r. v. with density function f

• For any function h: R R

.)()()]([ dxxfxhXhE

30

Page 31: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2014Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung

• Let X be a continuous r. v. with density function f(x). Let h1, h2, …, hn be real-valued functions, and let a1, a2, …, an be real numbers. Then

)]([)]([)]([

)]()()([

2211

2211

XhEaXhEaXhEa

XhaXhaXhaE

nn

nn

31

Page 32: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2014Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung

• A point X is selected from the interval (0, /4) randomly

• Calculate E(cos2X) and E(cos2X)

Sol:

.1

2

1.

2

2

1

2

1)2cos

2

1

2

1()(cos

.2

]2sin2

[2cos4

)2(cos

6.3, Theoremby Now

.0

4/0/4)(

2

4/0

4/

0

XEXE

xxdxXE

otherwise

ttf

32

Page 33: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2014Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung

Definition. X is a continuous r. v. with density function f

• Var(X) = E(X2) - (EX)2

.)())((]))([()( 22 dxxfXExXEXEXVar

33

Page 34: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2014Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung

• 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

34

Page 35: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2014Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung

• Sol:

33.4

.5.2012)()12( )(

.33.4)( hence and

,75.18)5.32(1075)( So

.107515

1)(

,5.3215

1)( )(

12-XX

X

2

40

25

22

40

25

XEXEb

XVar

XVar

dxxXE

dxxXEa

35