0

Suppose that Y and Z are random variables with Y ∼ Bernoulli(p) and Z = −Y + 1.

Find the joint probability mass function P(Y = y, Z = z) for y = 0, 1 and z = 0, 1

I see that when Y = 0, Z = 1 and when Y = 1, Z = 0 but I don't know where to go from here. Any tips?

  • What are you stuck on? Do you understand what you're being asked to do? You just need to fill out a 2x2 table with probabilities. E.g. what is $P(Y=0\text{ and }Z=0)$? – Karl Jan 02 '23 at 22:10
  • @Karl yes I know that I need to fill out the 2x2 table but I'm confused how the answer was y(1 − z)p + (1 − y)z(1 − p) – Tingo Hugo Jan 02 '23 at 22:17
  • Since $Z = 1 - Y$, for $y \in {0, 1}$, $\Pr[Y = y, Z = 1 - y] = \Pr[Y=y] = p$ and $\Pr[Y = y, Z = z=y] = 0$.. – QED Jan 02 '23 at 22:23
  • @TingoHugo That answer is just a convoluted way of packing the four values from the 2x2 table into one expression, using a trick with multiplication by 1 and/or 0. You don't need to do that - just state the four probabilities (can you say what they are?) and you have stated the PMF. – Karl Jan 02 '23 at 22:24
  • @Karl come to think about it, I'm not sure how to even work out the 2x2 table. This is embarassing. I think P(Y = 1) = p and P(Y = 0) = (1-p) by definition of the bernoulli distribution but how do you account for Z – Tingo Hugo Jan 02 '23 at 22:49
  • That's right. Do you have a guess for $P(Y=1, Z=0)$? What about $P(Y=1,Z=1)$? Hint: $Z$ is defined as a deterministic function of $Y$, so for a given value of $Y$ there is only one possible value of $Z$. An impossible event has probability $0$. – Karl Jan 02 '23 at 22:52
  • 1
    Well, when Z = 0 Y equals to 1, so isn't P(Y=1,Z=0) the same as P(Y=1)? For P(Y=1,Z=1), I'm assuming Z AND Y can't equal to 1 simultaneously so that's 0? – Tingo Hugo Jan 02 '23 at 22:54
  • Yep, that's right. Combining all of that, you could write the PMF $P(Y=y,Z=z)$ as an expression using piecewise notation with conditions on the values of $y$ and $z$. – Karl Jan 02 '23 at 22:58
  • I understand thanks! About the form the answer was in, how do you convert the table into that? – Tingo Hugo Jan 02 '23 at 22:59
  • The best way to understand how that trick works is to reverse-engineer it: plug $y,z$ values into the formula and see what happens. In my opinion, there's not much value in writing it that way - the casewise expression is clearer. – Karl Jan 03 '23 at 00:18

0 Answers0