You are on page 1of 14

BACHELOR OF SCIENCE IN ENGINEERING

(BSCE/BSEE/BSME):
ENGINEERING DATA ANALYSIS
COURSE MODULE COURSE UNIT WEEK
1 4 6

JOINT PROBABILITY DISTRIBUTION

CHECKLIST
 Read course and unit objectives
 Read study guide prior to class attendance
 Read required learning resources; refer to unit
terminologies for jargons
 Proactively participate in classroom discussions
 Participate in weekly discussion board (Google Classroom)
 Answer and submit course unit tasks

UNIT EXPECTED OUTCOMES (UEOs)


At the end of this unit, the students are expected to:

Cognitive:
1. Learn and understand concepts pertatiing to joint probability distribution of discrete and
continuous random variables
2. Learn how to compute for the mean and variance of combinations of variables for random
probability distributions

REQUIRED READINGS
Walpole, R. (2012), Probability and Statistics for Scientist and Engineers, 9th Ed., Chapter 3 - 4
(p.81-142)
STUDY GUIDE
JOINT PROBABILITY DISTRIBUTION

If X and Y are two discrete random variables, the probability distribution for the simultaneous
occurrence represented by f(x,y) for any pair of values (x,y) within the range of the random variable X
and Y is called the joint probability distribution of X and Y.

Discrete: f(x,y) = P{X = x, Y = y}; probability that outcomes x and y occurs at the same time.

Definition:
The function f(x,y) is a joint probability distribution or probability mass function of the discrete
random variable 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 in the xy plane,
P[( X , Y )  A]    f ( x, y )
A

Example 1:
Two refills for a ballpoint pen are selected from a box that contains 3 blue, 2 red and 3 green
refills. If X is the number of blue refills and Y red refills, find:
a. Joint probability function f(x,y);
b. P[(x,y)  A], where A is the region {(x,y) x + y  1}

Solution:
Possible pairs: (x,y): (0,0), (0,1), (1,0), (1,1), (0,2), (2,0)

Take the case of the pair (0,1), f(0,1) is actually the probability that a red and a green refill is
selected.

We then formulate a function for this particular problem:


n
f  x, y  
N
where N   82   28

for n: number of ways of selecting 1 red from 2 red and 1 green from 3
green is:
     6
3
0
2
1
3
1

thus f(0,1) = 6/28

f  x, y  
  
3
x
2
y
3
2 x  y  for x  0,1, 2 y  0,1, 2 x  y  2
 8
2
The joint probability distribution is:

f(x,y) 0 1 2 Row total

0 3/28 9/28 3/28 15/28

1 3/14 3/14 0 3/7

2 1/28 0 0 1/28

Column Total 5/14 15/28 3/28 1

b. P[(x,y)  A] =P( X + Y  1 )
= f(0,0) + f(0,1) + f(1,0) = 3/28 + 3/14 + 9/28 = 9/14

JOINT DNSITY FUNCTION FOR A CONT. RANDOM VARIABLE

Definition:
The function f(x,y) is a joint density function of the continuous random variable X and Y if:
1. f ( x, y )  0 for all ( x, y )
 
2.    
f ( x, y )dxdy  1

3. P[( X , Y )  A]   f ( x, y )dxdy
A

for any region A in the XY plane.

Example 2:
A candy co. distributes boxes of chocolates with a mixture of creams, toffees and nuts coated in
both light and dark chocolates. For a randomly selected box, let X and Y respectively be the proportions
of the light and dark chocolates that are creams and suppose that the joint density function is given by:

2
 2x  3 y  0  x  1, 0  y  1
5
f(x,y) =
0 elsewhere

a. Verify condition 2 of the definition.


b. Find P[{X,Y)  A] where A is the region {(X,Y)0 < X < ½, ¼ < Y < ½}

Solution:
  2
 5  2x  3y  dxdy
1 1
a. =  f (x, y)dxdy  
  0 0
x 1
1 2x 2 6xy
  dy
0 5 5 x 0
y 1
1  2 6y  2y 3y 2 2 3
    dy     1
0
5 5  5 5 y 0
5 5

b. P[{X,Y)  A] = P(0 < X < ½, ¼ < Y < ½)

1 1 2
 1 2  2
 2x  3y  dx dy
4
0 5
1
2 x
1 2x 6xy 2
 1 2  dy
4 5 5 x 0
1
y
1
 1 3y  y 3y 2 2
 1 2    dy  
4  10 5  10 10 y
1
4

1  1 3   1 3   13
      
10  2 4   4 16   160

Marginal Distributions

The Marginal Distribution of X alone and Y alone are given by

g(x)   f (x, y) and h(y)   f (x, y) ; for discrete R.V.


y x

and
 
g(x)   f (x, y) dy and h(y)   f (x, y) dx ;for cont. R.f (x, y) ; for discrete R.V.
 

Example 3.
Obtain the marginal distribution of X alone and Y alone for example 1.

Solution:
2
3 3 1 5
P(X  0)  g(0)   f (0, y)  f  0, 0   f (0,1)  f (0, 2)    
y 0 28 14 28 14
2
9 3 15
P(X  1)  g(1)   f (1, y)  f 1, 0   f (1,1)  f (1, 2)   0 
y 0 28 14 28
2
3 3
P(X  2)  g(2)   f (2, y)  f  2, 0   f (2,1)  f (2, 2)  00 
y 0 28 28
2
3 9 3 15
P(Y  0)  h(0)   f (x, 0)  f (0, 0)  (1, 0)  (2, 0)    
x 0 28 28 28 28
2
3 3 3
P(Y  1)  h(1)   f (x,1)  f (0,1)  (1,1)  (2,1)    0 
x 0 14 14 7
2
1 1
P(Y  2)  h(2)   f (x, 2)  f (0, 2)  (1, 2)  (2, 2)   0  0 
x 0 28 28

Such that the marginal distribution of X alone is:

x 0 1 2

g(x) 5/14 15/28 3/28 =1

and the marginal distribution of Y alone is:

y 0 1 2

h(y) 15/28 3/7 1/28 =1

Note: Notice that the marginal distribution is simple the row and column totals of the joint probability
distribution.

Example 4:
Find the marginal distribution for example 2.

Solution:
From Example 47:

2
f(x,y) =  2x  3 y  0  x  1, 0  y  1
5

For the marginal distribution of X alone:


 y 1 2
g(x)   f (x, y) dy  
 y 0 5
 2x  3y  dy
4x  3
g(x)  for 0  x  1 and g  x   0 elsewhere
5
In the same manner, the marginal distribution of Y alone is:

 x 1 2
h(y)  

f (x, y) dx  
x 0
 2x  3y  dx
5
2 1  3y 
h(y)  for 0  y  1 and h(y)  0 elsewhere
5

Conditional Distribution

Let X and Y be 2 random variables, discrete or continuous. The conditional distribution of the
random variable Y given that X=x is given by:

f ( x, y )
f ( y x)  ; g ( x)  0
g ( x)

Similarly, the conditional distribution of the random variable X given that Y=y is given by:
f ( x, y )
f ( x y)  ; h( y )  0
h( y )

To determine the probability of a discrete random variable X that falls between a and b when it
is known that the discrete variable Y=y, we evaluate:

P(a  X  b Y  y )   f ( x y )
x

and for cont. R.V .


b
P(a  X  b Y  y )   f ( x y ) dx
a

Example 5:
From example 1, find the conditional distribution of X given that y = 1 and use it to determine P(
X = 0Y = 1)

Solution:
f ( x y ) where y 1 is :
f ( x, y )
f ( x y)  with h( y )  h(1)
h( y )
2
3 3 3
h(1)   f ( x,1)  f (0,1)  f (1,1)  f (2,1)   0 
x 0 14 14 7

thus:
f ( x,1) f ( x,1) 7
f ( x 1)    f  x,1 x  0,1, 2
h(1) 3 3
7
therefore :
7 7 3  1
f (0 1)  f (0,1)    
3 3  14  2
7 7 3  1
f (11)  f (1,1)    
3 3  14  2
7 7
f (2 1)  f (2,1)   0   0
3 3
and the conditional distribution:

x 0 1 2

f(x,1) ½ ½ 0

and finally P( X = 0Y =1 ) = f(01) = ½

If it is known that 1 of the 2 pen refill selected is red, the probability the other refill selected is
not blue is ½.

Example 6:
The joint density function for the random variable (X,Y) where X in the unit temperature change
of Y is the proportions of spectrum shift that a certain atomic particle produces given by:

10xy2 0<x<y<1
f(x,y) =
0 elsewhere

a. Find the marginal distribution g(x) and h(y) and f(yx)


b. Find the probability that the spectrum shifts more than half of the total observation given the
temperature was increased by 0.25 units.

Solution:
1

x 1  x 3  , 0  x  1
 1 10 10
a. g ( x)   f ( x, y ) dy   10 xy dy  xy 3
2

 x 3 3
yx
x y
 y
h( y )   f ( x, y ) dx   10 xy 2 dx  5 x 2 y 2  5y4 ; 0  y  1.
 0
x 0

f ( x, y ) 10 xy 2 3y2
f ( y x)    , 0  x  y 1
x 1  x 3  (1  x )
3
g ( x) 10
3

 1  1 1 3y2 8
b. P  Y  X  0.25    f ( y x  0.25) dy   dy 
1/ 2 (1  0.253 )
 2  9
1/ 2

Expected value for Joint Probability Distributions

Definition:
Let X and Y be random variables with a joint probability distribution f(x,y). The mean or expected
value of the random variable h(X,Y) is:

h ( X ,Y )  E  h  X , Y     h( x, y ) f ( x, y ) if X and Y are discrete


x y
 
h ( X ,Y )  E  h  X , Y      h  x, y  f  x, y  dx dy if X and Y are continuous.
 

Example 7:
Consider example 46. Find:
a. E(XY)
b. E(2X-Y)

Solution:
From example 46, the joint probability distribution is:

f(x,y) 0 1 2 Row total

0 3/28 9/28 3/28 15/28

1 3/14 3/14 0 3/7

2 1/28 0 0 1/28

Column Total 5/14 15/28 3/28 1

Then:
h( X , Y )  XY
2 2
 h ( X ,Y )  E ( XY )   xy f ( x, y )
x 0 y 0

  0  0  f  0, 0    0 1 f  0,1   0  2  f  0, 2   1 0  f 1, 0 


11 f 1,1  1 2  f 1, 2    2  0  f  2, 0    2 1 f  2,1   2  2  f  2, 2 
 11 3  

3
14 14

Note: Notice that in this case, we can cancel those under the row and column zero since multiplying by
zero is simply zero.

f(x,y) 0 1 2 Row total

0 3/28 9/28 3/28 15/28

1 3/14 3/14 0 3/7

2 1/28 0 0 1/28

Column Total 5/14 15/28 3/28 1

Covariance

Let X and Y be random variables with joint probability distribution f(x,y). The covariance of X
and Y is:

 XY  E  X   X Y  Y      x   X  y  Y  f  x, y 
x y

for discrete case

 
 XY  E  X   X Y  Y       x    y    f ( x. y )dxdy
X Y
 

for continuous

Note: The covariance between 2 random variables is a measurement of the nature of the
association between the two.

Example 8.
From an urn containing 3 red, 4 green and 2 yellow balls, 3 balls are taken at random. If X is the
number of yellow and Y the number of red balls selected, determine the covariance of X and Y.

Solution:
Example 9:
The fraction X of male runners and the fraction Y of the female runners who completes the
marathon races is described by the joint density function:

8 xy 0  x  1, 0  y  x
f  x, y  
0 elsewhere

Find the covariance of X and Y


Means and Variables of Linear Combination of Random Variables

Theorem:
If a and b are constant, then:

E  aX  b   a  E  X    b
Proof:

Corollary: 1: if a = 0, then E(b) = b


2. If b = 0 then E(aX) =a[E(X)]

Theorem:
The expected value of the sum or difference of two or more function of a random variable X is
the sum or difference of the expected value of the functions.

E  g  X   h  X    E  g  X    E  h  X  
Proof:
Theorem:
The expected value of the sum or difference of 2 or more functions of the random variable X
and Y is the sum or difference of the expected value of the functions.

E  g  X , Y   h  X , Y    E  g  X , Y    E  h  X , Y  

Corollary 1:
If g  X , Y   g  X  and h  X , Y   h Y  then
E  g  X   h Y    E  g  X    E  h Y  

Corollary 2
Setting g  X , Y   X and h  X ,Y   Y
E  X  Y   E  X   E Y 

Theorem:
Let X and Y be 2 independent variables

E  XY   E  X  E Y 

Theorem:
If a and b are constants, then:

 aX
2
b  a  x  a 
2 2 2 2

Proof:

Corollary 1:  X2 b   x2   2

Corollary 2:  aX
2
 a 2 x2  a 2 2
Theorem :
If X and Y are random variables, then

 aX
2
bY  a  x  b  y  2ab xy
2 2 2 2

Proof:

Chebyshev’s Theorem
The probability that any random variable X will assume a value within k standard deviations of
1
the mean is at least 1  2 . That is
k

1
P    k  X    k   1 
k2
TERMINOLOGIES
Refer to terms in the study guide

FURTHER READINGS
Song, T. (2004), Fundamentals of Probability and Statistics for Engineers, Chapter 3 - 4

UNIT TASK
 Answer Module 1-CU5 Unit Task 1 - 3 in our MathEng3 Workbook

REFERENCES
[1] Walpole, R. (2012), Probability and Statistics for Scientist and Engineers, 9th Ed.

[2] Song, T. (2004), Fundamentals of Probability and Statistics for Engineers

You might also like