Joint Probability Distributions

advertisement
Systems Engineering Program
Department of Engineering Management, Information and Systems
EMIS 7370/5370 STAT 5340 :
PROBABILITY AND STATISTICS FOR SCIENTISTS AND ENGINEERS
Joint Probability Distributions
Dr. Jerrell T. Stracener, SAE Fellow
Leadership in Engineering
1
Joint Probability Mass Function
The function p(x, y) is a joint probability mass function of
the discrete random variables X and Y if
1. p(x, y)  0 for all (x, y)
2.
 p( x, y)  1
x
y
3. P(X = x, Y = y) = p(x, y)
For any region A in the xy plane,
P[(X, Y)  A] =
 p(x, y)
A
2
Example
Two refills for a ballpoint pen are selected at random
from a box that contains 3 blue refills, 2 red refills
and 3 green refills. If X is the number of blue refills
and Y is the number of red refills selected, find
a. The joint probability mass function p(x, y), and
b. P[(X, Y)  A], where A is the region
{(x, y)|x + y  1}
3
Example - Solution
The possible pairs of values (x, y) are (0, 0), (0, 1),
(1, 0), (1, 1), (0, 2), and (2, 0), where p(0, 1), for
example represents the probability that a red and a
green refill are selected. The total number of equally
likely ways of selecting any 2 refills from the 8 is:
 8  8!
  
 28
 2  2!6!
The number of ways of selecting 1 red from 2 red
refills and 1 green from 3 green refills is
 2  3
    6
 1  1 
4
Example - Solution
Hence, p(0, 1) = 6/28 = 3/14. Similar calculations yield the
probabilities for the other cases, which are presented in the
following table. Note that the probabilities sum to 1.
y
0
X
1
2
0
3
28
9
28
3
28
1
3
14
3
14
2
1
28
Column Totals
5
14
Row Totals
15
28
3
7
1
28
15
28
3
28
1
5
Example - Solution
3
 3  2 

  

x  y  2  x  y 

px, y  
8
 
 2
for x = 0, 1, 2; y = 0, 1, 2; 0  x + y  2.
b. P[(X, Y)  A] = P(X + Y  1)
= p(0, 0) + p(0, 1) + p(1, 0)
3 3 9

 
28 14 28
9

14
6
Joint Density Functions
The function f(x, y) is a joint probability density
function of the continuous random variables 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.
7
Marginal Distributions
The marginal probability mass functions
of x alone and of Y alone are
g  x    p ( x, y )
y
and
h  y    p ( x, y )
x
for the discrete case.
8
Marginal Distributions
The marginal probability density functions of x
alone and of Y alone are
g x  


f ( x, y )dxdy

and
h y  

 f ( x, y)dxdy

for the continuous case.
9
Conditional Probability Distributions
Let X and Y be two discrete random variables, with joint
probability mass function p(x,y) and marginal probability mass
functions m(x) and n(y). The conditional probability mass
function of the random variable Y, given that X = x, is
px, y 
l y | x  
mx 
,
m(x) > 0
Similarly, the conditional probability mass function of the
random variable X, given that Y = y, is
px, y 
l x | y  
n y 
,
n(y) > 0
10
Statistical Independence
Let X and Y be two discrete random variables, with joint
probability mass function p(x, y) and marginal probability
mass functions m(x) and n(y), respectively. The random
variables X and Y are said to be statistically independent if
and only if
px, y  mx ny
for all (x, y) within their range.
11
Statistically Independent
Let X1, X2, …, Xn be n discrete random variables, with joint
probability mass functions p(x1, x2, …, xn) and marginal
probability mass functions p1(x1), p2(x2), …, pn(xn),
respectively. The random variables X1, X2, …, Xn are said to
be mutually statistically independent if and only if
p(x1, x2, …, xn) = p1(x1),p2(x2), …, pn(xn)
for all (x1, x2, …, xn) within their range.
12
Example
A candy company distributed boxes of chocolates with a
mixture of creams, toffees, and nuts coated in both light and
dark chocolate. 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
 52 (2 x  3 y), 0  x  1,0  y  1
f ( x, y)  
0,
elsewhere

 
a) Verify whether
  f(x, y)dxdy  1
  
b) Find P[(X,Y)  A], where A is the region {(x,y) | 0<x<½,
¼<y<½}.
13
Example – Solution
a)
 
1 1
2
 f ( x, y)dxdy  0 0 5 (2 x  3 y)dxdy
1
2
x 1
2x
6 xy


dy
5
5 x 0
0
2 y 3y
 2 6y 
  

dy 
5 5 
5
5
0
1
2 1
0
2 3
  1
5 5
14
3D plotting for example problem
15
Example – Solution
b)
P( X , Y )  A  P(0  X  12 , 14  Y  12 )
1 1
2 2
2
   (2 x  3 y )dxdy
1 0 5
4
1
2

1
4
1
2
2
x  12
2x
6 xy

dy
5
5 x 0
y 3y
 1 3y 
    dy  
5 
10 10
1  10
4
2
1
2
1
4
1  1 3   1 3  13
        
10  2 4   4 16  160
16
Example
Show that the column and row totals of the following
table give the marginal distribution of X alone and
of Y alone.
y
0
X
1
2
0
3
28
9
28
3
28
1
3
14
3
14
2
1
28
Column Totals
5
14
Row Totals
15
28
3
7
1
28
15
28
3
28
1
17
Example – Solution
For the random variable X, we see that
2
P X  0  g (0)   f (0, y )  f (0,0)  f (0,1)  f (0,2)
y 0
3 3 1
5

 

28 14 28 14
2
P X  1  g (1)   f (1, y )  f (1,0)  f (1,1)  f (1,2)
y 0
9
3
15

 0
28 14
28
2
P X  2  g (2)   f (2, y )  f (2,0)  f (2,1)  f (2,2)
y 0

3
3
00 
28
28
18
Example
Find g(x) and h(y) for the joint density function of
the previous example :
 52 (2 x  3 y), 0  x  1,0  y  1
f ( x, y)  
0,
elsewhere

19
Example – Solution
By definition,

2 y 1
1
2
4 xy 6 y
g ( x)   f ( x, y )dy   (2 x  3 y )dy 

5
5
10

0
y 0
4x  3

5
For 0x 1, and g(x)=0 elsewhere. Similarly,

2
4(1  3 y)
h( y)   f ( x, y)dx   (2 x  3 y)dx 
5
5

0
1
For 0 y 1, and h(y)=0 elsewhere.
20
Conditional Probability Distribution
Let X and Y be two continuous random variables, with joint
probability density function f(x,y) and marginal probability
density functions g(x) and h(y). The conditional probability
density function of the random variable Y, given that X = x, is
f  x, y  ,
f  y | x 
g x 
g(x) > 0
Similarly, the conditional probability density function of the
random variable X, given that Y = y, is
f  x, y 
f x | y  
,
h y 
h(y) > 0
21
Example
Given the joint density function
 x(1  3 y 2 )

, 0  x  2,0  y  1
f ( x, y )  
4

0,
elsewhere
Find g(x), h(y), f(x|y), and evaluate P(¼<X<½|Y=1/3).
22
Example – Solution
By definition,

3 y 1
x(1  3 y )
xy xy
g ( x)   f ( x, y )dy  
dy 

4
4
4

0
and

1
2
y 0
x
 , 0x2
2
2 x2
x(1  3 y )
x 3x y
1 3y2
h( y )   f ( x, y )dx  
dy  

, 0  y 1
4
8
8 x 0
2

0
therefore,
f ( x, y) x(1  3 y 2 ) / 4 x
f ( x | y) 

 , 0x2
2
h( y)
(1  3 y ) / 2 2
and
2
2
2
2
1
2
1
1
x
3
1
P  X  | Y     dx  .
2
3 1 2
64
4
4
23
Statistical Independence
Let X and Y be two continuous random variables, with joint
probability density function f(x, y) and marginal probability
density functions 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.
24
Statistically Independent
Let X1, X2, …, Xn be n continuous random variables, with
joint probability density functions f(x1, x2, …, xn) and
marginal probability functions f1(x1),f2(x2), …, fn(xn),
respectively. The random variables X1, X2, …, Xn are said
to be mutually statistically independent if and only if
f(x1, x2, …, xn) = f1(x1),f2(x2), …, fn(xn)
for all (x1, x2, …, xn) within their range.
25
Example
Two refills for a ballpoint pen are selected at random
from a box that contains 3 blue refills, 2 red refills
and 3 green refills. If X is the number of blue refills
and Y is the number of red refills selected, Show that
the random variables are not statistically independent.
26
Example – Solution
Let us consider the point (0,1). From the
following table:
X
y
0
1
2
0
3
28
9
28
3
28
1
3
14
3
14
2
Column Totals
15
28
3
7
1
28
5
14
Row Totals
1
28
15
28
3
28
1
27
Example – Solution
We find the three probabilities f(0,1), g(0),
and h(1) to be
3
f (0,1)  ,
14
2
3 3 1
5
g (0)   f (0, y ) 
 
 ,
28 14 28 14
y 0
2
h(1)  
y 0
3 3
3
f ( x,1)    0 
14 14
17
Clearly, f (0,1)  g (0)h(1) and therefore X and Y are
not statistically independent.
28
Download