Docsity

Joint Probability Mass Functions and Expectations of Multiple Random Variables, Slides of Java Programming

Partial preview of the text

Download Joint Probability Mass Functions and Expectations of Multiple Random Variables and more Slides Java Programming in PDF only on Docsity!

Today

What if we have multiple random variables associated with the same event?

  • Joint PMFs
  • Conditioning
  • Independence

Today

What if we have multiple random variables associated with the same event?

  • Joint PMFs
  • Conditioning
  • Independence Most of this is just new notation for concepts we already know!

Joint PMFs

  • Let X and Y be discrete random variables associated with the same experiment. The joint PMF of X and Y is denoted p X,Y . For any values k of X and l of Y, p X,Y ( k, l ) = P(X= k , Y= l ) = P({X= k }∩{Y= l })
  • Examples:
    • Experiment: Choose a random person in the class. X = person’s height, Y = person’s weight.

Joint PMFs

  • Let X and Y be discrete random variables associated with the same experiment. The joint PMF of X and Y is denoted p X,Y . For any values k of X and l of Y, p X,Y ( k, l ) = P(X= k , Y= l ) = P({X= k }∩{Y= l })
  • Examples:
    • Experiment: Choose a random person in the class. X = person’s height, Y = person’s weight.
    • Experiment: Run a randomized algorithm. X = execution time, Y = amount of memory used.

Tabular Representation

l 1 l 2 l 3 l 4 k 1

k 2

k 3

X
Y

p X,Y ( k 2 , l 3

Tabular Representation

Is this a valid joint PMF? How do we know? l 1 l 2 l 3 l 4 k 1

k 2

k 3

X
Y

p X,Y ( k 2 , l 3

Marginal PMFs

We can compute the PMFs of X and Y from their joint PMF: € p X ( k ) = p X , Y ( k , l ) l

€ p Y ( l ) = p X , Y ( k , l ) k

l 1 l 2 l 3 l 4 k 1

k 2

k 3

Marginal PMFs

We can compute the PMFs of X and Y from their joint PMF: € p X ( k ) = p X , Y ( k , l ) l

€ p Y ( l ) = p X , Y ( k , l ) k

l 1 l 2 l 3 l 4 p X ( k ) k 1

k 2

k 3

Computing Expectations

Expectation of a function: Let X and Y be random variables, and g be an arbitrary function of X and Y. Then

E [ g ( X , Y )] = g ( k , l ) p

X , Y

( k , l )

l

k

Computing Expectations

Expectation of a function: Let X and Y be random variables, and g be an arbitrary function of X and Y. Then Linearity of expectation: Let X and Y be random variables. Then for any scalars a , b , and c , E[ a X + b Y + c ] = ???

E [ g ( X , Y )] = g ( k , l ) p

X , Y

( k , l )

l

k

Three or More Random Variables

All of this extends to more than two random variables too.

Three or More Random Variables

All of this extends to more than two random variables too.

  • Joint PMFs: p X,Y,Z ( k, l, m ) = P(X= k , Y= l , Z= m ) = P({X= k }∩{Y= l }∩{Z= m })

Three or More Random Variables

An office decides to do a gift exchange for their annual holiday party. Everyone in the office purchases a gift and places it in a box. Each person is then given a random gift from the box. What is the expected number of people who get back the gift that they purchased?

Three or More Random Variables

An office decides to do a gift exchange for their annual holiday party. Everyone in the office purchases a gift and places it in a box. Each person is then given a random gift from the box. What is the expected number of people who get back the gift that they purchased? Note that we used the fact that the expectation of a sum of random variables is equal to the sum of their expectations. Independence is not required for this!