Lecture 6 Joint
Lecture 6 Joint
Joint Probability
Distributions
Discrete and Continuous
1] Discrete Variables
Our study of random variables and their probability distributions in the
preceding chapter is restricted to one-dimensional sample spaces, in that
we recorded outcomes of an experiment as values assumed by a single
random variable.
There will be situations, however, where may find it desirable to record
the simultaneous outcomes of several random variables.
For example, one might be interested in the hardness H and the tensile
strength T of cold-drawn copper resulting in the outcomes (h, t).
If X and Y are two discrete random variables, the probability
distribution for their simultaneous occurrence can be represented by a
function with values f(x, y) for any pair of values (x, y) within the
range of the random variables X and Y .
It is customary to refer to this function as the joint probability
distribution of X and Y .
Hence , in the discrete case,
f(x, y) = P (X = x, Y = y ) ;
that is the values f(x, y) give the probability that outcomes x and y
occur at the same time .
2. f ( x , y) 1
x y
3. P(X = x, Y = y) = f(x, y) .
8
Solution : n (S) 28
2
X is the number of blue refills selected then X = 0, 1, 2 and
Y is the number of red refills selected then Y = 0, 1, 2 and
we have the condition that
0≤x+y≤2.
The possible pairs of values (x, y ) are
(0, 0) , (0,1) , (0, 2) , (1,0) , (1, 1) , (2, 0).
Now,
f(0, 1) = probability that zero blue and one red refill are selected
= probability that a red and a green refill are selected
2 3
1 1 6 3
f (0, 1)
8 28 14
2
Also,
f(0, 2) = probability that zero blue and two red refill are selected
2 2 3
0 2 0 1
f (0, 2)
8 28
2
Similar calculations yield the probabilities for the other cases , which
represented in the following table .
X
Y 0 1 2 Row totals
0 3/28 9/28 3/28 15/28
2 1/28 0 0 1/28
Column totals 5/14 15/28 3/28 1
g ( x ) f ( x , y) and
y
h ( y) f ( x , y)
x
For the discrete random variables X and Y .
Note that:
The term marginal is used here because the values of g(x) and h(y) are
just the marginal totals of the respective columns and rows when the
values of f(x, y) are displayed in a rectangular table.
Example(2) : Show that the column and row totals of Table(1) give the
marginal distribution of X alone and Y alone .
Solution :
For the random variable X, we see that
P ( X 0) g (0) f ( x , y)
y
2
f ( x , y) f (0,0) f (0,1) f (0,2)
y 0
3 3 1 4
28 14 28 15
2
P( X 1) g (1) f ( x , y) f ( x , y) f (1,0) f (1,1) f (1,2)
y y 0
9 3
28 14 0 15
28
And
2
P( X 2) g ( 2) f ( x , y) f ( x , y) f ( 2,0) f ( 2,1) f ( 2,2)
y y 0
3 3
28 0 0 28
Which are just the column totals of Table (1).
In a similar manner we could show that the values of h(y) are given by
the row totals.
2
P(Y 0) h (0) f ( x , y) f ( x , y) f (0,0) f (1,0) f (2,0)
x x 0
3 9 3
28 28
28
15
28
2
P( Y 1) h (1) f ( x , y) f ( x , y) f (0,1) f (1,1) f ( 2,1)
x x 0
3 3
14 14
0 73
And
2
P( Y 2) h ( 2) f ( x , y) f ( x , y) f (0,2) f (1,2) f ( 2,2)
x x 0
28
1
0 0 28
1
In tabular form , these marginal distributions may be written as follows :
x 0 1 2
g(x) 5/14 15/28 3/28
y 0 1 2
h(y) 15/28 3/7 1/28
Example(3) :
If X & Y are two RVs with joint p.d.f
f(x, y) = c(2x + y) , 0≤ x ≤ 2 , 0 ≤ y ≤ 3 , x, y ϵ Z, find:
i) c ,
ii) P( X=2, Y =1 ),
iii) P( X ≥ 1, Y ≤ 2) ,
iv) the marginal density functions for X & Y
X
Y 0 1 2 Row totals
0 0 2c 4c 6c
1 c 3c 5c 9c
2 2c 4c 6c 12c
3 3c 5c 7c 15c
Column 6c 14c 22c 42c=1
totals
i) c =1/42
ii) P( X=2, Y =1 ) =5/42
X
Y 0 1 2 Row totals
0 0 2/42 4/42 6/42
1 1/42 3/42 5/42 9/42
2 2/42 4/42 6/42 12/42
3 3/42 5/42 7/42 15/42
Column totals 6/42 14/42 22/42 1
iii) P( X ≥ 1, Y ≤ 2) = (2+4+3+5+4+6)/42 = 24/42
X
Y 0 1 2 Row totals
0 0 2/42 4/42 6/42
1 1/42 3/42 5/42 9/42
2 2/42 4/42 6/42 12/42
3 3/42 5/42 7/42 15/42
Column totals 6/42 14/42 22/42 1
iv) The marginal density functions for X & Y
Statistical Independence
Let X and Y be two discrete random variables with joint probability
distribution f(x, y) and marginal distributions g(x) and h(y) , respectively
. The random variables X and Y are said to be statistically independent if
and only if
f(x, y) = g(x) . h(y) for all (x, y) within their range
Example (4) : show that the random variables of Example(1) are not
statistically independent .
Solution: Let us consider the point (0, 1) . From table(1) , we find the
three probabilities f(0, 1) , g(0) and h(1) to be
f(0, 1) = 3/14 & g(0) = 5 / 14 & h(1) = 3 / 7
Clearly
f(0, 1) ≠g(0) h(1)
Solution :
2 2
E[XY] x y f (x, y) (0)(0)f (0, 0) (0)(1)f (0, 1) (0)(2)f (0, 2)
x 0 y 0
2 2 2
5 15 3 3
X E[X] x f ( x, y) x g( x ) (0) 14 (1) 28 (2) 28 4
x 0 y 0 x 0
and
2 2 2
15 3 1 1
Y E[Y] y f ( x , y ) y h ( y ) ( 0) (1) ( 2)
x 0 y 0 y 0 28 7 28 2
Exercise :
In example 3 Find:
i) E(XY).
ii) The mean of X and Y
Example( 7 ): The joint probability function for the random variables X
and Y is given in Table(2).
(a) Find the marginal probability functions of X , g(x), and Y, h(y)
(b) Find P( 1≤ X < 3, Y ≥ 1)
(c) Determine whether X and Y are independent
X
Y 0 1 2 Row totals
0 1/18 1/9 1/6 1/3
1 1/9 1/18 1/6 1/3
2 1/6 1/9 1/18 1/3
Column totals 1/3 5/18 7/18 1
Table(2)
Solution:
(a) In tabular form , these marginal distributions may be written as
follows :
x 0 1 2
g(x) 1/3 5/18 7/18
y 0 1 2
h(y) 1/3 1/3 1/3
X1
X2 0 1 2 Row totals
0 0.1 0.4 0.1 0.6
1 0.2 0.2 0 0.4
Column totals 0.3 0.6 0.1 1
Table(3)
(a)
P ( X 1 X 2 1) f (1, 1) f ( 2, 0) f ( 2, 1)
0.2 0.1 0 0.3
x1 0 1 2
g(x1) 0.3 0.6 0.1
(c) Since f(0,0) = 0.1 and
So X1 and X2 are
dependent .
Example(9):
Let X1 has mean 4 and variance 9 while X2 has mean -2, and variance 5,
and the two variables are independent , find
(a) E(2X1 + X2 – 5)
(b) Var(2X1 + X2 – 5 )
Solution :
(a) E(2X1 + X2 – 5) =2 E(X1 )+E( X2 ) – 5 = 2(4) + (– 2) – 5 = 8 – 7 = 1
ii)
P( a≤ X ≤ b, c ≤ Y ≤ d ) =
.
f(x, y) =
Marginal density function:
P(X ≤ x) = F1(x) =
P(Y ≤ y) = F2(y) =
Exercise: If X & Y are two RVs with joint p.d.f
cxy 0 x 4, 1 y 5
f (x , y )
0 otherwise
Find: i) c ,
ii) P( 1< X < 2, 2 < Y < 3),
iii) P( X ≥ 3, Y ≤ 2),
iv) the marginal density functions for X & Y ,
v) P( X+Y < 3).