reviewch4-continuous random variables
TRANSCRIPT
1
241241--460 460 Introduction to Introduction to QueueingQueueingNetworks : Engineering ApproachNetworks : Engineering Approach
Chapter 4 Continuous RandomChapter 4 Continuous Random
Assoc. Prof. Thossaporn KamolphiwongCentre for Network Research (CNR)
Department of Computer Engineering, Faculty of EngineeringPrince of Songkla University, Thailand
Chapter 4 Continuous Random Chapter 4 Continuous Random VariablesVariables
Email : [email protected]
Outline
Continuous Random Variables• Cumulative Distribution Function (CDF)• Cumulative Distribution Function (CDF)• Probability Density Function (PDF)• Some Useful Continuous RV• Expected Value• Derived random variable• Conditioning a Continuous RV
Chapter 4 : Continuous Random Variables
2
Continuous RV
Continuous Random variable Y is a random variable where the data can take infinitely many values.where the data can take infinitely many values.
Outcomes
Random VariableY() = y
S
Chapter 4 : Continuous Random Variables
0 1 2-1-2
SY
SY = {y|-2 y 2}
Random Variables
Discrete & Continuous RV
Discrete
Sx = {-2, -1, 0, 1, 2}
ContinuousS
OutcomesS
0 1 2-1-2SX
Continuous
SY = {y| -2 < y < 2}
Chapter 4 : Continuous Random Variables
OutcomesS
0 1 2-1-2SY
3
Continuous Sample Space
A continuous set of numbers, sometimes referred to as an interval, contains all ofreferred to as an interval, contains all of the real numbers between two limits.
(x1,x2)= {x | x1 x x2}
[x1,x2]= {x | x1 x x2}
[x x )= {x | x x x }[x1,x2) {x | x1 x x2}
(x1,x2]= {x | x1 x x2}
Chapter 4 : Continuous Random Variables
Continuous Random Variables
• A continuous random variable is one for which
the outcome can be any value in an interval of
the real number line.
• Don’t calculate P[X = x] but calculate
b h d b l bP[a < X < b], where a and b are real numbers
• For a continuous random variable P[X = x] = 0
Chapter 4 : Continuous Random Variables
4
Example
a wheel of circumference 1m mark a point on the perimeter
X
mark a point on the perimeter at the top of the wheel.
spinning the pointer in center of wheel
X : distance, 0 X 1
Fo a gi en hat is the For a given x, what is the probability P[X = x]?
Chapter 4 : Continuous Random Variables
Y=nY=2
Y=1
Solution
• Find PMF of Y• Y = # of arc in which pointer
Y
Y=3
Y 2
,...,2,1/1 nyn
f pstops
• SY = {1, 2, …, n} PY(y) = ??
otherwise0
,...,2,1/1 nynyPY
Chapter 4 : Continuous Random Variables
5
(Continue)
• X = distance from marked point to pointer stopsY=1
Y=2Y=n
X
to pointer stops
• P[X = x] < P[Y = nx] = 1/n
• If n ,
Y 2
Y=3
a : smallest integer > a 0
1limlim
nnxYPxXP
nn
• P[X=x] < 0,
Chapter 4 : Continuous Random Variables
g
Y = nx,
Y = 12x0.2 = 2.4 = 3P[X=x] = 0
Cumulative Distribution Function
The cumulative distribution function (CDF)if d i bl X iif random variable X is
FX(x) = P[X < x]
Chapter 4 : Continuous Random Variables
6
CDF Theorem
For any random variable X,
FX(-) = 0
FX() = 1
P[x1 X x2] = FX(x2) – FX(x1)[ 1 2] X( 2) X( 1)
Chapter 4 : Continuous Random Variables
Example
Find CDF of X (P[X < x]), 0 < X <1
Y=1Y=2
Y=3
Y=n
X
Chapter 4 : Continuous Random Variables
7
Solution
Let n = 10 and x = 0.17
{Y = 1}< {X = 0 17} < {Y =2}Y=1
Y=2Y=10
X
{Y = 1}< {X = 0.17} < {Y =2}
{Y < nx - 1}{X < x}{Y < nx}{Y < 10x0.17 - 1}={X < 0.17}={Y < 10x0.17}{Y < 1.7 - 1}{X < 0.17}{Y < 1.7}
Y=3
{Y < 1} {X < x} {Y < 2}
FY(1) < FX(0.17) < FY(2)
Chapter 4 : Continuous Random Variables
(Continue)
• FY(1) < FX(0.17) < FY(2)
nk
y
nkynk
y
nkyFY ,...,2,1 ,
1
1
0
1
0
Chapter 4 : Continuous Random Variables
8
(Continue)
• FY(nx-1) < FX(x) < FY(nx)
n
nxxF
n
nxX
1
xn
nxn
lim n
nxxF
n
nxn
Xn
lim1
lim
Chapter 4 : Continuous Random Variables
nn
n
nxxF
nn
nxn
Xnn
lim1
limlim FX(x) = x
Solution
• The CDF of X is
10
00 x
F
1
10
1 x
xxxFX
0.8
1
1.2
X(x
)
Chapter 4 : Continuous Random Variables
0
0.4
0 0.2 0.4 0.6 0.8 1 1.2
x
FX
9
Probability Density Function
p1 = P[x1 < X < x1+]
F ( +) F ( )2
FX(x)
= FX(x1+) - FX(x1)
p2 = P[x2 < X < x2+]
= FX(x2+) - FX(x2)x1
x2
p 1
p 2 x
Ffd i til
,0Average slope
Chapter 4 : Continuous Random Variables
)()(
)()(][
11
1111
xFxF
xFxFxXxP
XX
XX
dx
xdFxf
xFofderivativeslope
XX
X
)(
Probability Density Function
The probability density function (PDF) of a continuous random variable X iscontinuous random variable X is
d
xdFxf X
X Slop at point x
Chapter 4 : Continuous Random Variables
dx
10
Theorem
For a continuous random variable X with PDF f (x)
fX(x) 0 for all x,
,)( duufxFx
XX
PDF fX(x),
Chapter 4 : Continuous Random Variables
1)( dxxf X
PDF and CDF
FX(x2) – FX(x1)
fX(x)
The probability of observing X in an interval is the area under the PDF graph between the
x1 x2x
dxxfxXxPx
x X )(][2
121
Chapter 4 : Continuous Random Variables
two end points of the interval
11
Some thoughts
• The probability of any individual outcome is zero.zero.
• The probability mass function (PMF) does not apply for a continuous random variable.
• For a continuous random variable, the probabilities apply to intervals.
Chapter 4 : Continuous Random Variables
PMF versus PDF
Discrete Continuous
A finite set of number All numbers in an interval
x0, x1, x2, …, xn
Probability Mass Function, fx(x)
P[X=x] = fx(x)
Probability Density Function, fx(x)
P[a<x<b] = [area under the graph of fx over [a,b] ]
fX(x)fX(x) Probability given by
Probability given by height
Chapter 4 : Continuous Random Variables
a b
fX
xx
given by area.
12
Discrete Continuous
A finite set of number All numbers in an interval
Comparison of CDF
x0, x1, x2, …, xn
Cumulative Distribution Function, Fx(x)
P[X<x] = Fx(x)
Cumulative Distribution Function, Fx(x)
P[X < x] = Fx(x)
FX(x)
x
FX(x)
x
Chapter 4 : Continuous Random Variables
Summary PDF and PMF
• Discrete random variable, the probabilitydistribution is referred as a probability massfunction (PMF)function (PMF).
• Continuous random variable, the probabilitydistribution is referred as a probability densityfunction (PDF).
• The defining property of a PDF is that the totalarea under the curve is equal to one.
Chapter 4 : Continuous Random Variables
13
Example
The CDF of X is 00 x
Find• The PDF of X
1x1
10
00
xx
x
xFX
• Probability of the event {1/4 X 3/4}.
Chapter 4 : Continuous Random Variables
Solution
10
00
xx
x
xF
• fX(x) = ?
• fX(x) = dFX(x)/dx
1x1
10 xxxFX
101
0
x
otherwisexf X
1
x)
Chapter 4 : Continuous Random Variables
101 x 0.5
x0 0.5 1 1.5
f X(x
14
P[1/4 X 3/4]
= F[3/4] – F[1/4]
Solution
101
0 otherwisexf X [ ] [ ]
= ¾ - ¼ = ½
Or
P[1/4 X 3/4]
101 x
f X
14/34/3
dxdxxf X
1
X(x
)
Chapter 4 : Continuous Random Variables
21
41
43
4/14/1
0.5
x0 0.5 1 1.5
f X(
Note : Interval
Note:When we work with continuous random variable itWhen we work with continuous random variable, it
is usually not necessary to be precise about specifying whether or not range of numbers includes the endpoints. This is because individual numbers have probability zero. The following intervals have the same probability.g p y
(¼, ¾) (¼, ¾]
[¼, ¾) [¼, ¾]
Chapter 4 : Continuous Random Variables
15
Expected Values
The expected value of a continuous random variable X isvariable X is
For Discrete Random Variable :
dxxxfXE XX
Chapter 4 : Continuous Random Variables
xSx
X xxPXE
Expected Values of Derived RV
• Expected value of continuous random variable
• Expected value of continuous function
( ) ( )XE X xf x dx
Chapter 4 : Continuous Random Variables
( ) ( ) ( )XE g X g X f x dx
16
Theorem
[ ] 0For any random variable X, E[X - X] = 0
E[aX + b] = aE[X] + b
Var[X] = E[X2] - 2X
Var[aX + b] = a2Var[X]
Chapter 4 : Continuous Random Variables
Example
The probability density function of the random variable Y isvariable Y is
Sketch the PDF and find the following
otherwise
yyyfY
11
0
2/3 2
(1) The expected value E[Y](2) The variance Var[Y](3) The standard deviation Y
Chapter 4 : Continuous Random Variables
17
(Continue)
• Sketch the PDF
h
yyyfY
112/3 2
otherwiseyfY
0
1.5
3
Chapter 4 : Continuous Random Variables
1 1.50.5-0.5-1-1.5y
Solution
• The expected value3
dyyyfYE Y
1
1
3
23 dy
y
1
1 1.50.5-0.5-1-1.5
1.5
y
Chapter 4 : Continuous Random Variables
08
3
8
3
8
31
1
4
y
18
(Continue)
• The variance 22Var YYEY
dyyyYE 222
2
3
1
1
5
10
3 y The Variance
0
Chapter 4 : Continuous Random Variables
10
5
3
Var[X] = 3/5
(Continue)
• The standard deviation Y
5/3Var YY
Chapter 4 : Continuous Random Variables
19
Some Useful Continuous RV
Some Random Variables• Uniform Random Variable• Uniform Random Variable• Exponential Random Variable
Chapter 4 : Continuous Random Variables
Uniform Random Variable
• Uniform Random VariableThe uniform random variable arises in situationsThe uniform random variable arises in situations
where all values in an interval of the real line are equally likely to occur
Chapter 4 : Continuous Random Variables
20
Uniform Random Variable
Definition Uniform Random Variable
X is a uniform (a,b) random variable on the interval
otherwise
bxaabxf X 0
/1
[a,b] if the PDF of X is
where the two parameters and b > a
Chapter 4 : Continuous Random Variables
where the two parameters and b > a
Uniform RV Theory
The CDF of X is
If X is a uniform (a, b) random variable
The CDF of X is
bx
bxaab
axax
xFX
1
0
The expected value of X is E[X] = (b+a)/2
The variance of X is Var[X] = (b-a)2/12
Chapter 4 : Continuous Random Variables
21
CDF of Uniform RV
( ) duufxF
x
XX
u
a b duab
xFx
X
1
x
a
uab
1
x
duab
x
a
1
aab
xab
11
0
Chapter 4 : Continuous Random Variables
bx
bxaab
axax
xFX
1
0
ab
ax
Exponential Random Variables
• Exponential Random Variablearises in the modeling of the time between occurrence
0
00
x
x
exf
xX
The probability density function is
The cumulative distribution function is
of events
Chapter 4 : Continuous Random Variables
is the rate at which events occur
0
0
1
0
x
x
exF
xX
22
CDF of Exponential RV
x
uX duexF
x
XX duufxF
x
uedu
xxu eee 0
0
Chapter 4 : Continuous Random Variables
xX exF 1
PDF and CDF
• = 2
0 1
0.20.3
0.40.50.6
fX(x)
Probability Density Function
0 20.40.6
0.81.0
1.2
FX(x
)
Cumulative Distribution Function
xe 1xe
Chapter 4 : Continuous Random Variables
0.1
-3 0 3 6 9 12 15x
0.2
-3 0 3 6 9 12 15x
23
Memoryless Property of an Exponential RV
• Memoryless property:
P[X > t + h | X > t] P[X > h]
Waiting t second
Waiting more h second
Waiting h second
P[X > t + h | X > t] = P[X > h]
Waiting more h second
The probability of waiting at least an additional h seconds is the same regardless of how long one has already been waiting
Chapter 4 : Continuous Random Variables
Prove : Memoryless Property
tXhtXP
• Prove : P[X > t + h | X > t] = P[X > h]
tXP
tXhtXPtXhtXP
|
X > t
X > t + h
{X > t + h } { X > t} = {X > t + h }
Chapter 4 : Continuous Random Variables
t t + htime
24
Prove : Memoryless Property(2)
tXP
tXhtXPtXhtXP
| tXP tXP
htXP
ht
udue
Chapter 4 : Continuous Random Variables
t
udue
ht
th
ee
e
Prove : Memoryless Property(3)
hXPhXP 1
h
udue h
ue
P[X > h ] = P[X > t + h | X > t]
Chapter 4 : Continuous Random Variables
he
25
Example
The transmission time X of messages in a communication system obeys the exponentialcommunication system obeys the exponential probability law with parameter , that is,
P[X > x] = e-x , x > 0.
Findh f• the CDF of X.
• P[T < X < 2T], where T = 1/.
Chapter 4 : Continuous Random Variables
Solution
• CDF of X
F ( ) P[X < ] 1 P[X > ]
P[X > x] = e-x , x > 0.
FX (x)
0
0
1
0
x
x
exF
xX
= P[X < x] = 1 – P[X > x]
• P[T < X < 2T]
Chapter 4 : Continuous Random Variables
= P[T < X < 2T] = FX(2T) – FX (T)
= 1 – e-2 – (1-e-1) 0.233
26
Solution(2)
fX (x)FX (x)
1
x
e-x
x
1 – e-x
00 x
F 00 x
1
Chapter 4 : Continuous Random Variables
01 xe
xFxX
0
0
x
x
exf
xX
Example
The waiting time X of a customer in a queueingsystem is zero if he finds the system idle, and ansystem is zero if he finds the system idle, and an exponentially distributed random length of time if he finds the system busy. The probabilities that he finds the system idle or busy are p and 1 – p, respectively.
Find the CDF of X
Chapter 4 : Continuous Random Variables
27
Solution
FX(x) = P[X < x]
= P[X < x|idle]p + P[X < x|busy](1-p)
Chapter 4 : Continuous Random Variables
Solution
FX(x) = P[X < x]
= P[X < x|idle]p + P[X < x|busy](1-p)
1 – e-x
Noting that P[X < x|idle] = 1 when x > 0 and 0
otherwiseChapter 4 : Continuous Random Variables
28
(Continue)
FX(x) = P[X < x|idle]p + P[X < x|busy](1-p)
= p + (1 p)(1 e-x)= p + (1-p)(1 – e x)
1
FX(x)
00 x
Chapter 4 : Continuous Random Variables
0 xp
0
0
11
0
x
x
eppxF
xX
Example
The probability that a telephone call lasts no more than t minutes is often modeled as an
otherwise
tetF
t
T
0
0
1 3/
exponential CDF.
What is the PDF of the duration in minutes of a
Chapter 4 : Continuous Random Variables
What is the PDF of the duration in minutes of a telephone conversation?
What is the probability that a conversation will last between 2 and 4 minutes?
29
Solution
1
FT(t
)
te
tFt 01 3/
• The PDF of T 0.4
t)
0.5
t4 9
F
otherwisetFT
0
tdFtf T
T
Chapter 4 : Continuous Random Variables
0.2
t3 8
f T(t
0
dt
tfT
otherwise
te t 0
0
3/1 3/
Solution
• P[2 T 4] = ?
• Using CDF
P[2 T 4] = F4(4) – F2(2) = e-2/3 – e-4/3 = 0.25
• Using PDF
4
3/3/1 tT etf
3/1 tT etF
Chapter 4 : Continuous Random Variables
dteTP t 3/4
2 3
142
34324
2
3/ eee t
30
Probability Models of Derived RV
• Discrete : Determine fY(y) from g(X) and fX(x))If Y = g(X)
yxgx
XY xPyP:
Discrete : Determine fY(y) from g(X) and fX(x))
• Continuous Derived RV
Chapter 4 : Continuous Random Variables
Find CDF FY(y) = P[Y < y] Compute PDF fY(y) = dFY(y)/dy
Example
Find PDF of Y, Y = 100X
• Y = location of the pointer Y=1Y=2
Y=n
X
• Y = location of the pointer on 1-meter circumference of circle
• X = location of the pointer after spinning
Y=2
Y=3
00 x
Chapter 4 : Continuous Random Variables
1
10
0
1
0
x
x
x
xxFX
31
Solution
Y 100X
• FY(y) = P[Y < y]
• Y = 100X
• FY(y) = P[100X < y]
= P[X < y/100]
Chapter 4 : Continuous Random Variables
Solution(2)
• FY(y) = P[X < y/100]P[X < x]
00 y
1
10
0
1
0
x
x
x
xxFX
P[X < x]
Chapter 4 : Continuous Random Variables
100
1000
1
100/
y
y
y
yyFY
32
Solution(3)
• Find PDF of Y, Y = 100X
1000100/1
0
y
otherwiseyfyF
dy
dYY
Chapter 4 : Continuous Random Variables
Derived Random Variable
• If Y = aX, a > 0
• FY(y) = P[Y < y] = P[aX < y]
= P[X < y/a] = FX(y/a)
Chapter 4 : Continuous Random Variables
ayfady
aydFyf X
XY /
1/
33
Derived Random Variable (2)
• If Y = X + b, FY(y) = P[Y < y]
FY(y) = P[X + b < y]
= P[X < y - b] = FX(y-b)
bdF
Chapter 4 : Continuous Random Variables
byfdy
bydFyf X
XY
Example
Let X have the triangular PDF
Find
otherwise
xxxf X
10
0
2
• PDF of Y = aX
• Sketch the PDF of Y for a = ½, 1, 2
Chapter 4 : Continuous Random Variables
34
Solution
Y = aX, FY(y) = FX(y/a)
• 0 < x < 1
• fY(y) = (1/a)fX(y/a)
fY(y) = (1/a)fX(y/a), a > 0
2
3
4
f Y(y
)
a=1/2
a=12
0 < y < a
= (1/a)(2y/a)
= 2y/a2
Chapter 4 : Continuous Random Variables
00 1/2 1 2
1
yf
a=2
Conditioning a Continuous RV
Conditional PDF given an Event
F d i bl X ith PDF f ( ) d• For a random variable X with PDF fX(x) and an event B SX with P[B] > 0, the conditional PDF of X given B is
Bxxf X ,
Chapter 4 : Continuous Random Variables
otherwise
BPxf BX
0|
35
Conditioning a Continuous RV
Theorem :Gi t {B } d th diti l• Given an event space {Bi} and the conditional
PDFs fX|Bi(x),
• If {xB}, the conditional expected value of X
ii
BXX BPxfxfi |
f { } p f
is
Chapter 4 : Continuous Random Variables
dxxxfBXE BX ||
Example
Suppose the duration T (in minutes) of a telephone call is a exponential (1/3) random variable:
otherwise
tetf
t
T
,0
0
31 3
0
0.2
0.4
0 5 10t
f T(t
)
• For calls that last at least 2 minutes, what is the conditional PDF of the call duration?
• What is the condition Expected Value
Chapter 4 : Continuous Random Variables
36
Solution
• The probability of the condition event T > 2 is
• The conditional PDF of T given T > 2 is
ttfT
2
2TP
2
dttfT 32
2
331 edte t
Chapter 4 : Continuous Random Variables
otherwise
TP
tf
tfT
TT
0
22|
Solution (2)
te t 21 32
/T>
2(t)
0 2
0.4
otherwise
tetf TT
2
032|
Chapter 4 : Continuous Random Variables
t
f T/
0
0.2
0 2 4 6 8 10
37
Solution (3)
• The conditional expected value is
2| TTE
32
2
32 dtete tt
2
3231 dtet t
Chapter 4 : Continuous Random Variables
minutes
2
2
532
References
1. Alberto Leon-Garcia, Probability and Random Processes for Electrical Engineering, 3rd Ed.,Processes for Electrical Engineering, 3 Ed., Addision-Wesley Publishing, 2008
2. Roy D. Yates, David J. Goodman, Probability and Stochastic Processes: A Friendly Introduction for Electrical and Computer Engineering, 2nd, John Wiley & Sons, Inc, 2005g g, , y , ,
3. Jay L. Devore, Probability and Statistics for Engineering and the Sciences, 3rd edition, Brooks/Cole Publishing Company, USA, 1991.
Chapter 4 : Continuous Random Variables