Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2016Fall... · Chapter 6 Continuous...
Transcript of Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2016Fall... · Chapter 6 Continuous...
![Page 1: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2016Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung](https://reader030.fdocuments.in/reader030/viewer/2022040412/5edca01cad6a402d66675f51/html5/thumbnails/1.jpg)
Chapter 6Continuous Random Variables
Wen-Guey Tzeng
Computer Science Department
National Chiao Tung University
![Page 2: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2016Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung](https://reader030.fdocuments.in/reader030/viewer/2022040412/5edca01cad6a402d66675f51/html5/thumbnails/2.jpg)
Probability density function
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/Probability2016Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung](https://reader030.fdocuments.in/reader030/viewer/2022040412/5edca01cad6a402d66675f51/html5/thumbnails/3.jpg)
3
Lifetime of a light bulb
![Page 4: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2016Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung](https://reader030.fdocuments.in/reader030/viewer/2022040412/5edca01cad6a402d66675f51/html5/thumbnails/4.jpg)
4
Height of a human being
100 175 250
![Page 5: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2016Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung](https://reader030.fdocuments.in/reader030/viewer/2022040412/5edca01cad6a402d66675f51/html5/thumbnails/5.jpg)
• 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
5
![Page 6: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2016Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung](https://reader030.fdocuments.in/reader030/viewer/2022040412/5edca01cad6a402d66675f51/html5/thumbnails/6.jpg)
6
![Page 7: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2016Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung](https://reader030.fdocuments.in/reader030/viewer/2022040412/5edca01cad6a402d66675f51/html5/thumbnails/7.jpg)
7
![Page 8: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2016Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung](https://reader030.fdocuments.in/reader030/viewer/2022040412/5edca01cad6a402d66675f51/html5/thumbnails/8.jpg)
8
![Page 9: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2016Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung](https://reader030.fdocuments.in/reader030/viewer/2022040412/5edca01cad6a402d66675f51/html5/thumbnails/9.jpg)
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 9
![Page 10: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2016Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung](https://reader030.fdocuments.in/reader030/viewer/2022040412/5edca01cad6a402d66675f51/html5/thumbnails/10.jpg)
10
![Page 11: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2016Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung](https://reader030.fdocuments.in/reader030/viewer/2022040412/5edca01cad6a402d66675f51/html5/thumbnails/11.jpg)
2014 Fall 11
![Page 12: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2016Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung](https://reader030.fdocuments.in/reader030/viewer/2022040412/5edca01cad6a402d66675f51/html5/thumbnails/12.jpg)
12
F(b)-F(a)dxxf
bXaPbXaP
bXaPbXaP
a a)P(X
dxxfbXaP
xfxF
dxxf
dxxftF
b
a
b
a
t
)(
)()(
)()( (f)
realany for 0 (e)
)()( b,a realsFor (d)
).()(' ,continuous is f If (c)
.1)( (b)
.)()( a)(
Properties
![Page 13: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2016Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung](https://reader030.fdocuments.in/reader030/viewer/2022040412/5edca01cad6a402d66675f51/html5/thumbnails/13.jpg)
• 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 13
![Page 14: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2016Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung](https://reader030.fdocuments.in/reader030/viewer/2022040412/5edca01cad6a402d66675f51/html5/thumbnails/14.jpg)
• 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 14
![Page 15: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2016Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung](https://reader030.fdocuments.in/reader030/viewer/2022040412/5edca01cad6a402d66675f51/html5/thumbnails/15.jpg)
• 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
010
)(
t
tt
t
tF
2014 Fall 15
![Page 16: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2016Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung](https://reader030.fdocuments.in/reader030/viewer/2022040412/5edca01cad6a402d66675f51/html5/thumbnails/16.jpg)
• 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
16
![Page 17: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2016Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung](https://reader030.fdocuments.in/reader030/viewer/2022040412/5edca01cad6a402d66675f51/html5/thumbnails/17.jpg)
(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?
17
![Page 18: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2016Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung](https://reader030.fdocuments.in/reader030/viewer/2022040412/5edca01cad6a402d66675f51/html5/thumbnails/18.jpg)
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
18
![Page 19: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2016Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung](https://reader030.fdocuments.in/reader030/viewer/2022040412/5edca01cad6a402d66675f51/html5/thumbnails/19.jpg)
.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
19
![Page 20: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2016Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung](https://reader030.fdocuments.in/reader030/viewer/2022040412/5edca01cad6a402d66675f51/html5/thumbnails/20.jpg)
• 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
20
![Page 21: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2016Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung](https://reader030.fdocuments.in/reader030/viewer/2022040412/5edca01cad6a402d66675f51/html5/thumbnails/21.jpg)
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
21
![Page 22: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2016Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung](https://reader030.fdocuments.in/reader030/viewer/2022040412/5edca01cad6a402d66675f51/html5/thumbnails/22.jpg)
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
22
![Page 23: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2016Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung](https://reader030.fdocuments.in/reader030/viewer/2022040412/5edca01cad6a402d66675f51/html5/thumbnails/23.jpg)
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
23
![Page 24: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2016Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung](https://reader030.fdocuments.in/reader030/viewer/2022040412/5edca01cad6a402d66675f51/html5/thumbnails/24.jpg)
.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
24
![Page 25: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2016Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung](https://reader030.fdocuments.in/reader030/viewer/2022040412/5edca01cad6a402d66675f51/html5/thumbnails/25.jpg)
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
25
![Page 26: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2016Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung](https://reader030.fdocuments.in/reader030/viewer/2022040412/5edca01cad6a402d66675f51/html5/thumbnails/26.jpg)
Expectation and variance
Definition. If X is a continuous r. v. with the density function f(x), the expected value of X is defined by
.)()( dxxxfXE
26
![Page 27: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2016Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung](https://reader030.fdocuments.in/reader030/viewer/2022040412/5edca01cad6a402d66675f51/html5/thumbnails/27.jpg)
• 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
27
![Page 28: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2016Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung](https://reader030.fdocuments.in/reader030/viewer/2022040412/5edca01cad6a402d66675f51/html5/thumbnails/28.jpg)
Sol:
.3
2]
4
3
3
2[
2
1-
)32(2
1)()(
1
1
43
1
1
32
xx
dxxxdxxxfXE
28
![Page 29: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2016Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung](https://reader030.fdocuments.in/reader030/viewer/2022040412/5edca01cad6a402d66675f51/html5/thumbnails/29.jpg)
• 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
29
![Page 30: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2016Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung](https://reader030.fdocuments.in/reader030/viewer/2022040412/5edca01cad6a402d66675f51/html5/thumbnails/30.jpg)
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
30
![Page 31: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2016Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung](https://reader030.fdocuments.in/reader030/viewer/2022040412/5edca01cad6a402d66675f51/html5/thumbnails/31.jpg)
• Let X be a continuous r. v. with density function f
• For any function h: R R
.)()()]([ dxxfxhXhE
31
![Page 32: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2016Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung](https://reader030.fdocuments.in/reader030/viewer/2022040412/5edca01cad6a402d66675f51/html5/thumbnails/32.jpg)
• 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
32
![Page 33: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2016Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung](https://reader030.fdocuments.in/reader030/viewer/2022040412/5edca01cad6a402d66675f51/html5/thumbnails/33.jpg)
• 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
33
![Page 34: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2016Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung](https://reader030.fdocuments.in/reader030/viewer/2022040412/5edca01cad6a402d66675f51/html5/thumbnails/34.jpg)
Definition. X is a continuous r. v. with density function f
• Var(X) = E(X2) - (EX)2
.)())((]))([()( 22 dxxfXExXEXEXVar
34
![Page 35: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2016Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung](https://reader030.fdocuments.in/reader030/viewer/2022040412/5edca01cad6a402d66675f51/html5/thumbnails/35.jpg)
• 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
35
![Page 36: Chapter 6 Continuous Random Variableswgtzeng/courses/Probability2016Fall... · Chapter 6 Continuous Random Variables Wen-Guey Tzeng Computer Science Department National Chiao Tung](https://reader030.fdocuments.in/reader030/viewer/2022040412/5edca01cad6a402d66675f51/html5/thumbnails/36.jpg)
• 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
36