Professional Documents
Culture Documents
Chapter 03 Random Variables
Chapter 03 Random Variables
X : S → SX ⊂
domain range
SX is called the image of X
X : S → SX ⊂
Random
R d
Sample Space X(s) Random
Experiment
Variable
head
0 1 R
tail
Sx
X : S → SX ⊂
X(s)
1 2 3 4 5 6 R
Random
Experiment
Sample Space, S Sx
Random Variable
X(s)
0 1
Random Sx
E
Experiment
i t
Random Variable
Sample Space
pX(a
( k)
0 1 2 3 4 5 X
P2: ∑p
ak ∈S X
X (ak ) = 1
pX(ak)
0 1 2 3 4 5 X
FX (t ) = Pr {X ≤ t } = ∑ pX (x )
x ≤t
pX(x) FX(x)
pmf
CDF
1 2 3 4 X 1 2 3 4 X
Pr {a < X ≤ b } = Pr {X ≤ b } − Pr {X ≤ a }
= FX (b ) − FX (a )
pX(x) FX(x)
pmf
CDF
1 2 3 4 X 1 2 3 4 X
F2: a ≤ b ⇒ FX (a ) ≤ FX (b )
pX(x) FX(x)
pmf
CDF
1 2 3 4 X 1 2 3 4 X
limx →−∞ FX (x ) = 0
F3:
li x →∞ FX (x ) = 1
lim
F4: FX (x i +1 ) = FX (x i ) + pX (x i +1 )
pX(x) FX(x)
pmf
CDF
1 2 3 4 X 1 2 3 4 X
If your answer is 7.2 then you assumed that all of the values in the
rv’s image
g have equal
q weights
g
1 1 1 1 1 1
1 × + 6 × + 7 × + 9 × + 13 × = (1 + 6 + 7 + 9 + 13) = 7.2
5 5 5 5 5 5
In some cases
cases, the expected value does not converge
In such cases, we say that the expected value does not exist
pX(x) qX(x)
E{X}=3.87 E{X}=5.2
0.5 0.4
0.4
0.2
0.1
0.033
1 6 7 9 13 X 1 6 7 9 13 X
pX(x) qX(x)
E{X}=3.87
E{X} 3.87 E{X}=5.2
0.5
0 04
0.4
0.4
0.2
0.1
0.033
1 6 7 9 13 X 1 6 7 9 13 X
∑ (a
2
var {X } = σ = 2
X k − Ε {X }) Pr
P {X = ak }
ak ∈S X
pX((x)) qX((x))
E{X}=3.87 E{X}=5.2
0.5 0.4
0.4 var{X}=15.36
var{X}=9.91 0.2
0.1
0.033
1 6 7 9 13 X 1 6 7 9 13 X
2 2
var {X } = (1 − 3.87) × 0.5 + var {X } = (1 − 5.2) × 0.4 +
2 2 2 2
(6 − 3.87) × 0.4 + (7 − 3.87) × 0.033 + (6 − 5.2) × 0.2 + (7 − 5.2) × 0.2 +
2 2 2 2
(9 − 3.87) × 0.033 + (13 − 3.87) × 0.033 (9 − 5.2) × 0.1 + (13 − 5.2) × 0.1
= 9.91
9 91 = 15.36
15 36
σX = var {X }
pX(x) qX(x)
E{X}=3.87 E{X}=5.2
05
0.5 0.4
0
0.4 σX=3.92
σX=3.14 0.2
01
0.1
0.033
1 6 7 9 13 X 1 6 7 9 13 X
Pr{D=k}
1/n
x1 x2 x3 xn
k
A=head
coin
Ac = Not head 0 1 R
= tail
Sx
Copyright © Syed Ali Khayam 2009 27
Bernoulli Random Variable
A Bernoulli Random Variable is defined on a single event A
This rv is based on a the experiment called a Bernoulli trial
The experiment is performed and the event A either happens or does not
happen
Thus the sample space of a Bernoulli rv is binary
Bernoulli Random
Variable
Pa
X(s)
akistan criccket team
plays Au
A=Pak wins
R
ustralia
Ac=Pak losses
0 1
Sample Space
Image Courtesies of http://www.tribuneindia.com and
images.google.com
X(s)
playss Australia
A=Pak wins
n cricket te
R
Ac=Pak losses
0 1
a
eam
Sample Space
Image Courtesies of http://www.tribuneindia.com and
Copyright © Syed Ali Khayam 2009 images.google.com 29
Bernoulli Random Variable
Typical examples of Bernoulli rvs in communication:
Transmit a bit over a wireless channel
Outcomes:
0 −> bit is received error-free
1 −> bit received is not received error-free => bit is received with errors
Transmit a packet over the Internet
Outcomes:
0 −> packet is received
1 −> p
packet is not received => p
packet is lost en-route due to congestion
g
Pr{I=k}
p
1-p
I
0 1
Pr{I=k}
0.5
I
0 1
Pr{I=k} σI=0.5
µI=0.5
0.5
0.5
I
0 1
Pr{I=k}
0.9
0.1
I
0 1
0.1
I
0 1
A d the
And h pmff off a bi
binomial
i l rv is
i
n k
P {X = k } = p (1 − p )
Pr
n −k
k
k
Pr{X=k}
1 2 3
n n
= ∑ p i (1 − p )
n −i
i =1 i
0
n
= 1 − (1 − p )
S SI SX
A
Pr{I=1}=p n k
Pr {X = k } = p (1 − p )
n −k
Pr{A} k
Pr{I=0}=1-p
geo
k −1
pZ (k ) = Pr {Z = k } = (1 − p ) p
ometric pm
OR
k
pZ (k ) = Pr
P {Z = k } = (1 − p ) p
mf
odified
Depending on whether the success trial is included in the total
count or not
n k
Pr {Z = k } = p (1 − p )
n −k
Binomial
k
k k
Pr {X = k } = p (1 − p )
1 k −1
1 1
k −1
Pr {X = k } = (1 − p ) p = Pr {Z = k }
Pr {Z = j + k Z ≥ k } = Pr {Z = j }
j +k
(1 − p ) p
= k
(1 − p )
j
= (1 − p ) p
Summation over all possible values
of the Geometric pmf
Poisson arrivals
Let us divide the fixed Poisson time interval into n very small
sub-intervals of length
g ∆t
∆t is so small that only one arrival is possible within each sub-interval
1 2 3 4 … … n
t
∆t Poisson arrivals
1 2 3 4 … … n
t
∆t Poisson arrivals
1 2 3 4 … … n
t
∆t Poisson arrivals
1 2 3 4 … … n
t
∆t Poisson arrivals
Copyright © Syed Ali Khayam 2009 64
Poisson Random Variable
Thus for large n, the Binomial pmf approaches the Poisson pmf
λ λk −λ
lim Pr {X = k } = lim b k ; n, = e
n →∞ n →∞ n k !
1 2 3 4 … … n
t
∆t Poisson arrivals
Copyright © Syed Ali Khayam 2009 66
Poisson Random Variable
In general, the pmf of a Poisson random variable is
λk exp {−λ }
Pr {N = k } =
k!
where λ is the average arrival rate (arrivals/time interval)
Properties of pdf:
f1: fX (x ) ≥ 0, ∀x
∞
f2: ∫ fX (x )dx = 1
−∞
fX(x)
SX=(0, n]
0 n x
= ∫f X (x )dx
a
fX(x)
0 n x
a b
FX (t ) = Pr {X ≤ t } = ∫ fX (x )dx
x =−∞
Conversely,
y, we also have:
d
fX (x ) ≡ FX (t )
dx
FX(x)
x
Copyright © Syed Ali Khayam 2009 76
Properties of the CDF of a Continuous
Random Variable
F1: 0 ≤ FX (x ) ≤ 1, −∞ < x < ∞
F2: a ≤b ⇒ FX (a ) ≤ FX (b )
limx →−∞ FX (x ) = 0
F3:
limx →∞ FX (x ) = 1
FX(x)
F4: Pr {X = a } = Pr {a ≤ X ≤ a } = ∫f X
(x ) dx =0
a
FX(x)
{
ε
Pr a − ≤ X ≤ a +
2
ε
2 }
= ∫ fX (x ) dx ≈ ε fX (a )
a −ε 2
FX(x)
a-ε/2 a a+ε/2 x
FX(x)
FX(b)
Pr{a<x<b}
FX(a)
x
a b
Ε {X } = µX = ∫ xffX
(x ) d
dx
−∞
x x
σX > σY
fX(x) σX fY(y) σY
x y
In that sense
sense, the exponential rv is the inter-arrival
inter arrival time
between two Poisson arrivals
τ1 τ2 τ3 τ4 τ5 τ6
Poisson arrivals
Copyright © Syed Ali Khayam 2009 83
Exponential Random Variable
1 2 3 4 … … 60 t
1 2 3 4 … … 60 t
inter-arrival
inter arrival time λ=6
1 2 3 4 … … 60 t
τ1 τ2 τ3 τ4 τ5 τ6
Poisson arrivals
Copyright © Syed Ali Khayam 2009 85
Exponential Random Variable
Exponential rv is the inter-arrival time between two Poisson
arrivals
τ1 τ2 τ3 τ4 τ5 τ6
Poisson arrivals
Copyright © Syed Ali Khayam 2009 86
Exponential Random Variable
An exponential rv is the inter-arrival time between two Poisson
arrivals
Let’s look at a sub-interval (0,t] of the Poisson window
On average, how many arrivals will take place in the (0,t]
subinterval?
t t t t t t
τ1 τ2 τ3 τ4 τ5 τ6
T
Copyright © Syed Ali Khayam 2009 87
Exponential Random Variable
On average, how many arrivals will take place in the (0,t]
subinterval?
Arrivals in the (0
(0,t]
t] sub
sub-interval
interval = λt/T
In other words, λt arrivals will take place in a (0,t] subinterval per
window T
t t t t t t
τ1 τ2 τ3 τ4 τ5 τ6
( )
0
λt T e −(λt /T )
Pr {E > t } = Pr {N = 0} = = e −λt /T
0!
⇒ FE (t ) = 1 − e −λt /T
d λ
fE (t ) = FE (t ) = e −λt /T
dt T
t t t t t t
τ1 τ2 τ3 τ4 τ5 τ6
t
T
τ1 τ2 τ3 τ4 τ5 τ6
LHS = Pr {E > j } = 1 − Pr {E ≤ j }
= 1 − (1 − e −λ j )
= e −λ j
ess properrty
Pr {E > j + k ∩ E ≥ k }
RHS = Pr {E > j + k E ≥ k } =
Pr {E ≥ k }
Memoryle
Pr {E > j + k } 1 − FE (E ≤ j + k )
= =
Pr {E ≥ k } 1 − FE (E < k )
1 − (1 − e −λ( j +k ) ) e −λ je −λk
= =
1 − (1 − e −λk ) e −λk
= e −λ j
Copyright © Syed Ali Khayam 2009 93
Uniform Distribution
A uniform rv has a uniform distribution over an interval [a, b]
1
, a ≤ x ≤b
fU (x ) = b − a
0 otherwise
0 x <a
x − a
FU (x ) = a ≤ x ≤b
b − a
1 x >b
This distribution is also called the Rectangular distribution
fU (x)
1/(b-a)
a b x
Image
g Courtesy
y of Wikipedia
p