0% found this document useful (0 votes)
13 views

Fxy Fxhy: Joint & Marginal Prob

The document discusses probability concepts such as joint probability, marginal probability, conditional probability, expected value, and covariance. It provides examples to illustrate how to calculate marginal densities, conditional densities, expected values, and covariance for random variables with given joint probability density functions. The examples cover both discrete and continuous random variables. Formulas are given for calculating these metrics for single and multiple random variables.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Fxy Fxhy: Joint & Marginal Prob

The document discusses probability concepts such as joint probability, marginal probability, conditional probability, expected value, and covariance. It provides examples to illustrate how to calculate marginal densities, conditional densities, expected values, and covariance for random variables with given joint probability density functions. The examples cover both discrete and continuous random variables. Formulas are given for calculating these metrics for single and multiple random variables.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

2009/11/10

Slide
1 of 30

Joint & marginal prob.

1 (2 x + 3 y )
f ( x , y ) = 72
0

x = 0,1, 2 y = 1, 2, 3

lainnya

Slide
2 of 30

(y)

0.0417

0.0694

0.0972

0.2083

0.0833

0.1111

0.1389

0.3333

0.1250

0.1528

0.1806

0.4583

f(x))
f(x

0.2500

0.3333

0.4167

1.0000

f X ( x) = P( X = x) = f XY ( X , Y )
1
12:31 = 12 ( x + 3)

fY ( y) = P(Y = y) = f XY ( X , Y )
1
= (2 + 3 y)
24

Independent R.V.

Misal X danY adalah dua random variable, diskrit atau


kontinue, dengan fungsi joint probability f(x, y) dan
fungsi marginal probability masing-masing g(x) dan h(y).
Random variable X dan Y dikatakan independent secara
statistik jika dan hanya jika

f ( x, y ) = f ( x).h( y )
untuk semua (x, y) di dalam range mereka masing-masing

f ( x, y ) = f ( x).h( y ); ( x, y )
12:31

Class 2

2009/11/10

Slide
3 of 30

Independent R.V.

f ( x, y ) = 1

72

(2 x + 3 y ) ;x = 0,1, 2 y = 1, 2, 3
x
0

h(y))
h(y

0.0417

0.0694

0.0972

0.2083

0.0833

0.1111

0.1389

0.3333

0.1250

0.1528

0.1806

0.4583

f(x))
f(x

0.2500

0.3333

0.4167

1.0000

1
1
(2x+3y) = ( x + 3) ;x = 0,1, 2
12
y =1 72
2
1
1
h( y) = (2x+3y) = (2 + 3 y) ;y = 1, 2,3
24
x =0 72
f ( x) =

f ( x, y) f ( x).h( y)

12:31

Slide
4 of 30

Independent R.V.

f ( x, y ) =

xy
150

;x = 0,1, 2, 3, 4 y = 1, 2, 3, 4, 5
x

f ( x) =
12:31

Class 2

f(y))
f(y

0.0000

0.0067

0.0133

0.0200

0.0267

0.0667

0.0000

0.0133

0.0267

0.0400

0.0533

0.1333

0.0000

0.0200

0.0400

0.0600

0.0800

0.2000

0.0000

0.0267

0.0533

0.0800

0.1067

0.2667

0.0000

0.0333

0.0667

0.1000

0.1333

0.3333

f(x))
f(x

0.0000

0.1000

0.2000

0.3000

0.4000

1.0000

x
10

y
h( y ) =
15

;x = 0,1, 2, 3, 4

;y = 1, 2, 3, 4, 5

f ( x, y) = f ( x).h( y)

2009/11/10

Slide
5 of 30

Conditional probability

Jika X dan Y adalah r.v diskrit atau kontinu dengan joint


pdf f ( x, y ) , maka fungsi kondisional Y dg syarat X = x adalah:

f ( y | x) =

f ( x, y )
f ( x)

; f ( x) > 0

Sebaliknya fungsi kondisional X dengan syarat Y=y adalah

f ( x | y) =

f ( x, y )
f ( y)

; f ( y) > 0

f (x, y) = f ( y | x). f (x) = f (x | y). f ( y)


Jika X dan Y independent maka f ( x, y ) = f ( x). f ( y )
dan
f ( x | y ) = f ( x)
12:31sehingga f ( y | x ) = f ( y )

Slide
6 of 30

Conditional prob.

f ( x, y ) = 1

72

(2 x + 3 y ) ;x = 0,1, 2 y = 1, 2, 3

Kasus
dependent

1 (2 x + 3 y )
f ( x, y )
1 2x + 3y
f ( x | y) =
= 72
=
1
f ( y)
(2 + 3 y ) 3 2 + 3 y
24

f ( x, y ) =

xy
150

;x = 0,1, 2, 3, 4 y = 1, 2, 3, 4, 5

1
xy
f ( x, y ) 150
1
f ( x | y) =
=
= x
1
f ( y)
10
y
15

Kasus
independent

12:31

Class 2

2009/11/10

Slide
7 of 30

Conditional probability : contoh


Misal joint pdf dari continuous r.v. X dan Y adalah

6 x y

f ( x, y ) = 8

0 < x < 2; 2 < y < 4

lainnya

Tentukan
a. Marginal density dari X dan Y serta conditional
density f ( y | x)

b. P(1 < Y < 3| X = 2)

12:31

Slide
8 of 30

Conditional prob: contoh


a)

6x y
6 y xy y 2
1

= (3 x )
dy =
8
8
8
16
4
2
2
4

g ( x) =

2
6 x y = 6 x x 2 xy = 1 ( )
h( y ) =
dx
5 y
8
8 16 8 0 4
0

P(1 < Y < 3 | X = 2)


3

b)

= f ( y | x = 2)dy
2

4 y
=
dy
2
2
3
=
4
3

6x y
f ( x, y )
6x y
8
=
=
f ( y | x) =
1(
g ( x)
6 2x
3 x)
4

12:31

Class 2

2009/11/10

Slide
9 of 30

Conditional probability : contoh


Misal joint pdf dari dua continuous r.v. X danY adalah

10 xy 2
f ( x, y ) =
0

0 < x < y < 1

lainnya

Tentukan
a. Marginal densuty dari X dan Y serta conditional
density f ( y | x )
b. P (Y 0.5 | X = 0.25)
,

12:31

Slide
10 of 30

a)

Conditional probability : contoh

10 x (1 x
10 xy 3
=
3 x
3
1

g ( x) = 10 xy 2 dy =
y

h( y ) = 10 xy 2 dx =
0

10 y 2 x 2
2

b)

P(Y 0.5 | X = 0.25)


1

= 5y4

=
2

f ( y | x) =

3y 2
1 (0.25) 3 dy
0. 5

f ( x, y )
3
3y
= 10 xy 2 .
=
g ( x)
10 x(1 x 3 ) 1 x 3

64

21 y

dy

0. 5

64 y 3
.
21 3

0. 5

8
=
9
12:31

Class 2

2009/11/10

Slide
11 of 30

Expected Value

Misal X dan Y adalah random variabel dengan joint fungsi


probabilitas f(x, y) serta fungsi marginal g(x) dan h(y).
Expected values (means) dari kedua R.V. :

X = x. f ( x, y )

Y = y. f ( x, y )

X = x. g ( x )

Y = y.h ( y )

x . f ( x, y)dxdy

Y =

X =

Slide
12 of 30

x.g ( x)dx

y . f ( x, y)dxdy

12:31

diskrit

X =

Y =

kontinue

y.h( y)dy

Expected value: Contoh

Diketahui joint pdf dari r.v. X dan Y adalah sbb:


xy
96
f ( x, y ) =
0

0 < x < 4, 1 < y < 5


lainnya

Carilah nilai dari E(X) dan E(Y)

12:31

Class 2

2009/11/10

Slide
13 of 30

Expected value: Contoh

E[X ] =

x. f ( x , y )d xd y

E [Y ] =

x = 0 y =1

xy
x
dydx
96

0
4

x y

192

d x

x = 0 y =1

y. f ( x, y )d xd y

xy
y
dydx
96

xy 2
1 9 6 d y d x
5

xy 3
0 2 8 8

x2
dx
8

x3
=
12:31 2 4

x y
dydx
96
2

8
=

31x
dx
72

31x 2
=
144

Slide
14 of 30

d x

31
=

Expected value: Contoh

Jika X dan Y adalah dua random variabel dengan joint


fungsi probability f(x,y) dan H = g ( X , Y ) maka:

E ( H ) = g ( x, y ). f ( x, y )
x

: Diskrit

E(H ) =

g ( x, y ). f ( x, y )dxdy

: Continue

12:31

Class 2

2009/11/10

Slide
15 of 30

Expected value: Contoh

Secara umum, jika X = ( X 1 , X 2 ,..., X k ) memiliki joint


fungsi probability f ( x1 , x2 ,..., xk ) dan Y = g ( X 1 , X 2 ,..., X k )
adalah fungsi dari X, maka:
Diskrit:

E (Y ) = ... g ( x1 , x2 ,..., xk ). f ( x1 , x2 ,..., xk )


x1

xk

Continue:

E (Y ) =

... g ( x , x ,..., x ). f ( x , x ,..., x )dx ...dx


1

12:31

Slide
16 of 30

Expected value: Contoh

Diketahui joint pdf dari dua r.v. X dan Y adalah


xy
0 < x < 4, 1 < y < 5
96
f ( x, y ) =
for
lainnya
0

Misal H = g(X, Y) = 2X + 3Y maka expected value dari H



adalah

E [2 X + 3Y ] =

(2 x + 3 y ) f ( x, y ) dxdy

xy

(2 x + 3 y ) 96 dxdy

x = 0 y =1
4

12:31

Class 2

= 47

x 2 y xy 2
1 48 + 32
5

dydx

2009/11/10

Slide
17 of 30

Covariance

Covariance adalah sebuah ukuran hubungan linear antara 2 buah


random variabel. Jika hubungan antar random variabel tersebut
pada kenyataanya adalah non linear, maka covariance menjadi
tidak sensitive thd hubungan tsb.
Diskrit:

xy = ( x x )( y y ). f ( x, y)
x

Cov(X,Y) = E[( x x )( y y )]

Continue

xy =

(x )( y ). f (x, y)xy
x

= E ( XY ) E ( X ).E (Y )
= xy

12:31

Slide
18 of 30

Covariance

Beberapa aturan covariance:


Jika X dan Y adalah r.v. dan a dan b adalah konstanta, maka
i) Cov ( aX , bY ) = abCov ( X , Y )
ii) Cov ( a + X , b + Y ) = Cov ( X , Y )
iii) Cov ( X , aX + b ) = aCov ( X , X ) = aVar ( X )
If X and Y are independent, then

Cov ( X , Y ) = E ( XY ) E ( X ). E (Y ) = 0
12:31

Class 2

2009/11/10

Slide
19 of 30

Covariance: contoh

Joint pdf dari 2 r.v. X, Y adalah


xy
96
f ( x, y ) =
0
4

for

0 < x < 4, 1 < y < 5


otherwise
4

8
xy
E[ X ] = x dxdy =
96
3
x = 0 y =1

E[Y ] =

31
xy
y dxdy =
96
9
x = 0 y =1

E[ XY ] =

xyf ( x, y)dxdy

1
xy
x=0 y=1 xy 96 dxdy = 96 0

y 2 dydx =

248
27

Jadi, Cov(X,Y) = E[XY] E[X]E[Y] :

XY = E[ XY ] E[ X ].E[Y ] =

12:31

Slide
20 of 30

248 8 31
= 0
27 3 9

Covariance

Jika X dan Y adalah r.v. dengan joint pdf f(x,y), a dan b adalah
konstanta, maka

Var(aX bY ) = a 2 var(Y ) + b2 var( X ) 2ab.Cov(XY)


Beberapa aturan untuk variance:

X2 = E[( X x )2 ] = E[ X 2 ] x2 = E[ X 2 ] (E[ X ])2

12:31

Class 2

Jika c konstanta, maka Var[cX] = c2Var[X]


Jika X dan Y independent, maka:
Var[X Y] = Var[X] + Var[Y]
Var[aX bX]= a2Var[X] b2Var[Y],
dimana a, b adalah konstanta

10

You might also like