02-Random Variables
02-Random Variables
v. P( x1 X x2 ) FX ( x2 ) FX ( x1 )
vi. P( X x) 1 FX ( x)
Example:
Find the cdf of the random variable X which is defined as the
number of heads in three tosses of a fair coin.
0, x 0
1 / 8, 0 x 1
FX ( x) 1 / 2, 1 x 2
7 / 8, 2 x 3
1, x 3
PX ( X xi ) PX ( xi ) FX ( xi ) FX ( xi 1 )
i. 0 PX ( xi ) 1, k 1, 2, .....
ii. PX ( x) 0, if x xk , k 1, 2, .....
iii. Pk
X ( xk ) 1
FX ( x) P
xk x
X ( xk )U ( x xk )
X E ( X ) xf X ( x)dx
X E ( X ) xk PX ( xk )
k
2 X Var ( X ) E[( X X ) 2 ]
2
X Var ( X ) ( x X ) 2 f X ( x)dx
2
X Var ( X ) E ( X ) [ E ( X )]
2 2
2 X Var( X ) ( xk X ) 2 PX ( xk )
k
X E ( X X ) 2 Var( X )
iii.Moments
The nth moment of a continuous random variable X is defined as:
E ( X ) x n f X ( x)dx ,
n
n 1
Semester-I, 2017 By Habib M. 15
Expected Value, Variance and Moments Cont’d…..
E ( X ) xk PX ( xk ) , n 1
n
2
Semester-I, 2017 By Habib M. 17
Some Special Distributions Cont’d……
x
Fig. Normal or Gaussian Distribution
3. Exponential Distribution
f X (x)
1
e x / , x 0,
f X ( x) x
0, otherwise. Fig. Exponential Distribution
4. Gamma Distribution
x 1 x /
e , x 0,
f X ( x ) ( )
0, otherwise.
5. Beta Distribution
1
x a 1 (1 x) b 1 , 0 x 1,
f X ( x ) ( a, b)
0, otherwise.
where
1
( a , b) 0
u a 1 (1 u ) b 1 du.
6. Rayleigh Distribution
x x 2 / 2 2
2e , x 0,
f X ( x )
0, otherwise.
7. Cauchy Distribution
/
f X ( x) , x .
(x )
2 2
8. Laplace Distribution
1 |x|/
f X ( x) e , x .
2
Semester-I, 2017 By Habib M. 21
Some Special Distributions Cont’d….
4. Hypergeometric Distribution
m N m
k n k
P( X k )
N
, max(0, m n N ) k min( m, n )
n
5. Geometric Distribution
P( X k ) pqk , k 0,1,2,, , q 1 p.
Example-1:
The pdf of a continuous random variable is given by:
kx , 0 x 1
f X ( x)
0 , otherwise
whe re k is a constant.
c. Find P (1 / 4 X 1)
2 x, 0 x 1
f X ( x)
0, otherwise
Semester-I, 2017 By Habib M. 25
Random Variable Examples Cont’d……
Solution:
b. The cdf of X is given by :
x
FX ( x)
f X (u ) du
Case 1 : for x 0
FX ( x) 0, since f X ( x) 0, for x 0
Case 2 : for 0 x 1
x x x
FX ( x) f X (u ) du 2udu u x2
2
0 0 0
Case 3 : for x 1
1 1 1
FX ( x ) f X (u ) du 2udu u 1
2
0 0 0
The cdf is given by
0, x0
2
FX ( x ) x , 0 x 1
1, x 1
1
P (1 / 4 X 1) x 2
15 / 16
1/ 4
P (1 / 4 X 1) 15 / 16
ii. Using the cdf
P (1 / 4 X 1) FX (1) FX (1 / 4)
P (1 / 4 X 1) 1 (1 / 4) 2 15 / 16
P (1 / 4 X 1) 15 / 16
Semester-I, 2017 By Habib M. 28
Random Variable Examples Cont’d……
Solution:
d. Mean and Variance
i. Mean
1 1
X E ( X ) xf X ( x)dx 2 x 2 dx
0 0
2 x3 1
X 2/3
3 0
ii. Variance
X 2 Var ( X ) E ( X 2 ) [ E ( X )]2
1 1
E ( X ) x f X ( x ) dx 2 x 3 dx 1 / 2
2 2
0 0
X Var ( x ) 1 / 2 ( 2 / 3) 2 1 / 18
2
Example-2:
Consider a discrete random variable X whose pmf is given by:
1 / 3 , xk 1, 0, 1
PX ( xk )
0 , otherwise
ii. Variance
X 2 Var ( X ) E ( X 2 ) [ E ( X )]2
1
E( X ) k X k ] 2/3
2 2 2 2 2
x P ( x ) 1 / 3[( 1) ( 0) (1)
k 1
X Var ( x) 2 / 3 (0) 2 2 / 3
2
2.
3.
4.
5.
1
Y g( X ) |X |
X
X
log X
eX | X | U ( x)
FY ( y) P( g ( X ) y) P(Y y)
dFY ( y )
fY ( y )
dy
dxi
f Y ( y) f X ( xi ) g ( xi ) f X ( xi )
i dy i
Examples:
a. Let Y aX b. Find f Y ( y ).
b. Let Y X 2 . Find f Y ( y ).
1
c. Let Y . Find f Y ( y ).
X
d . The random variable X is uniform in the interval [ , ].
2 2
If Y tan X , determine the pdf of Y .
a. Y aX b
i. Using Method I
Suppose that a 0
y b
Fy ( y ) P (Y y ) P (aX b y ) P X
a
y b
FY ( y ) FX
a
dFY ( y ) 1 y b
f Y ( y) fX (i )
dy a a
a. Y aX b
i. Using Method I
y b
Fy ( y ) P(Y y ) P(aX b y ) P X
a
y b
FY ( y ) 1 FX
a
dFY ( y ) 1 y b
f Y ( y) fX (ii)
dy a a
Semester-I, 2017 By Habib M. 39
Examples on Functions of One Random Variable…..
Solutions:
a. Y aX b
i. Using Method I
1 y b
f Y ( y) fX , for all a
a a
a. Y aX b
ii. Using Method II
The function Y aX b is one - to - one and the range
space of Y is IR
y b
For any y, x h( y ) is the principal solution
a
dx dh( y ) 1 dx 1
dy dy a dy a
dh y y b
f X h( y ) f Y ( y )
dx 1
f Y ( y) f X ( x) fX
dy dy a a
dx2 1 dx2 1
dy 2 y dy 2 y
1
2 y f X y f y ,
X y0
f Y ( y)
0, otherwise
Semester-I, 2017 By Habib M. 43
Examples on Functions of One Random Variable…..
Solutions:
1
c. The function Y is one - to - one and the range
X
space of Y is IR /0
1
For any y, x h( y ) is the principal solution
y
dx dh( y ) 1
2
dy dy y
dh y 1
f X h( y ) f Y ( y ) 2 f X
dx 1
f Y ( y) f X ( x)
dy dy y y
1
IR /0
1
f Y ( y) 2
f X
,
y y
Semester-I, 2017 By Habib M. 44
Examples on Functions of One Random Variable…..
Solutions:
d . The function Y tan X is one - to - one and the range
space of Y is (, )
dx dh( y ) 1
dy dy 1 y2
dh y 1/
f X h( y ) f Y ( y )
dx
f Y ( y) f X ( x)
dy dy 1 y2
1
f Y ( y) , y
(1 y )
2
whe re k is a constant.
Find :
a. the value of k .
b. the cdf of X .
c. P ( X 1)
whe re k is a constant.
Determine :
a. the value of k .
b. the pdf of X .