Week 6 Notes
Week 6 Notes
1 f(x)
a b
Therefore
b
b a dx ………………………………………………………………………………(i)
a
Therefore
1
, a xb
f ( x) b a is called the probability distribution of a uniformly
0, otherwise
distributed random variable.
1
Some distributional quantiles
1 1
a b and 2 b a
2
2 12
Proof
b
E ( X ) xf ( x)dx
a
b 1
x dx
a ba
1 b
b a a
xdx
b
1 x2
b a 2 a
1 (b a) 2
ba 2
ba
2
b
E ( X 2 ) x 2 f ( x)dx
a
b 1
x2 dx
a ba
1 b 2
b a a
x dx
b
1 x3
b a 3 a
1 (b a)3
ba 3
1 b 3ab 2 3a 2b a 3
3
ba 3
b 2ab a
2 2
3
Hence
2
Var ( X ) 2 E ( X 2 ) E ( X )
2
b 2 2ab a 2 b a
2
3 2
1
b a
2
12
y 1e y dy
1 …………………………………………………………………………..(2)
0 ( )
Since the integration of a p.d.f over its entire support equals to 1, we conclude
that the integrand of (2) is a valid p.d.f.
x 1e x
, x 0, 0
Hence f ( x) ( ) …………………………………………………..(3)
0. elsewhere
Y
Furthermore, if we consider the transformations X Y and X , we can
derive respectively type I and type II gamma distributions with two parameters
and .
y dy
To derive the latter, let x . Substituting this result in (3) gives
dx
1
y
y
e
g ( y)
( )
y
1
y e
( )
3
1 1
x
x e , x 0, ( , 0)
Therefore f ( x) ( ) is the Type II gamma distribution
0, otherwise
with parameters and .
Note
( ) y 1e y dy , α > 0
0
= 1 1
= 1 2 2
1 2 3 3
=.
.
.
= 1!
1
( )(1 ) so that if α = ½ we obtain
sin 2
4
The mean and variance of the gamma distribution are respectively given by
1
μ = αβ, σ2 = αβ2. And the moment generating function is m(t ) .
1 t
Proof
M (t ) E (etx ) etx f ( x)dx
0
1 x
etx
x 1e dx
0 ( )
x
1 tx
1
x e dx
( ) 0
1 t
1 x
( ) 0
1
x e dx
1 t u du
Let u x x dx
1 t 1 t
Thus
1
1 u du
M (t )
( ) 0 1 t
eu
1 t
1
0
u 1e u du
( )(1 t )
1
( )
( )(1 t )
1
(1 t )
Next we obtain the first and second moments about the origin.
5
d
E( X ) M (t ) |t 0
dt
d 1
|t 0
dt (1 t )
d
(1 t ) |t 0
dt
( )(1 t ) 1 ( ) |t 0
d2
E ( X ) 2 M (t ) |t 0
2
dt
d
(1 t ) 1 |t 0
dt
( 1)(1 t ) 2 ( ) |t 0
2 ( 1)
Hence
Var ( X ) E ( X 2 ) E ( X )
2
2 ( 1) ( ) 2
2 2 2 2 2
2
Note
The first and second moments about the origin may also be obtained from the r-
expectation.
6
Example
Solution.
x 1e
x
, x>0
f ( x)
0,
otherwise
x 21e 3
x
f ( x) 2
3 2
xe 3
x
, x>0
= 9 2
0,
elsewhere
But 2 =(2-1)! = 1! = 1.
xe 3
x
, x>0
Thus f ( x) 9
0,
elsewhere
xe 3
1 x
a. P x 1 dx
0
9
1
1
= xe 3 dx
x
90
7
dv du
Recall u dx dx uv v dx dx, which is the formula for integration by parts.
Therefore
1
1
p( x 1) x 3e 3 3e 3 .1dx
x x
9 0
1 1
= 3 xe 3 9e 3
x x
9 0
1
1 x x
= xe 3 e 3
3 0
1 1 1
= e 3 e 3 0 e0
3
4 1 4 1
= e 3 1 1 e 3 =0.0446
3 3
x
2 3
xe
b. p(1 x 2) dx
1
9
2
1 x
xe dx
3
91
2
1 x x
= x 3e 3e .1dx
3 3
9 1
1 2
= 3 xe 3 9e 3
x x
9 1
2
1 x x
= xe 3 e 3
3 1
8
1 2 2 1 1 1
= e 3 e 3 e 3 e 3
3 3
4 1 5 2
= e 3 e 3 = .0998
3 3
e x
, x>0
f ( x)
0,
elsewhere
1
2 2 Its moment generating function is m(t )
1 t