No history yet

Joint and Conditional Probability

Transcript

Beau

Okay, Jo, so last week we were talking about, you know, probabilities of single things happening. Like, what's the chance of a coin landing on heads, or... or drawing an ace from a deck. But my life feels way more complicated than that.

Jo

It usually is. Things rarely happen in a vacuum, right? Events are almost always connected to... to other events.

Beau

Exactly. Like, this weekend. I want to have a barbecue. So I'm worried about two things: is it going to be cloudy, and is it going to rain? They're not totally separate questions.

Jo

That is the perfect setup for what we're talking about today. We're moving from the probability of one thing, A, to the probability of A *and* B happening together. That's called joint probability.

Beau

Joint probability. Okay. So, the chance of it being cloudy *and* rainy at the same time.

Jo

Precisely. And we can visualize this. Imagine a simple chart. The columns could be 'Rain' and 'No Rain', and the rows could be 'Cloudy' and 'Not Cloudy'. Each cell in that grid represents a joint probability.

Beau

Oh, I see. So the top-left box would be the number for the chance of 'Cloudy and Rain'.

Jo

Exactly. Let's put some numbers in it. Let's say the chance of 'Cloudy and Rain' is 30%. The chance of 'Cloudy and No Rain' might be 10%. The chance of 'Not Cloudy and Rain' is, I don't know, almost zero, let's say 1%. And 'Not Cloudy and No Rain'... a nice sunny day... let's make that 59%.

Beau

And all those numbers in the boxes have to add up to 100%, right? Because something has to happen.

Jo

Yep, that's one of the axioms we talked about. The total probability of the entire sample space is one. So that table... that's a joint probability distribution. It gives you the probability for every possible combination of outcomes.

Beau

Okay, okay. So if I add up the 'Cloudy' row... 30% for 'Cloudy and Rain' plus 10% for 'Cloudy and No Rain'... I get 40%. What's that? It's not a joint probability anymore.

Jo

It's not. That's a marginal probability. You've just calculated the overall probability of it being cloudy, regardless of whether it rains or not. Think about it, when you write those totals in a table, you write them in the margins.

Beau

Oh, marginal... margin. Got it. So the marginal probability of rain would be the 'Rain' column added up... 30% plus 1%... so 31%. Just the total chance of rain.

Jo

You got it. You're basically collapsing one of the variables to just look at the other one on its own.

Beau

Okay, but here's the real question for my barbecue. Let's say I wake up, I look outside, and it *is* cloudy. I already know that. It's a given. Now what's the chance of rain? It's not 31% anymore, is it?

Jo

No, it's not. And you've just perfectly described conditional probability. The probability of an event *given* that another event has already happened. We're adding new information, and that changes our calculation.

Beau

So... how do I figure that out?

Jo

Well, think about the table. You know it's cloudy, so you can completely ignore the 'Not Cloudy' row. Your entire world, your new sample space, is just that 'Cloudy' row.

Beau

Which has 'Cloudy and Rain' at 30% and 'Cloudy and No Rain' at 10%. The total is 40%.

Jo

Right. So, out of that 40% chunk of possibility, what portion of it is rainy?

Beau

The rainy part is 30... so... is it 30 divided by 40?

Jo

Exactly. It's the joint probability of 'Rain and Cloudy' divided by the marginal probability of 'Cloudy'. So 30 divided by 40 is 0.75. There's a 75% chance of rain, *given* that it's cloudy.

Beau

Wow, okay. That... makes a lot of sense. So knowing it was cloudy bumped the chance of rain from 31% all the way up to 75%. My barbecue is in trouble.

Jo

That's because clouds and rain are dependent events. Knowing about one gives you a lot of information about the other. But what if they weren't?

Beau

What do you mean?

Jo

What if knowing one event happened told you absolutely nothing new about the other one? Think about flipping a coin twice. Let's say the first flip is heads. What's the probability the *second* flip is heads?

Beau

Still 50%. The coin doesn't have a memory.

Jo

Exactly. The conditional probability of 'Heads on second flip' *given* 'Heads on first flip' is just... the regular probability of 'Heads on second flip'. When that's true, the events are independent.

Beau

So, my barbecue's fate is dependent on the clouds, but the fate of my second coin flip is independent of the first one.

Jo

Perfectly stated. And when events are independent, calculating their joint probability—the chance they both happen—is super easy. You just multiply their individual probabilities.

Beau

So the chance of two heads in a row is 50% times 50%, which is 25%.

Jo

You got it. You can't do that with cloudy and rainy, because they're linked. Their joint probability isn't just their marginals multiplied together. But for independent events, it's that simple.

Beau

Okay, that clears up a lot. It's all about whether knowing one thing changes the odds of another. I guess... I should probably plan for an indoor barbecue.

Jo

Given the data we made up? I'd say that's a statistically sound decision.