Vous êtes sur la page 1sur 30

Prepared by : M. Dokhi, Ph.D.

9:01
1 of 45
EXPECTED VALUE OF A FUNCTION &
JOINT MGF
EXPECTED VALUE OF A FUNCTION &
JOINT MGF
Prepared by : M. Dokhi, Ph.D.
9:01
2 of 45
Sessions target
Nilai harapan bersama (Joint expected value)
Kovarian (Covariance)
Korelasi (Correlation)
Nilai Harapan Bersyarat (Conditional Expected Value)
MGF Bersama (Joint MGF)
Prepared by : M. Dokhi, Ph.D.
9:01
3 of 45
Expected value (Review)
Expected value of discrete R.V.
1
( ) (1 ) ; 0,1
x x
X f x p p x

= =
1
1 0 1 1 0
0
( ) (1 ) 0 (1 ) 1 (1 )
x x
x
E X x p p p p p p p

=
= = + =

1
2 2 1 2 0 1 2 1 0
0
( ) (1 ) 0 (1 ) 1 (1 )
x x
x
E X x p p p p p p p

=
= = + =

( )
2
2 2
( ) [ ] [ ] (1 ) V X E X E X p p p p = = =
Prepared by : M. Dokhi, Ph.D.
9:01
4 of 45
Expected value (Review)
2
1
2
1
( ) ;
2
x
X f x e x
t

= s s
2 2
1 1
2 2
0
1 1
( ) 2 0
2 2
x x
E X x e dx x e dx
t t

= =
} }
2 2
1 1
2 2 2
2 2
0
1 1
( ) 2 1
2 2
x x
E X x e dx x e dx
t t

= =
} }
( )
2
2 2
( ) [ ] [ ] 1 0 1 V X E X E X = = =
0
( 1)
x
x e dx
o
o t


+ =
}
( )
1
2
t t =
1
0
!
x
k k
a
x e dx k a


+
=
}
Expected value of continuous R.V.
Prepared by : M. Dokhi, Ph.D.
9:01
5 of 45
Joint pdf and expected value
Let X and Y be random variables with joint probability f(x, y).
Their expected values (means) are written as
Discrete random variables:
or
Continuous random variables:
or
( , )
X
x y
x f x y =

( , )
Y
y x
y f x y =

( , )
X
x f x y dydx


=
} }
( , )
Y
y f x y dxdy


=
} }
( )
X
x
x f x =

( )
Y
y
y f y =

( )
X
x f x dx

=
}
( )
Y
y f y dy

=
}
Prepared by : M. Dokhi, Ph.D.
9:01
6 of 45
Contoh
A joint pdf of two random variables X, Y is given by
otherwise
y x
for y x f
xy
5 1 , 4 0
0
) , (
96
< < < <

=
4 5
0 1
4 5
2
0 1
5
4
2 2
0
1
4
2
0
4
3
0
[ ] ( , )
96
96
192
8
8
24 3
x y
E X x f x y dxdy
xy
x dydx
x y
dydx
x y
dx
x
dx
x


= =
=
| |
=
|
\ .
=
| |
| =
|
\ .
=
| |
| = =
|
\ .
} }
} }
} }
}
}
4 5
0 1
4 5
2
0 1
5
4
3
0
1
4
0
4
2
0
[ ] ( , )
96
96
288
31
72
31 31
144 9
x y
E Y y f x y dxdy
xy
y dydx
xy
dydx
xy
dx
x
dx
x


= =
=
| |
=
|
\ .
| |
=
|
\ .
| |
| =
|
\ .
=
| |
| = =
|
\ .
} }
} }
} }
}
}
Prepared by : M. Dokhi, Ph.D.
9:01
7 of 45
Expected value of a function
| |
E H =
( ). ( )
x
u x f x

( ) ( )
x
u x f x dx
}
; X diskrit
; X kontinu
Misalkan ( ) adalah sembarang fungsi dari X, maka H u X =
J ika ( ) [ ( )] [ ] Rata-rata
X
u X X E u X E X X = = = =
| | | |
( ) ( )
2
2
2
2 2
Jika ( ) ( [ ]) ( ) ( )
( ) [ ]
X
u X X E X E u X E X E X
E X E X V X o
= =
= = =

R.V. ( ) X f x
Prepared by : M. Dokhi, Ph.D.
9:01
8 of 45
If X and Y has a joint pdf f(x,y) and if is a
function of X and Y, maka
Discrete random variables:
Continuous random variables:
( ) ( , ) ( , )
x y
E H u x y f x y =

dxdy y x f y x u H E
} }


= ) , ( ) , ( ... ) (
) , ( Y X u H =
Expected value of a function
Prepared by : M. Dokhi, Ph.D.
9:01
9 of 45
If adalah joint fungsi dari
maka untuk
1
1 1
( ) ... ( ,..., ) ( ,..., )
k
k k
x x
E H u x x f x x =

1 2
( , ,..., )
k
H u X X X =
Expected value of a function
1 2
, ,...,
k
X X X
1 2
( , ,..., )
k
f X X X
Jika diskrit
1 2
, ,...,
k
X X X
Jika kontinu
1 2
, ,...,
k
X X X
1
1 1 1
( ) ... ( ,..., ) ( ,..., ) ...
k
k k k
x x
E H u x x f x x dx dx =
} }
Prepared by : M. Dokhi, Ph.D.
9:01
10 of 45
Example
Joint pdf of two random variables X, Y is given by
Let
The expected value of H is
96
0 4, 1 5
( , )
0
xy
x y
f x y for
otherwise
< < < <
=

4 5
0 1
4 5
2 2
0 1
[2 3 ] (2 3 ) ( , )
(2 3 )
96

48 32
47

3
x y
E X Y x y f x y dxdy
xy
x y dxdy
x y xy
dydx


= =
+ = +
| |
= +
|
\ .
| |
= +
|
\ .
=
} }
} }
} }
( , ) 2 3 H u X Y X Y = = +
Prepared by : M. Dokhi, Ph.D.
9:01
11 of 45
Covariance: Definition
X,Y discrete
X,Y continuous
Ukuran keeratan
hubungan linear
antara 2 R.V.
Misalkan ( , ) ( [ ])( [ ]) H u X Y X E X Y E Y = =
( )
Covar ,
XY
X Y
o
=
=
( )( )
( )( )
( )( )
( , )
( , )
X Y
X Y
x y
X Y
y x
E X Y
X Y f X Y
X Y f X Y dxdy



= (

=
=

} }
| | ( )( )
[ ] [ ] E H E X E X Y E Y = (

Prepared by : M. Dokhi, Ph.D.
9:01
12 of 45
Variance vs. Covariance
Case of 1 R.V.
( )
| |
( )
2
2
2
2
Var
( )
( ) [ ]

X
X
E X E X
E X E X
o =
=
=
Case of 2 R.V.
( )
( )( )
Covar ,
[ ] [ ]
( ) [ ] [ ]
XY
X Y
E X E X Y E Y
E XY E X E Y
o =
= (

=
Rumus hitung
Variance
Rumus hitung
Covariance
Var( ) Covar( , ) X X X =
Prepared by : M. Dokhi, Ph.D.
9:01
13 of 45
Some properties of Covariance
If X and Y are random variables and a and
b are constant, then
If X and Y are independent, then
( , ) ( , ) Cov aX bY abCov X Y =
) , ( ) , ( Y X Cov Y b X a Cov = + +
) ( ) , ( ) , ( X aVar X X aCov b aX X Cov = = +
0 ) ( ). ( ) ( ) , ( = = Y E X E XY E Y X Cov
Prepared by : M. Dokhi, Ph.D.
9:01
14 of 45
Covariance: Example
A joint pdf of two random variables X, Y is given by
Thus, Cov(X,Y) = E[XY] E[X]E[Y] :
otherwise
y x
for y x f
xy
5 1 , 4 0
0
) , (
96
< < < <

=
3
8
96
] [
4
0
5
1
=
|
.
|

\
|
=
} }
= = x y
dxdy
xy
x X E
9
31
96
] [
4
0
5
1
=
|
.
|

\
|
=
} }
= = x y
dxdy
xy
y Y E
4 5 4 5
2 2
0 1 0 1
[ ] ( , )
1 248

96 96 27
x y
E XY xyf x y dxdy
xy
xy dxdy x y dydx


= =
=
| |
= = =
|
\ .
} }
} } } }
0
9
31
3
8
27
248
] [ ]. [ ] [ =
|
.
|

\
|
|
.
|

\
|
= = Y E X E XY E
XY
o
Prepared by : M. Dokhi, Ph.D.
9:01
15 of 45
Variance of a function
Some properties of variance

If c is a constant, Var[cX] = c
2
Var[X]
If X and Y are independent random variables, then
Var[X Y] = Var[X] + Var[Y]
Var[aX + bX]= a
2
Var[X] + b
2
Var[Y],
where a, b are constants
2 2 2 2 2 2
]) [ ( ] [ ] [ ] ) [( X E X E X E X E
X
= = = o
Prepared by : M. Dokhi, Ph.D.
9:01
16 of 45
Correlation Coefficient
Correlation is another measure of the strength of
dependence between two random variables.
It scales the covariance by the standard deviation of
each variable.
If X and Y are independent, then = 0, but = 0 does
not imply independence
Prepared by : M. Dokhi, Ph.D.
9:01
17 of 45
Correlation Coefficient: Problem
Assume the length X in minutes of a particular type of
telephone conversation is a random variable with
probability density function
Determine
The mean length E(X) of this telephone
conversation.
Find the variance and standard deviation of X
Find
5 /
5
1
) (
x
e X f

=
< < x 0
] ) 5 [(
2
+ X E
Prepared by : M. Dokhi, Ph.D.
9:01
18 of 45
Correlation Coefficient: Problem
| |
| |
| |
5
25
5
1
25 5
5
1
5 1
5 5
5
1
5 5
5
1
5
1
] [
0
5 5
0
5
5
0
5 5
0
5
=
=
=
(

|
|
.
|

\
|

+ =
=
=
=

}
}
}
x x
x
x
x x
x
e xe
e
xe
dx e xe
vdu uv
dx xe X E
5
5
5
x
x
e v dx du
dx e dv x u

= =
= =
Use integration by part:
Prepared by : M. Dokhi, Ph.D.
9:01
19 of 45
Correlation Coefficient: Problem
| |
( ) | |
( ) | |
| |
50
5
250
250 50 5
5
1
25 5 10 5
5
1
5 5 10 5
5
1
10 5
5
1
5
1
] [
5 5 5 2
0
5 5 5 2
0
5 5 5 2
0
5 5 2
0
5 2 2
= =
=
+ =
+ =
=
=
=

}
}
}
}
x x x
x x x
x x x
x x
x
e xe e x
e xe e x
dx e xe e x
dx xe e x
vdu uv
dx e x X E
5
5
5
x
x
e v dx du
dx e dv x u

= =
= =
25 5 50 )) ( ( ) ( ) var(
2 2 2
= = = X E X E X
5 ) var( ) ( = = X X std
5
5 2
5 2
x
x
e v xdx du
dx e dv x u

= =
= =
Prepared by : M. Dokhi, Ph.D.
9:01
20 of 45
Correlation Coefficient: problem
E[(X + 5)
2
] = E[(X
2
+ 10X + 25)]
= E[X
2
] + 10E[X] + E[25]
= 50 + 10[5] + 25
= 125
Prepared by : M. Dokhi, Ph.D.
9:01
21 of 45
Correlation Coefficient: problem
The joint density function of X and Y is given by
Find the covariance and correlation coefficient of X and Y
1
20 40
200
( , )
0
x y
f x y
elsewhere

< < <

Prepared by : M. Dokhi, Ph.D.


9:01
22 of 45
Correlation Coefficient: problem
In order to calculate the covariance, we need the values of E[XY],
E[X], and E[Y]. First compute the marginal pdf of X and Y
20 < x < 40 20 < y < 40
Then from the marginal pdf calculate E[X], and E[Y]. The E[XY] is
calculated from the joint pdf
x
dy x g
x
005 . 0 2 . 0
200
1
) (
40
=
=
}
1 . 0 005 . 0
200
1
) (
20
=
=
}
y
dx y h
y
67 . 26
) 005 . 0 2 . 0 ( ] [
40
20
=
=
}
dx x x X E
33 . 33
) 1 . 0 005 . 0 ( ] [
40
20
=
=
}
dy y y Y E
900
2
800
200
1
200
1
] [
40
20
3
40 40
20
=
=
|
.
|

\
|
=
}
} }
dx
x
x
dydx xy XY E
x
Jadi, o
XY
= Cov[XY]
Cov[XY] = E[XY] E[X]*E[Y]
= 900 26.67(33.33)
= 11.09
Prepared by : M. Dokhi, Ph.D.
9:01
23 of 45
Correlation Coefficient: problem
In order to calculate the correlation coefficient, we need the values of
E[X
2
], E[Y
2
], Var [X] and Var[Y].

X
2
= Var[X] = E[X
2
] E[X]
2
= 733.33 (26.67)
2
= 22.204

Y
2
= Var[Y] = E[Y
2
] E[Y]
2
= 1133.33 (33.33)
2
= 22.244
Thus the correlation coefficient is
33 . 733
) 005 . 0 2 . 0 ( ] [
40
20
2 2
=
=
}
dx x x X E
33 . 1133
) 1 . 0 005 . 0 ( ] [
40
20
2 2
=
=
}
dy y y Y E
[ ] 11.09
0.499
[ ] [ ] 22.204 22.244
XY
X Y
Cov EX
Var X Var Y
o

o o
= = = =

Prepared by : M. Dokhi, Ph.D.
9:01
24 of 45
Correlation Coefficient: problem
Consider the joint density function
x >2; 0 < y < 1;
elsewhere;
Compute f(x), f(y), E[X], E[Y], E[XY], o
XY
,
XY
.
3
16
) , (
x
y
y x f =
0 ) , ( = y x f
Prepared by : M. Dokhi, Ph.D.
9:01
25 of 45
Moment
The k
th
moment about the origin of a random variable X is
The k
th
moment about the mean is

= =
}


continuous is X if x f x
discrete is X if x f x
X E
k
x
k
k
k
) (
) (
] [ '
k k
k
X E X E X E ) ( )] ( [ = =
Prepared by : M. Dokhi, Ph.D.
9:01
26 of 45
Correlation Coefficient: problem
Moments are useful in characterizing some features of the
distribution
The first and the second moment about the origin are given by
We can write the mean and variance of a random variable as
The second moment about the mean is the variance.
The third moment about the mean is a measure of skewness of
a distribution.
2 2
2
] [ o = = X E
] [ '
1
X E =
] [ '
2
2
X E =
2
1 2
2
) ' ( ' o =
'
1
=
Prepared by : M. Dokhi, Ph.D.
9:01
27 of 45
Moment Generating Function (MGF)
Moment-generating function is used to determine the moments of
distribution
It will exist only if the sum or integral converges.
If a moment-generating function of X does exist, it can be used to
generate all the moments of that variable.
Prepared by : M. Dokhi, Ph.D.
9:01
28 of 45
Moment Generating Function (MGF)

=
=
m
i
i
tx
X
x f e t M
i
1
) ( ) (

=
=
m
i
i
tx
i X
x f e x t M
i
1
'
) ( ) (

=
=
m
i
i
tx r r
X
x f e x t M
i
i
1
) (
) ( ) (
Prepared by : M. Dokhi, Ph.D.
9:01
29 of 45
Moment Generating Function (MGF)
] [ ],..., [ ], [
2 k
X E X E X E

=
= =
m
i
i
r r
X
x f x t M
i
1
) (
) ( ) 0 (
Prepared by : M. Dokhi, Ph.D.
9:01
30 of 45
Moment Generating Function (MGF)
Find the moment-generating function of the binomial random
variable X and then use it to verify that and
First derivation, E[X]
Second derivation, E[X
2
]
Setting t = 0 we get
Therefore,
np =
npq =
2
o
( )
( )
n
t
n
x
x n
x
t
n
x
x n x tx
X
q pe
q pe
x
n
q p
x
n
e t M
+ =
|
|
.
|

\
|
=
|
|
.
|

\
|
=

0
0
) (
The last sum is
the binomial
expansion of
(pe
t
+q)
n
( )
t
n
t
X
pe q pe n
dt
t dM 1 ) (
+ =
( )( ) ( ) | |
t
n
t t
n
t t
X
e q pe pe q pe n e np
dt
t M d 1 2
2
2
1
) (
+ + + =
npq p np np = = = = = ) 1 (
2 '
2
2 '
1
o
( ) | | 1 1 ] [ ] [
'
2
2 '
1
1
+ = = = = p n np X E np X E

Vous aimerez peut-être aussi