Chapter 2 Random Variables
Chapter 2 Random Variables
E-mail: khanhvanphan@hcmut.edu.vn
April 9, 2021
4 Conditional expectation
HHH 3 heads: x =3
HHT 2 heads: x =2
HTH 2 heads: x =2
HTT 1 head: x =1
THH 2 heads: x =2
THT 1 head: x =1
TTH 1 head: x =1
TTT 0 heads: x =0
P(X = 0) = 0.008
P(X = 1) = 0.096
P(X = 2) = 0.384
P(X = 3) = 0.512
.
(Phan Thi Khanh Van) Chap 2: Random variables April 9, 2021 8 / 41
Discrete random variables. Cumulative Distribution
Function
Consider the number of cameras that pass the test
x 0 1 2 3
f (x) = P(X = x) 0.008 0.096 0.384 0.512
Consider: F (2.5) = P(X ≤ 2.5) = 0.008 + 0.096 + 0.384 = 0.488
F (x) = P(X ≤ x)
=
0, if x < 0,
0.008, if 0 ≤ x < 1,
0.104, if 1 ≤ x < 2,
0.488, if 2 ≤ x < 3,
1, if x ≥ 3
- Cumulative Distribution
Function (CDF)
(Phan Thi Khanh Van) Chap 2: Random variables April 9, 2021 9 / 41
Cumulative Distribution Functions (CDF)
The cumulative distribution function of a discrete random variable X ,
denoted as F (x), is
P
F (x) = P(X ≤ x) = f (xi )
xi ≤x
0, if x < 0,
0.008, if 0 ≤ x < 1,
F (x) = 0.104, if 1 ≤ x < 2,
0.488, if 2 ≤ x < 3,
1, if x ≥3
Z5
P(X < 5) = f (x)dx
−∞
Z5
= 5dx
4.9
= 0.5.
Z∞
P(X > 12.6) = f (x)dx
12.6
Z∞
= 20e −20(x−12.5) dx
12.6
−2
=e .
dF (x)
Property: = f (x) (as long as the derivative exists).
dx
Mean:
54.72 + 51.095 + ... + 60
µ= = 58.619 (thousand $)
6
Variance:
(54.72 − µ)2 + (51.095 − µ)2 + ... + (60 − µ)2
σ2 =
6
= 32.227 ((thousand $)2 )
Standard deviation:
√
σ = σ 2 = 6.1014 (thousand $)
Standard deviation
The standard deviation of X , denoted as σ is
√
σ = σ2.
Properties of Variance
1 Let a and b be constants, g and h be functions. For any random
variable X :
V [ag (X ) + b] = a2 V [g (X )]
2 In particular
V (aX + b) = a2 V (x)
The response time is the speed of page downloads and it is critical for a
mobile Web site. Let X denote the number of bars of service, and let Y
denote the response time (to the nearest second) for a particular user and
site. Consider 1000 page downloads, the number of downloads in each
category is given as below
x = ] of Bars of Signal Strength
y = Response time 1 2 3
4 150 100 50
3 20 100 50
2 20 30 200
1 10 20 250
- joint events.
(X , Y ) is a discrete random vector.
x = Number of errors
y = Number of X-rays 0 1 2 fY
3 0.17 0.17 0.17 0.17
2 0.25 0.25 0.25 0.25
1 0.28 0.28 0.28 0.28
0 0.3 0.3 0.3 0.3
fX 0.75 0.2 0.05
Linear function
Given random variables X1 , X2 , ...Xp and constants c1 , c2 , ...cp ,
Y = c1 X1 + c2 X2 + .... + cp Xp is a linear combination of X1 , X2 , ...Xp .