Week - 4 - Joint Probability Distributions, Marginal Distributions, Conditional Probability Distributions
Week - 4 - Joint Probability Distributions, Marginal Distributions, Conditional Probability Distributions
Marginal Distributions,
Conditional Probability Distributions
By Ozlem Ulucan, PhD
P = amount of precipitate
2
Joint Probability Distributions (Discrete)
• 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.
3
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
Joint Probability Distributions (Discrete)
the same time. For example, if an 18-wheeler is to have its tires serviced and X
represents the number of miles these tires have been driven and Y represents the
number of tires that need to be replaced, then f (30000, 5) is the probability that
the tires are used over 30,000 miles and the truck needs 5 new tires.
Definition 3.8: The function f (x, y) is a joint probability distribution or probability mass
function of the discrete random variables X and Y if
1. f (x, y) ≥ 0 for all (x, y),
!!
2. f (x, y) = 1,
x y
3. P (X = x, Y = y) = f (x, y).
!!
For any region A in the xy plane, P [(X, Y ) ∈ A] = f (x, y).
A
Example 3.14: Two ballpoint pens are selected at random from a box that contains 3 blue pens,
2 red pens, and 3 green pens. If X is the number of blue pens selected and Y is
the number of red pens selected, find
4
(a) the joint probability function f (x, y),
Joint Probability Distributions (Discrete)
5
Chapter
be represented 3 formula
by the Random Variables and Probability Distributions
!3"!2"! 3 "
Joint Probability
f (x, y) =
Distributions
x y 2−x−y
! 8" ,
(Discrete)
5, it will become clear that the joint probability 2 distribution of Table 3.1 can
be represented • Solution:
for by
x = the The
formula
0, 1, 2; possible
y = 0, 1, 2; and pairs
0≤x+ ofy values
≤ 2. (x, y) are (0, 0), (0,
(b) The1), (1, 0), (1,that
probability 1),(X,
(0,Y2), and
) fall (2, region
in the 0) A is
!3"!2"! 3 "
P [(X, Y ) ∈ A] = P (X +
xY ≤y 1) 2−x−y
= f (0, 0) + f (0, 1) + f (1, 0)
f (x, y) = 3 3
!"
98 9 ,
= + + 2= .
28 14 28 14
for x = 0, 1, 2; yforTable
=x =0,
0, 1,
1, 2;2;
y =and
0, 1, 0
2; ≤
andx0+
≤ xy+≤
y ≤2.
2.
3.1: Joint Probability Distribution for Example 3.14
The probability that (X, Y ) fall in the region
x ARow
is
f (x, y) 0 1 2 Totals
3 9 3 15
P [(X, Y ) ∈ A] = P (X0+ Y ≤ 1) = f (0, 0) + f (0, 1) + f (1, 0)
28
3
28
3
28 28
3
y 1 0
14 14 7
3 2 3 9 0 09
1 1
= + + 5 15= 3 .
28 28
28 Totals
Column 14 1428 28 14
28 1
TableWhen
3.1:XJoint Probability
and Y are Distribution
continuous random variables, thefor
jointExample 3.14
density function 6
x Row
f (x, y) 0 1 2 Totals
Joint Probability Distributions
3
28
9
28
3
0
28
(Continuous)
15
28
3 3 3
y 1 14 14 0 7
1 1
2 28 0 0 28
When X and Y are continuous
5 random
15 3 variables, the joint
Column Totals 14 28 28 1
probability distribution function f(x,y) is termed the joint
When X and Y are continuous random variables, the joint density function
f (x,density function.
y) is a surface lying above the xy plane, and P [(X, Y ) ∈ A], where A is any
region in the xy plane, is equal to the volume of the right cylinder bounded by the
baseDefinition:
A and the surface.
Definition 3.9: The function f (x, y) is a joint density function of the continuous random
variables X and Y if
1. f (x, y) ≥ 0, for all (x, y),
#∞ #∞
2. −∞ −∞ f (x, y) dx dy = 1,
##
3. P [(X, Y ) ∈ A] = A
f (x, y) dx dy, for any region A in the xy plane.
7
xample 3.15: A privately owned business operates both a drive-in facility and a walk-in facility.
1. f (x, y) ≥ 0, for all (x, y),
2. −∞ −∞Probability
Joint f (x, y) dx dy = Distributions (Continuous)
#∞ #∞
1,
##
3.• PExample ∈ A]
[(X, Y ) 2: =
A privately f (x, y) dx dy, for any region A in the xy plane.
A owned business operates both a drive-in
(a) Verify
(a) •Verify condition
condition 2 of2Definition
of Definition
3.9.
1 1 1
(b) •Find P [(X, Y ) ∈ A], where A = {(x, y) | 0 < x < , <
(b) Find P[(X,Y) ∈A], where A={(x,y)|0<x<1/2, 1/4 <y<1/2}.
2 4 y < 2 }.
8
Joint Probability Distributions (Continuous) 97
3.4 Joint Probability Distributions
13
g(0)== f (0, 0)f +
3. P [(X, Y ) ∈ A] f (0,
(x, y) 1)dx
+ fdy,
(0, 2) = any+ region
for + A = in ,the xy plane.
A 28 14 28 14
9 3 15
mple 3.15:
Marginal Probability Distributions
g(1) = f (1, 0) + f (1, 1) + f (1, 2) =
28
+
14
+0=
28
,
A privately owned business operates both a drive-in facility and a walk-in facility.
and
On a randomly selected day, let X and Y , respectively, 3 be 3the proportions of the
Example
time •that the drive-in 4:
g(2)Find the
= f (2, 0)
and the g(x)
+ f (2,
walk-in f (2, 2) h(y)
1) +and
facilities=
28arefor
+ 0 + 0the
= joint
in use, ,
28and suppose that the
density
joint density
which are function
function
just theof theseof
column random
totals variables
of Table 3.1. In aissimilar manner we could show
that the values of h(y)$are given by the row totals. In tabular form, these marginal
2
distributions may be written as follows:
5 (2x + 3y), 0 ≤ x ≤ 1, 0 ≤ y ≤ 1,
f (x, y) = x 0 1 2 y 0 1 2
0, 5 15 3 elsewhere. 15 3 1
g(x) 14 28 28 h(y) 28 7 28
Solution:
(a) •Verify condition 2 of Definition 3.9.
Example 3.17: Find g(x) and h(y) for the joint density function of Example 3.15.
Solution : By P
(b) Find [(X, Y ) ∈ A], where A = {(x, y) | 0 < x < 12 , 14 < y < 12 }.
definition,
! ∞ ! 1 " #$y=1
2 4xy 6y 2 $$ 4x + 3
g(x) = f (x, y) dy = (2x + 3y) dy = + $ = ,
−∞ 0 5 5 10 y=0 5
for 0 ≤ x ≤ 1, and g(x) = 0 elsewhere. Similarly,
! ∞ ! 1
2 2(1 + 3y)
h(y) = f (x, y) dx = (2x + 3y) dx = ,
−∞ 0 5 5
for 0 ≤ y ≤ 1, and h(y) = 0 elsewhere.
The fact that the marginal distributions g(x) and h(y) are indeed the proba- 14
bility distributions of the individual variables X and Y alone can be verified by
order
that we to be able
make to the
use of effectively compute
special type conditionalof probabilities.
of distribution the form f (x, This type
y)/g(x) in of dis-
tribution
Definition 3.11: order
Let to
X be
andis called
Y to a conditional
beeffectively
two random probability
variables, distribution;
discrete or continuous.theThe
formal definition
conditional
Conditional Probability Distributions
able compute conditional probabilities. This type of dis-
follows.
distribution
tribution is called of the random probability
a conditional variable Y given that X =the
distribution; x formal
is definition
follows.
Definition 3.11:• Definition:
Let X andconditional probability
Y be two random fvariables,
(x, y) discrete or continuous. The conditional
distribution f random
(y|x) = variable, Yprovided g(x)X>=0.x is
Definition 3.11: Let X and Y be of
twothe
random variables, given
g(x) discrete that
or continuous. The conditional
distribution of the random variable Y given that X = x is
Similarly, the conditional f (x, y) of X given that Y = y is
f (y|x)fdistribution
=(x, y)
, provided g(x) > 0.
f (y|x) = g(x)
, provided g(x) > 0.
f (x, y)
g(x)
f (x|y)distribution
Similarly, the conditional = , provided h(y)
of X given > Y0. = y is
that
h(y)
Similarly, the conditional distribution of X given that Y = y is
f (x,that
If we wish to find thef probability y) the discrete random variable X falls between
(x|y)f=
(x, y) , provided h(y) > 0.
a and b when it isf (x|y)
known h(y)
= that the discrete h(y)
, provided variable
> 0. Y = y, we evaluate
h(y)
! random variable X falls between
If we wish to find the probability that the discrete
• IfThe
we wish
a and
to find the probability
probability
b when itthat Pthe
is known < that
X< that
(a discretethe|the
brandom
Y =discrete random
y)variable
discrete
variable
X ffalls
=variable X falls
=between
Y(x|y),
between
a and
y, we evaluate b, it
a is
and b when it is known that the discrete
known that the discrete variable Y=y is variable Y =
a<x<b y, we evaluate
!
!
where the summation
P (a < X < b |
P (a < X < b | Y = y) = = fof(x|y),
extends overY all
= values
y) X fbetween
(x|y), a and b. When X and
Y are continuous, we evaluate a<x<b
a<x<b
• When
wheretheX and
the Y are continuous;
summation extends
where summation extends overover all values
all values of X"of X between
between
b a andab.and b. When
When X and X and
Y Yare
arecontinuous,
continuous,
we we evaluate
< X < b | Y = y) =
evaluate
P (a f (x|y) dx.
a
" b
" b
P (aP < | Yb |=Yy)==y) =f (x|y)
(aX< <Xb < f (x|y)
dx. dx. 15
Example 3.18: Referring to Example 3.14, find the conditionala
a
distribution of X, given that Y = 1,
Conditional Probability Distributions
Chapter 3 Random Variables and Probability Distributions
• Example 5: For the function f(x, y), find the conditional
distribution
5, it will become clear thatof the
X, given
jointthat Y = 1, and
probability use it to of Table 3.1 can
distribution
be representeddetermine P(X=0|Y =1).
by the formula
!3"!2"! 3 "
x y 2−x−y
f (x, y) = ! 8" ,
2
for x = 0, 1, 2; y = 0, 1, 2; and 0 ≤ x + y ≤ 2.
x=0,1,2; y=0,1,2; 0≤x+y≤2
The probability that (X, Y ) fall in the region A is
Now
f (x, y) 10xy 2 3y 2
f (y|x) = = 10 = 3
, 0 < x < y < 1.
g(x) 3 x(1 − x 3) 1 − x
(b) Therefore,
! % " $ 1 $ 1
1 % 3y 2 8
P Y > % X = 0.25 = f (y | x = 0.25) dy = dy = .
2 % 1 − 0.253 9
1/2 1/2
20
find P (0Statistical
< X < 1 | Y Independence
= 2).
Example
3.437: Let
LetX denote the reaction
X denote time, in time,
the reaction seconds,
intoseconds,
a certain to
◦
a certain stimulus and Y denote the temperature
stimulus and Y denote the temperature (◦F) at which a certain ( F)
at which a certain reaction starts to take place. Sup-
reaction
posestarts
thattotwo
takerandom
place. Suppose that X
variables twoand
random variables
Y have X
the joint
and Ydensity
3 oranges, 2 ap- have the joint density
e of 4 pieces of !
f oranges and Y 4xy, 0 < x < 1, 0 < y < 1,
f (x, y) =
find 0, elsewhere.
f X and Y ;
Determine
Find whether the two random variables are dependent or
on that is given 1 1 1
(a) P
independent.(0 ≤ X ≤ 2
and 4
≤ Y ≤ 2
);
(b) P (X < Y ).
Solution: Independent
s both a drive-
On a randomly 3.44 Each rear tire on an experimental airplane is 21