0% found this document useful (0 votes)
36 views94 pages

Lec10 - 11 - Jointly Distributed

The document discusses jointly distributed random variables and their probability distributions. It provides an example where two dice are rolled and defines two random variables: X is the number of times a six appears, and Y is the sum of the dice values. It then shows the joint probability distribution in a table and defines concepts like marginal and conditional probability distributions.

Uploaded by

ahmed kaed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views94 pages

Lec10 - 11 - Jointly Distributed

The document discusses jointly distributed random variables and their probability distributions. It provides an example where two dice are rolled and defines two random variables: X is the number of times a six appears, and Y is the sum of the dice values. It then shows the joint probability distribution in a table and defines concepts like marginal and conditional probability distributions.

Uploaded by

ahmed kaed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 94

1

Jointly distributed Random


variables

Multivariate distributions
2

Jointly distributed Random


variables

Multivariate distributions

2 or more random variables (X, Y, etc)


defined for the same random
experiment.
3
(introduction)Example for illustration
• Toss a coin 3 times. Define,
X: total number of tails,
Y: total number of heads.
• The sample space is S ={TTT, TTH, THT, HTT, THH,
HTH, HHT, HHH}.
• We display the joint probability distribution of X and Y
in the following table : f  x, y   P  X  x and Y  y 
y 0 1 2 3

x
0 0 0 0 p(HHH)=1/8
1 0 0 p(HTH, ,THH,HHT)=3/8 0
2 0 P(TTH, HTT,THT)=3/8 0 0
3 P(TTT)=1/8 0 0 0 3
4

General properties of the joint probability


function; Discrete case
f(x,y) = P[X = x, Y = y]

1. 0  f  x, y   1

2.  f  x, y   1
x y

3. P  X , Y   A   f  x, y 
 x, y   A
5

Example:
Two dice are rolled
Sample space:

X = the number of times a “six” appears.


Y = the sum of values of the two dice number.
6

Table: f (x,y) (joint probability distribution)


y 2 3 4 5 6 7 8 9 10 11 12
x
0 1/36 2/36 3/36 4/36 5/36 4/36 3/36 2/36 1/36 0 0

1 0 0 0 0 0 2/36 2/36 2/36 2/36 2/36 0

2 0 0 0 0 0 0 0 0 0 0 1/36

what is P(X  1, Y  4)

1 2  3
P(X  1, Y  4)   f  x, y  
36
1 2 1 4
what is P[Y=X +10]? P Y  X  10  
36 36
7

Marginal and conditional


distributions
8
Definition:
Let X and Y denote two discrete random variables
with joint probability function
f(x,y) = P[X = x, Y = y]
Then
fX(x) = P[X = x] is called the marginal probability
function of X.
and
fY(y) = P[Y = y] is called the marginal probability
function of Y.
9
Note: Let y1, y2, y3, … denote the possible values of Y.

f X  x   P  X  x    f  x, y j    f  x, y 
j y

Thus the marginal probability function of X, fX(x) is


obtained from the joint probability function of X and Y by
summing f(x,y) over the possible values of Y.
10
Also
fY  y   P Y  y    f  xi , y    f  x, y 
i x

Thus the marginal probability function of y, fY(y) is


obtained from the joint probability function of X and Y by
summing f(x,y) over the possible values of X.
11

Example:
Two dice are rolled
X = the number of times a “six” appears.
Y = the sum of values of the two dice number.
y 2 3 4 5 6 7 8 9 10 11 12
x
0 1/36 2/36 3/36 4/36 5/36 4/36 3/36 2/36 1/36 0 0

1 0 0 0 0 0 2/36 2/36 2/36 2/36 2/36 0

2 0 0 0 0 0 0 0 0 0 0 1/36
12

Example:
Two dice are rolled
X = the number of times a “six” appears.
Y = the sum of values of the two dice number.
y 2 3 4 5 6 7 8 9 10 11 12 f X ( x)
x
1/36 2/36 3/36 4/36 5/36 4/36 3/36 2/36 1/36 0 0 25/36
0
1 0 0 0 0 0 2/36 2/36 2/36 2/36 2/36 0

2 0 0 0 0 0 0 0 0 0 0 1/36
13

Example:
Two dice are rolled
X = the number of times a “six” appears.
Y = the sum of values of the two dice number.
y 2 3 4 5 6 7 8 9 10 11 12 f X ( x)
x
1/36 2/36 3/36 4/36 5/36 4/36 3/36 2/36 1/36 0 0 25/36
0
0 0 0 0 0 2/36 2/36 2/36 2/36 2/36 0 10/36
1
2 0 0 0 0 0 0 0 0 0 0 1/36
14

Example:
Two dice are rolled
X = the number of times a “six” appears.
Y = the sum of values of the two dice number.
y 2 3 4 5 6 7 8 9 10 11 12 f X ( x)
x
1/36 2/36 3/36 4/36 5/36 4/36 3/36 2/36 1/36 0 0 25/36
0
0 0 0 0 0 2/36 2/36 2/36 2/36 2/36 0 10/36
1
0 0 0 0 0 0 0 0 0 0 1/36 1/36
2
15

Example:
Two dice are rolled
X = the number of times a “six” appears.
Y = the sum of values of the two dice number.
y 2 3 4 5 6 7 8 9 10 11 12 f X ( x)
x
1/36 2/36 3/36 4/36 5/36 4/36 3/36 2/36 1/36 0 0 25/36
0
0 0 0 0 0 2/36 2/36 2/36 2/36 2/36 0 10/36
1
0 0 0 0 0 0 0 0 0 0 1/36 1/36
2
fY ( y ) 1/36 2/36 3/36 4/36 5/36 6/36 5/36 4/36 3/36 2/36 1/36

25 10 fY ( y  7)  6
f X ( x  0)  f X ( x  1) 
36 36 36
16

Conditional Distributions
17
Definition:
Let X and Y denote two discrete random variables
with joint probability function
f(x,y) = P[X = x, Y = y]
Then
fX |Y (x)= P[X = x|Y = y] is called the conditional probability
function of X given Y = y

and
fY |X (y)= P[Y = y|X = x] is called the conditional probability
function of Y given X = x
18
Note
f X Y ( x)  P  X  x Y  y 
P  X  x, Y  y  f  x , y 
 
P Y  y  fY  y 
and
fY X ( y )  P Y  y X  x 

P  X  x, Y  y  f  x, y 
 
P  X  x fX  x
19
Difference between Marginal distributions
and Conditional Distributions

• Marginal distributions describe how one


variable behaves ignoring the other variable.

• Conditional distributions describe how one


variable behaves when the other variable is
held fixed
20
Example:
Two dice are rolled
X = the number of times a “six” appears.
Y = the sum of values of the two dice number.

y 2 3 4 5 6 7 8 9 10 11 12
x f X ( x)
1/36 2/36 3/36 4/36 5/36 4/36 3/36 2/36 1/36 0 0 25/36
0
0 0 0 0 0 2/36 2/36 2/36 2/36 2/36 0 10/36
1
0 0 0 0 0 0 0 0 0 0 1/36 1/36
2
fY ( y ) 1/36 2/36 3/36 4/36 5/36 6/36 5/36 4/36 3/36 2/36 1/36

p  x  0 y  7 
21
Example:
Two dice are rolled
X = the number of times a “six” appears.
Y = the sum of values of the two dice number.

y 2 3 4 5 6 7 8 9 10 11 12
x f X ( x)
1/36 2/36 3/36 4/36 5/36 4/36 3/36 2/36 1/36 0 0 25/36
0
0 0 0 0 0 2/36 2/36 2/36 2/36 2/36 0 10/36
1
0 0 0 0 0 0 0 0 0 0 1/36 1/36
2
fY ( y ) 1/36 2/36 3/36 4/36 5/36 6/36 5/36 4/36 3/36 2/36 1/36

4
 0, 7 
p  x  0 y  7 
f 36  2

fY  y  7  6 3
36
22

Example:
Two dice are rolled
X = the number of times a “six” appears.
Y = the sum of values of the two dice number.
y 2 3 4 5 6 7 8 9 10 11 12 f X ( x)
x
1/36 2/36 3/36 4/36 5/36 4/36 3/36 2/36 1/36 0 0 25/36
0
0 0 0 0 0 2/36 2/36 2/36 2/36 2/36 0 10/36
1
0 0 0 0 0 0 0 0 0 0 1/36 1/36
2
fY ( y ) 1/36 2/36 3/36 4/36 5/36 6/36 5/36 4/36 3/36 2/36 1/36

p  y  3 x  0
23

Example:
Two dice are rolled
X = the number of times a “six” appears.
Y = the sum of values of the two dice number.
y 2 3 4 5 6 7 8 9 10 11 12 f X ( x)
x
1/36 2/36 3/36 4/36 5/36 4/36 3/36 2/36 1/36 0 0 25/36
0
0 0 0 0 0 2/36 2/36 2/36 2/36 2/36 0 10/36
1
0 0 0 0 0 0 0 0 0 0 1/36 1/36
2
fY ( y ) 1/36 2/36 3/36 4/36 5/36 6/36 5/36 4/36 3/36 2/36 1/36

2
f  0, 3
p  y  3 x  0 36 2
  
f X  X  0 25 25
36
24

Example:
Two dice are rolled
X = the number of times a “six” appears.
Y = the sum of values of the two dice number.
y 2 3 4 5 6 7 8 9 10 11 12 f X ( x)
x
1/36 2/36 3/36 4/36 5/36 4/36 3/36 2/36 1/36 0 0 25/36
0
0 0 0 0 0 2/36 2/36 2/36 2/36 2/36 0 10/36
1
0 0 0 0 0 0 0 0 0 0 1/36 1/36
2
fY ( y ) 1/36 2/36 3/36 4/36 5/36 6/36 5/36 4/36 3/36 2/36 1/36

p  y  9 x  1
25

Example:
Two dice are rolled
X = the number of times a “six” appears.
Y = the sum of values of the two dice number.
y 2 3 4 5 6 7 8 9 10 11 12 f X ( x)
x
1/36 2/36 3/36 4/36 5/36 4/36 3/36 2/36 1/36 0 0 25/36
0
0 0 0 0 0 2/36 2/36 2/36 2/36 2/36 0 10/36
1
0 0 0 0 0 0 0 0 0 0 1/36 1/36
2
fY ( y ) 1/36 2/36 3/36 4/36 5/36 6/36 5/36 4/36 3/36 2/36 1/36

p  y  9 x  1
26

Example:
Two dice are rolled
X = the number of times a “six” appears.
Y = the sum of values of the two dice number.
y 2 3 4 5 6 7 8 9 10 11 12 f X ( x)
x
1/36 2/36 3/36 4/36 5/36 4/36 3/36 2/36 1/36 0 0 25/36
0
0 0 0 0 0 2/36 2/36 2/36 2/36 2/36 0 10/36
1
0 0 0 0 0 0 0 0 0 0 1/36 1/36
2
fY ( y ) 1/36 2/36 3/36 4/36 5/36 6/36 5/36 4/36 3/36 2/36 1/36

6
p  y  9 x  1  f  x  1, y  9   36 
6
fX X  1 11 11
36
27

Mean and Variance


• If the marginal probability distribution of X
has the probability function f X ( x) , then

E ( X )   X   xf X ( x)
x

V ( X )   2 X   ( x   X ) 2 f X ( x)
x

 2 X  E( X 2 )   2 X
28

Mean and Variance


• Similarly
E (Y )  Y   yfY ( y )
y

 2Y  E(Y 2 )   2Y

E ( XY )   XY   xyf ( x, y )
y x

cov( X , Y )   XY  E ( XY )   X Y
29

Example:
Two dice are rolled
X = the number of times a “six” appears.
Y = the sum of values of the two dice number.
y 2 3 4 5 6 7 8 9 10 11 12 f X ( x)
x
0 1/36 2/36 3/36 4/36 5/36 4/36 3/36 2/36 1/36 0 0 25/36

1 0 0 0 0 0 2/36 2/36 2/36 2/36 2/36 0 10/36

2 0 0 0 0 0 0 0 0 0 0 1/36 1/36

fY ( y ) 1/36 2/36 3/36 4/36 5/36 6/36 5/36 4/36 3/36 2/36 1/36

25 10 1 1
 X   xf X ( x)  0   1  2 
x 36 36 36 3
1 2 3 1
Y  2   3   4   ..............  12   7
36 36 36 36 114
 XY   xyf ( x, y )   3.16
y x 36
30
Example:
Two dice are rolled
X = the number of times a “six” appears.
Y = the sum of values of the two dice number.
y 2 3 4 5 6 7 8 9 10 11 12 f X ( x)
x
0 1/36 2/36 3/36 4/36 5/36 4/36 3/36 2/36 1/36 0 0 25/36

1 0 0 0 0 0 2/36 2/36 2/36 2/36 2/36 0 10/36

2 0 0 0 0 0 0 0 0 0 0 1/36 1/36

fY ( y ) 1/36 2/36 3/36 4/36 5/36 6/36 5/36 4/36 3/36 2/36 1/36
2
25 10 1 1 10
 2X 0 
2
1 
2
2 
2
  
36 36 36  3  36
1 2 1
 2Y  2 2   32   ...........12 2    7   5.83
2

36 36 36
1
cov( X , Y )  E ( XY )   X Y  3.16  ( )7  0.8266
3
31

Independence
• For discrete random variables X and Y, are
f  x, y 
independent if .
fY X ( y )   fY ( y )
fX  x

f  x, y   fY ( y ) f X  x  for all x and y


.

• If we find one pair of x and y in which the


equality fails, X and Y are not independent.
32

Independence
Example: check whethere X and Y are independent or not

y 2 3 5
f X ( x)
x

0 0.36 0.18 0.06 0.6


1 0.24 0.12 0.04 0.4
fY ( y )
0.6 0.3 0.1
X ,Y are independent
33

Correlation
34
Example:
y 2 3 4 5 6 7 8 9 10 11 12 f X ( x)
x
0 1/36 2/36 3/36 4/36 5/36 4/36 3/36 2/36 1/36 0 0 25/36

1 0 0 0 0 0 2/36 2/36 2/36 2/36 2/36 0 10/36

2 0 0 0 0 0 0 0 0 0 0 1/36 1/36

fY ( y ) 1/36 2/36 3/36 4/36 5/36 6/36 5/36 4/36 3/36 2/36 1/36

10
 2X   2Y  5.83 cov( X , Y )  0.8266
36

Evaluate  XY
0.8266
cov(X ,Y )  XY   0.6495
XY  10
V (X )V (Y) ( )(5.83)
36
35

Linear Combinations of Random


Variables
Mean of a Linear Combination

E (c1 X  c2Y )  c1E ( X )  c2 E (Y )

Variance of a Linear Combination

V (c1 X  c2Y )  c12V ( X )  c 22V (Y )  2c1c2 cov( X , Y )


36
Example:
y 2 3 4 5 6 7 8 9 10 11 12 f X ( x)
x
0 1/36 2/36 3/36 4/36 5/36 4/36 3/36 2/36 1/36 0 0 25/36

1 0 0 0 0 0 2/36 2/36 2/36 2/36 2/36 0 10/36

2 0 0 0 0 0 0 0 0 0 0 1/36 1/36

fY ( y ) 1/36 2/36 3/36 4/36 5/36 6/36 5/36 4/36 3/36 2/36 1/36

X 
1
Y  7  XY  3.16
3
10
 2X   2Y  5.83 cov( X , Y )  0.8266
36
Evaluate E (2 X  3Y ) V (2 X  3Y )
1
E (2 X  3Y )  2 E ( X )  3E (Y )  2    3  7   21.666
3
 10 
V (2 X  3Y )  4V ( X )  9V (Y )  12cov( X , Y )  4    9 5.83  12  0.8266   63.5
 36 
37

Summary
Discrete Random Variables
1. 0  f  x, y   1

2.  f  x, y   1
x y

3. P  X , Y   A   f  x, y 
 x, y   A
38

Summary
Discrete Random Variables
f  x, y 
f X Y ( x) 
fY  y 

f  x, y 
fY X ( y ) 
fX  x

For independent random vriables

f  x, y   fY ( y ) f X  x 
39

Summary
Discrete Random Variables
 X   xf X ( x)  2 X  E( X 2 )   2 X
x

Y   yfY ( y )  2Y  E(Y 2 )   2Y
y

 XY   xyf ( x, y )  XY  E ( XY )   X Y
y x

E (c1 X  c2Y )  c1E ( X )  c2 E (Y )

V (c1 X  c2Y )  c12V ( X )  c 22V (Y )  2c1c2 cov( X , Y )


40

Summary
Discrete Random Variables

Correlation
41

Example
• Suppose we roll a fair die then we toss a fair coin .
Let X = number of heads, Y = number on die.
• the joint probability distribution of X and Y in the
following table :
y 1 2 3 4 5 6

0 1/12 1/12 1/12 1/12 1/12 1/12

1 1/12 1/12 1/12 1/12 1/12 1/12

4 2
P(X=0, Y  4)  P Y  3  X  
12 12

11
P X  Y  
12
42

Example
• Suppose we roll a fair die then we toss a fair coin .
Let X = number of heads, Y = number on die.
y 1 2 3 4 5 6
f X ( x)
x
0 1/12 1/12 1/12 1/12 1/12 1/12 0.5

1 1/12 1/12 1/12 1/12 1/12 1/12 0.5

fY ( y ) 1/6 1/6 1/6 1/6 1/6 1/6

f X ( x  0)  0.5 fY ( y  5) 
1
6
4
f X ( x  1)  0.5 fY  y  3  
6
43

Example
• Suppose we roll a fair die then we toss a fair coin .
Let X = number of heads, Y = number on die.
y 1 2 3 4 5 6
f X ( x)
x
0 1/12 1/12 1/12 1/12 1/12 1/12 0.5

1 1/12 1/12 1/12 1/12 1/12 1/12 0.5

fY ( y ) 1/6 1/6 1/6 1/6 1/6 1/6

1
 0, 4 
p  x  0 y  4
f 1
  12 
fY  y  4 1 2
6
1
 0, 3
p  y  3 x  0
f 2
  12 
fX  X  0 0.5 12
4
f x  1, y  3 
p  x  1 y  3 
1
 12 
fY y  3 4 2
6
44

Example
• Suppose we roll a fair die then we toss a fair coin .
Let X = number of heads, Y = number on die.
y 1 2 3 4 5 6
f X ( x)
x
0 1/12 1/12 1/12 1/12 1/12 1/12 0.5

1 1/12 1/12 1/12 1/12 1/12 1/12 0.5

fY ( y ) 1/6 1/6 1/6 1/6 1/6 1/6

 X   xf X ( x)  0  0.5  1 0.5  0.5


x

1 1 1 1 21
Y  1  2   3   ..............  6  
6 6 6 6 6

1 1 1 1 21
 XY   xyf ( x, y)  1  2   3   ..............  6  
y x 12 12 12 12 12
45

Example
• Suppose we roll a fair die then we toss a fair coin .
Let X = number of heads, Y = number on die.
y 1 2 3 4 5 6
f X ( x)
x
0 1/12 1/12 1/12 1/12 1/12 1/12 0.5

1 1/12 1/12 1/12 1/12 1/12 1/12 0.5

fY ( y ) 1/6 1/6 1/6 1/6 1/6 1/6

2
 2 X  02  0.5  12  0.5   1   0.25
2
2
1 2 1 2 1 1  21 
 2Y  1   2   3   ..............  6      2.91
2 2

6 6 6 6 6

cov( X , Y )  E ( XY )   X Y  21  (0.5) 21  0
12 6
46

Example
• Suppose we roll a fair die then we toss a fair coin .
Let X = number of heads, Y = number on die.
y 1 2 3 4 5 6
f X ( x)
x
0 1/12 1/12 1/12 1/12 1/12 1/12 0.5

1 1/12 1/12 1/12 1/12 1/12 1/12 0.5

fY ( y ) 1/6 1/6 1/6 1/6 1/6 1/6

 2 X  0.25  2Y  2.91 cov( X , Y )  0

cov( X , Y ) 0
 XY   XY  0
V ( X )V ( X ) (0.25)(2.91)
47

Example
• Suppose we roll a fair die then we toss a fair coin .
Let X = number of heads, Y = number on die.
y 1 2 3 4 5 6
f X ( x)
x
0 1/12 1/12 1/12 1/12 1/12 1/12 0.5

1 1/12 1/12 1/12 1/12 1/12 1/12 0.5

fY ( y ) 1/6 1/6 1/6 1/6 1/6 1/6

1 21
X  Y  3.5 X Y   2 X  0.25  2Y  2.91 cov( X , Y )  0
2 12

Evaluate V (X Y )
E ( X  2Y )
1
E (X  2Y )  E (X )  2E (Y )     2  3.5 
2
V (X Y ) V (X ) V (Y )  2cov(X ,Y )   0.25    2.91  2  0  
48

Example
• Suppose we roll a fair die then we toss a fair coin .
Let X = number of heads, Y = number on die.
y 1 2 3 4 5 6
f X ( x)
x
0 1/12 1/12 1/12 1/12 1/12 1/12 0.5

1 1/12 1/12 1/12 1/12 1/12 1/12 0.5

fY ( y ) 1/6 1/6 1/6 1/6 1/6 1/6

check whethere X and Y are independent or


dependent

X ,Y are independent
49

Example
• Let X -2 -1 1 2
if Y  X 2
f(x) 0.2 0.3 0.35 0.15
• Compute
f ( x, y ),  ( X , Y )
X -2 -1 1 2

Y
50

Example
• Let X -2 -1 1 2
if Y  X 2
f(x) 0.2 0.3 0.35 0.15
• Compute
f ( x, y )
X -2 -1 1 2

1
51

Example
• Let X -2 -1 1 2
if Y  X 2
f(x) 0.2 0.3 0.35 0.15
• Compute
f ( x, y )
X -2 -1 1 2

4 0.2 0 0 0.15

1 0 0.3 0.35

Continue.
52
53

Continuous Random Variables


Definition: Two random variable are said to have
joint probability density function f(x,y) if

1. 0  f  x, y 
 
2.   f  x, y  dxdy  1
 

3. P  X , Y   A    f  x, y  dxdy


A
If 0  f  x, y  then z  f  x, y 
defines a surface over the x – y plane

  f  x, y  dxdy
A
Multiple Integration
A  f  x, y  dxdy

f(x,y)
If the region A = {(x,y)| a ≤ x ≤ b, c ≤ y ≤ d} is a
rectangular region with sides parallel to the
coordinate axes:
y
d

Then a b x

  f  x, y  dxdyd
 b
 b
 d

    f  x, y  dx  dy     f  x, y  dy  dx
A

c  a  a  c 
To evaluate
d b

  f  x, y  dxdy    f  x, y  dxdy
c a
A

d b

    f  x, y  dx  dy
c a 
First evaluate the inner integral
b
G  y    f  x, y  dx
a

Then evaluate the outer integral


d b d

  f  x, y  dxdy   G  y  dy
c a c
The same quantity can be calculated by integrating
first with respect to y, than x.
b d

  f  x, y  dxdy    f  x, y  dydx
a c
A

b d

    f  x, y  dy  dx
a c 
First evaluate the inner integral
d
H  x    f  x, y  dy
c

Then evaluate the outer integral


b d b

  f  x, y  dydx   H  x  dx
a c a
Example: Compute
1 1 1 1

 x y  xy  dxdy     x y  xy  dydx


2 3 2 3

0 0 0 0
Now
1 1 1
 1

0 0  x y  xy  dxdy  0  0  x y  xy  dx  dy
2 3 2 3

1  3
x 3 
2 x 1
x
  y y  dy
0 x 0 
3 2
 
4 y 1
1 1 3
1 2
1y 1y
   y  y  dy  
0
3 2  3 2 2 4 y 0
1 1 7
  
6 8 24
The same quantity can be computed by reversing
the order of integration
1 1 1
 1

0 0  x y  xy  dydx  0  0  x y  xy  dy  dx
2 3 2 3

 y2
1
y 4 y 1

  x 2
x  dx
0
2 4 y 0 
 

2 x 1
1 2 1 
1 3
1x 1x
   x  x  dx  
0
2 4  2 3 4 2 x 0
1 1 7
  
6 8 24
Integration over non rectangular
regions
If the region A is defined as follows
A = {(x,y)| a ≤ x ≤ b, h(x) ≤ y ≤ g(x) }
y y=g(x)

y=h(x)
Then a b x
b y g x 
A f  x, y  dxdy     f  x, y  dy  dx
a y  h x  
Suppose the region A is defined as follows
A = {(x,y)| h(y) ≤ x ≤ g(y), c ≤ y ≤ d}
y
d

x=h(y) x=g(y)
c

Then x
d  x g  y  
A f  x, y  dxdy     f  x, y  dx  dy
c 
 x  h y  
Example:
Compute the volume under f(x,y) = x2y + xy3 over the
region A = {(x,y)| x + y ≤ 1, 0 ≤ x, 0 ≤ y}
y

(0, 1)

x+y=1

(1, 0)

x
Now integrating first with respect to y then x
y

(0, 1) x+y=1

(y=1 – x )

(1, 0)

(y= 0) x
1 1 x

    dydx      dydx
2 3 2 3
x y xy x y xy
0 0
A
1
1 x 2 
     x y  xy  dy  dx
3

0 0 
Hence
1

1 x
   y 2
y
14

y 1 x

0  0  x y  xy  dy  dx   2  x 4   dx
2 3
  x 2

 0
 y 0 

1  x  1 x
1 2 4

x 2
x dx
0
2 4
x 2  2 x3  x 4 x  4 x 2  6 x3  4 x 4  x5
1
  dx
0
2 4
x  2 x 2  2 x3  2 x 4  x5
1
 dx
0
4
 18  16  18  101  201  15 20120
1512 6
 120
4
Integrating first with respect to x then y
y

(0, 1) x+y=1

(x=0) (x=1 – y)

(1, 0)

x
1 1 y

    dxdy      dxdy
2 3 2 3
x y xy x y xy
A 0 0


1 1 y

     x y  xy  dx  dy
2 3

0 
0 
and
1

1 y
  1 x 1 y

0  0      3 y  2 y  dy
3 2
x x
x 2
y  xy 3
dx dy  3

  0  x 0  
1 
1 y 1 y 3 
3 2

  y y  dy
0 
3 2

1
 y  3 y 2  3 y3  y 4 y3  2 y 4  y5 
    dy
0  
3 2

 1  43  15 14  52  16
1
 2

3 2
 16  13  14  151  18  15  121
 20  40  30 815 24 10
120  120
3
 1
40
Continuous Random Variables
Definition: Two random variable are said to have
joint probability density function f(x,y) if

1. 0  f  x, y 
 
2.   f  x, y  dxdy  1
 

3. P  X , Y   A    f  x, y  dxdy


A
Definition: Let X and Y denote two random
variables with joint probability density function
f(x,y) then
the marginal density of X is

f X  x    f  x, y  dy

the marginal density of Y is

fY  y    f  x, y  dx
Example
• Consider the following density function

6 xy 2
0  x  1, 0  y  1
f  x, y   
 0 otherwise
• Check if it is a valid density function.
 1 1

 
1 1

0 0  6xy 2
 dxdy     6xy 2
dx  dy
0 0 
1

 
1
3 y 1
3 x 2 y 2 x 1  dy   3 y dy  y 1
0 
2
x 0 
 y 0
0
Example
• Consider the following density function

6 xy 2
0  x  1, 0  y  1
f  x, y   
 0 otherwise
• Compute P(X ≤ 1 ,Y ≤ ½ ).
1 1
 1

 
2 1 2

  
6xy 2 dxdy     6xy dx  dy
2

0 0 0 0 
1 1
1

 
2
2  1
3 x y  dy  3 y dy  y

y
2 x 1 
0 
2 2 3 2
x 0 
 y 0 8
0
Example
Compute P(X ≤ Y ).
y

(0, 1) y=1
 y 1
1 
 
    6 xy dy  dx
2

0 
 yx 
y=x
(1, 0)
x
1
 2 xy
1 1

 dx   2 x  2 x 4  dx  x 2 
3 y 1 2 x 5
 3
0  y  x  0   0  5 
 dx 
5
Example
• Consider the following density function

6 xy
2
0  x  1, 0  y  1
f  x, y   
 0 otherwise
• Find the marginal densities of X and Y.
1 1
f X  x    f  x, y  dy    6 xy  dy  2 xy
2 3 y 1
 2x
y 0
0 0

1 1
fY  y    f  x, y  dx    6 xy  dx  3x y
2 2 2 x 1
 3y 2
x 0
0 0
Example(conditional prob )
• Consider the following density function

6 xy
2
0  x  1, 0  y  1
f  x, y   
 0 otherwise
1 1
Compute p( X 
Y  )
4 2
1 1
p( X  , Y  )
1 1 4 2
p( X  Y  ) 
4 2 1
p (Y  )
2
 0.25
0.5

  
  6 xy dx  dy
2

p( X  Y  )  00.5 10 
1 1
 
 
4 2
0  0 6 xy dx  dy
2
Definition: Let X and Y denote two random
variables with joint probability density function
f(x,y) and marginal densities fX(x), fY(y) then
the conditional density of Y given X =x
f  x, y 
fY X  y  
fX  x

conditional density of X given Y = y


f  x, y 
fX Y  x 
fY  y 
Proof)‫(االثبات غير مطلوب‬
p(c  Y  d X  a)  lim p(c  Y  d a  X  a  h)
h 0

p (c  Y  d , a  X  a  h )
p(c  Y  d X  a )  lim
h 0 p ( a  X  a  h)
ah
d 
    f ( x, y  dy  dx
p (c  Y  d X  a )  lim a c  
0
h 0 ah
0
  f X  x  dx
Use L’Hospital rule a

d
ah
d 
    f ( x, y  dy  dx
dh c 
p (c  Y  d X  a )  lim a
ah
h 0 d
dh   f X  x 
  dx
a
Proof
d

  f (a  h, y  dy
p (c  Y  d X  a )  lim c
h 0 f X a  h
d

  f (a, y  dy
p (c  Y  d X  a )  c
fX a
Conditional

p (c  Y  d X  a)  
 f ( a, y 
d
dy
density

c
fX a

p (c  Y  d X  x)  
 f ( x, y 
d
dy
c
fX  x
Definition: Let X and Y denote two random
variables with joint probability density function
f(x,y) and marginal densities fX(x), fY(y) then
the conditional density of Y given X =x
f  x, y 
fY X  y  
fX  x

conditional density of X given Y = y


f  x, y 
fX Y  x 
fY  y 
Example
• Consider the following density function
10 xy 2 0  x  y 1
f  x, y   
 0 otherwise
Compute p( y  0.5 x  0.75) y
(0, 1) y=1 (1, 1)
1
10
f X  x    10 xy dy  x(1  x 3 )
2

x
3
10 xy 2 3y2
fY X  y  
y=x

x(1  x 3 ) (1  x )
3
10
x
3
1 1 2
3y
p( y  0.5 x  0.75)   fY X 0.75  y  dy   dy
0.75 0.75
(1  (0.75) )
3
Example
• Consider the following density function
10 xy 2 0  x  y 1
f  x, y   
 0 otherwise
Compute p( y  0.5 x  0.25) y
(0, 1) y=1 (1, 1)
1
10
f X  x    10 xy dy  x(1  x 3 )
2

x
3
10 xy 2 3y2
fY X  y  
y=x

x(1  x 3 ) (1  x )
3
10
x
3
1 1 2
3y 8
p( y  0.5 x  0.25)   fY X 0.25  y  dy   dy 
0.5 0.5
(1  (0.25) )
3
9
Mean and variance
 X   xf x ( x)dx    xf  x, y  dxdy

Y   yfY ( y)dy    yf  x, y  dxdy

 XY    xyf  x, y  dxdy

 X 2   x2 f ( x, y)dxdy   2 X
R

 Y 2   y 2 f ( x, y)dxdy   2Y
R

cov( x, y)   XY   xy f ( x, y)dxdy   X Y
R
Example
• Consider the following density function
10 xy 2 0  x  y 1
f  x, y   
 0 otherwise
Evaluate  X , X 2 ,cov( X , Y ) y
(0, 1) y=1 (1, 1)
1 1
10 2 3
1 y 1
 5
 X    x(10 xy )dydx    x y
2
 dx 
0 
3 yx 
0 x  9
1 1 y=x
 X    x (10 xy )dydx  
2 2 2 2
X  0.0485
0 x
x
1 1
cov( x, y )   XY    xy (10 xy 2 )dydx   X Y  0.01322
0 x
Linear Combinations of Random
Variables
Mean of a Linear Combination

E (c1 X  c2Y )  c1E ( X )  c2 E (Y )

Variance of a Linear Combination

V (c1 X  c2Y )  c12V ( X )  c 22V (Y )  2c1c2 cov( X , Y )


Example
• Consider the following density function
10 xy 2 0  x  y 1
f  x, y   
 0 otherwise
Evaluate E ( X  Y ), var( X  Y ) y
(0, 1) y=1 (1, 1)
1 1

1
10
y 1
 5
E ( X )    x(10 xy )dydx    x y
2 2 3
 dx 
0 
3 yx 
0 x  9
1 1 1
 10 4 
y 1
5
E (Y )    y (10 xy )dydx    xy
2
 dx  y=x
0 
4 yx 
0 x  6
x
E ( X  Y )  E ( X )  E (Y )
5 5
E( X  Y )  
9 6
Example
• Consider the following density function
10 xy 2 0  x  y 1
f  x, y   
 0 otherwise
Evaluate E ( X  Y ), var( X  Y ) y
(0, 1) y=1 (1, 1)
1 1
 X 2    x 2 (10 xy 2 )dydx   2 X  0.0485
0 x
1 1
 Y 2    y 2 (10 xy 2 )dydx   2Y  0.0198 y=x
0 x
1 1
cov( x, y )   XY    xy (10 xy 2 )dydx   X Y  0.01322 x
0 x

V ( X  Y )  V ( X )  V (Y )  2 cov( X , Y )
V ( X  Y )  0.0485  0.0198  2(0.01322)  0.09474
Correlation
Example
• Consider the following density function
10 xy 2 0  x  y 1
f  x, y   
 0 otherwise
Evaluate  XY y
(0, 1) y=1 (1, 1)
cov( X , Y )
 XY 
V ( X )V (Y )

0.01322 y=x
 XY   0.4266
(0.0485)(0.0198)
x
Example(conditional prob )
• Consider the following density function
 2 xy
x  0  x  1, 0  y  2
f  x, y    3
 0 otherwise
Find
p  x  1/ 2 y  1/ 2 
p  x  1 / 2, y  1 / 2 
p  x  1 / 2 y  1 / 2 
p  y  1 / 2
1  y 2  2 xy   43
p  x  1 / 2, y  1 / 2      x   dy  dx 
 y 1/ 2 
1/ 2 
3  
 64

1  y 2  2 xy   13
p  y  1 / 2    x   dy  dx 
 y 1/ 2 
0 
3  
 16
43
p  x  1 / 2, y  1 / 2 
p  x  1 / 2 y  1 / 2 
43
 64 
p  y  1 / 2 13 52
16

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy