Docsity

Joint Probability of Discrete Random Variables: Jointly Distributed RV (Discrete), Study notes of Machine Learning

Toggle sidebar
bg1
RS – 4 – Jointly Distributed RV (Discrete)
1
Chapter 4
Jointly Distributed Random Variables
Discrete Multivariate Distributions
Quite often there will be 2 or more random variables (X, Y, Z, etc)
defined for the same random experiment.
Example 1: Portfolio Manager
X = Fund 1 has a return greater than target over a quarter.
Y = Fund 2 has a return greater than target over a quarter.
The manager of the funds is interested in the behavior of X and Y:
Example 2: A bridge hand is selected from a deck of 52 cards.
X = the number of spades in the hand (13 cards).
Y = the number of hearts in the hand (13 cards).
In these examples, we will define: p(x,y) = P[X = x, Y = y]. The
function p(x,y) is called the joint probability function of X and Y.
Joint Probability Function
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Joint Probability of Discrete Random Variables: Jointly Distributed RV (Discrete) and more Study notes Machine Learning in PDF only on Docsity!

Chapter 4

Jointly Distributed Random Variables

Discrete Multivariate Distributions

Quite often there will be 2 or more random variables ( X, Y, Z, etc ) defined for the same random experiment.

Example 1: Portfolio Manager X = Fund 1 has a return greater than target over a quarter. Y = Fund 2 has a return greater than target over a quarter. The manager of the funds is interested in the behavior of X and Y:

Example 2: A bridge hand is selected from a deck of 52 cards. X = the number of spades in the hand (13 cards). Y = the number of hearts in the hand (13 cards).

In these examples, we will define: p ( x,y ) = P [ X = x, Y = y ]. The function p ( x,y ) is called the joint probability function of X and Y.

Joint Probability Function

Note: The possible values of X are 0, 1, 2, …, 13 The possible values of Y are also 0, 1, 2, …, 13 and X + Y ≤ 13.

p x y  ,   P X   x Y ,  y 

x y x y

     ^  

The total number of ways of choosing the 13 cards for the hand

The number of ways of choosing the x spades for the hand

The number of ways of choosing the y hearts for the hand

The number of ways of completing the hand with diamonds and clubs.

Joint Probability Function: Bridge Hand

Table: p ( x , y )

0 1 2 3 4 5 6 7 8 9 10 11 12 13 0 0.0000 0.0002 0.0009 0.0024 0.0035 0.0032 0.0018 0.0006 0.0001 0.0000 0.0000 0.0000 0.0000 0. 1 0.0002 0.0021 0.0085 0.0183 0.0229 0.0173 0.0081 0.0023 0.0004 0.0000 0.0000 0.0000 0.0000 - 2 0.0009 0.0085 0.0299 0.0549 0.0578 0.0364 0.0139 0.0032 0.0004 0.0000 0.0000 0.0000 - - 3 0.0024 0.0183 0.0549 0.0847 0.0741 0.0381 0.0116 0.0020 0.0002 0.0000 0.0000 - - - 4 0.0035 0.0229 0.0578 0.0741 0.0530 0.0217 0.0050 0.0006 0.0000 0.0000 - - - - 5 0.0032 0.0173 0.0364 0.0381 0.0217 0.0068 0.0011 0.0001 0.0000 - - - - - 6 0.0018 0.0081 0.0139 0.0116 0.0050 0.0011 0.0001 0.0000 - - - - - - 7 0.0006 0.0023 0.0032 0.0020 0.0006 0.0001 0.0000 - - - - - - - 8 0.0001 0.0004 0.0004 0.0002 0.0000 0.0000 - - - - - - - - 9 0.0000 0.0000 0.0000 0.0000 0.0000 - - - - - - - - - 10 0.0000 0.0000 0.0000 0.0000 - - - - - - - - - - 11 0.0000 0.0000 0.0000 - - - - - - - - - - - 12 0.0000 0.0000 - - - - - - - - - - - - 13 0.0000 - - - - - - - - - - - - -

1 3 1 3 2 6 1 3 5 2 1 3

x y x y

           (^)     ^  ^  ^       

Joint Probability Function: Bridge Hand

Table: p ( x , y )

0 1 2 3 4 5 0 0.1317 0.1646 0.0823 0.0206 0.0026 0. 1 0.1646 0.1646 0.0617 0.0103 0.0006 0 2 0.0823 0.0617 0.0154 0.0013 0 0 3 0.0206 0.0103 0.0013 0 0 0 4 0.0026 0.0006 0 0 0 0 5 0.0001 0 0 0 0 0

 

5

x y x y

x y x y

 

P  X  Y     p  x y , 0.

xy

Joint Probability Function: Properties

Definition : Marginal Probability

Let X and Y denote two discrete RV with joint probability function

p ( x,y ) = P [ X = x, Y = y ]

Then

pX ( x ) = P [ X = x ] is called the marginal probability function of X. pY ( y ) = P [ Y = y ] is called the marginal probability function of Y.

Note : Let y 1 , y 2 , y 3 , … denote the possible values of Y

Marginal Probability

p X  x   P  X  x  P  X  x Y ,  y 1    X  x Y ,  y 2 K

P (^)  Xx Y ,  y 1 (^)   P (^)  Xx Y ,  y 2  K

 p  x , y 1   p  x , y 2  K  , j   , 

j y

 (^)  p x y  p x y

Thus, the marginal probability function of X, p (^) X (x) is obtained from the joint probability function of X and Y by summing p(x,y) over the possible values of Y.

Similarly,

Marginal Probability

pY  y   P Y   y   P  X  x 1 , Y  y    X  x 2 , Y  y K

 P  X  x 1 , Y  y   P  X  x 2 , Y  y  K

 p  x 1 , y   p  x 2 , y  K  i ,^   , 

i x

 (^)  p x y  p x y

Example: A die is rolled n = 5 times What is the probability that we roll more sixes than fives , that is, what is P [ X > Y ]? X = the number of times a “ six ” appears. Y = the number of times a “ five ” appears.

0 1 2 3 4 5 p^ X ( x^ ) 0 0.1317 0.1646 0.0823 0.0206 0.0026 0.0001 0. 1 0.1646 0.1646 0.0617 0.0103 0.0006 0 0. 2 0.0823 0.0617 0.0154 0.0013 0 0 0. 3 0.0206 0.0103 0.0013 0 0 0 0. 4 0.0026 0.0006 0 0 0 0 0. 5 0.0001 0 0 0 0 0 0. p (^) Y ( y ) 0.4019 0.4019 0.1608 0.0322 0.0032 0.

Marginal Probability

P ( X>Y ) = P [ X > 0 , Y = 0] + P [ X > 1 , Y ≤ 1] + P [ X > 2 , Y ≤ 2]

Example : Probability of rolling more sixes than fives , when a die is rolled n = 5 times X = the number of times a “ six ” appears. Y = the number of times a “ five ” appears.

0 1 2 3 4 5 p (^) X ( x ) 0 0.1317 0.1646 0.0823 0.0206 0.0026 0.0001 0. 1 0.1646 0.1646 0.0617 0.0103 0.0006 0 0. 2 0.0823 0.0617 0.0154 0.0013 0 0 0. 3 0.0206 0.0103 0.0013 0 0 0 0. 4 0.0026 0.0006 0 0 0 0 0. 5 0.0001 0 0 0 0 0 0. p (^) Y ( y ) 0.4019 0.4019 0.1608 0.0322 0.0032 0.

x

y

Conditional Probability

pY | X ( y=2 | x= 0) = P [ Y = 2 | X = 0] = p ( y = 2, x = 0) /pY (x = 0) = = .0823/.4019 =.

0 1 2 3 4 5 0 0.3277 0.4096 0.2048 0.0512 0.0064 0. 1 0.4096 0.4096 0.1536 0.0256 0.0016 0. 2 0.5120 0.3840 0.0960 0.0080 0.0000 0. 3 0.6400 0.3200 0.0400 0.0000 0.0000 0. 4 0.8000 0.2000 0.0000 0.0000 0.0000 0. 5 1.0000 0.0000 0.0000 0.0000 0.0000 0.

The conditional distribution of Y given X = x: pY | X ( y | x ) = P [ Y = y | X = x ]

x

y

Conditional Probability

Example : A Bernoulli trial ( S : p, F : q = 1 – p ) is repeated until two successes have occurred. X = trial on which the first success occurs and Y = trial on which the 2 nd^ success occurs.

Find the joint probability function of X, Y. Find the marginal probability function of X and Y. Find the conditional probability functions of Y given X = x and X given Y = y,

Marginal & Conditional Probability - Example

Solution

A typical outcome would be:

FFF…FSFFF…FS

x - 1

x y

y – x - 1

 q x^ ^1 pq y^ ^ x^ ^1 p  q y ^2 p^2 if y  x

p (^)  x y , (^)   P (^)  Xx Y ,  y

 

2 2 if

0 otherwise

q y p y x

p x y

Marginal & Conditional Probability - Example

The marginal distribution of Y

pY (^)  y (^)   P Y   y   ,  x

 (^)  p x y

 1  2 2 2, 3, 4,

0 otherw ise
 y  p q y  y 
K

This is the negative binomial distribution with k = 2. In count data models, the negative binomial ("negbin") is used when the data shows overdispersion –i.e., the volatility is greater than the mean, the usual assumption when using the Poisson distribution.

Marginal & Conditional Probability - Example

The conditional distribution of X given Y = y

p X Y  x y  P  X  x Y  y 

Y

P X x Y y p x y P Y y p y

2 2 1

y x

p q

pq

 pq y^ ^ x ^1 for y  x  1, x  2, x  3 K

This is the geometric distribution with time starting at x. We think of the geometric distribution as the discrete analogue of exponential distribution. It also has no memory.

Marginal & Conditional Probability - Example

The conditional distribution of Y given X = x:

p (^) Y Xy x (^)  P  Yy Xx 

X

P X x Y y p x y P X x p x

2 2 2 2

y y

p q y p q y

  (^)    

This is the uniform distribution on the values 1, 2, …, ( y – 1)

for x  1,2,3, K,  y  1 

Marginal & Conditional Probability - Example