In this video we're going to see
an incredibly powerful theorem... ...in the context of probability,
called "Bayes' theorem". And Bayes' theorem provides the... the basis
for something called Bayesian inference,... ...and it is a really enormous deal,... ...that really changed
how we think about probabilities,... ...and a lot of statistics in general. Now, I will in this video just illustrate
the very simplest example, and in the next video... ...we're going to jump it up,
to the sort of next level of difficulty. So, the first thing I want to introdu... introduce,
is what actually is the theorem. Now, we have seen
conditional probability already,... ...so I'm going to remind you that... ...previously, we've seen the following fact. That, is we've seen
that the probability of A,... ...given B, was the probability that... ...A AND B occurred - the intersection -
divided out by the probability of B. Now, I'm gonna rearrange this.
I'm gonna go the other way around. So, if I have this, I can also therefore look
at what happens if I take the probability of... ...B, given A,... ...so the same thing,
but just flipped the other way around, and... ...by comparing these two,
it just has to be the probability, now it's... ...B intersect A. Note this: that doesn't matter,
A intersect B, and B intersect A,... ...I can flip those around,
it doesn't make any difference. And then now it's all divided out
by the probability of A. So we have these two different components, and... ...you'll notice that there's
this portion, the numerator, that... ...these two things
are indeed going to be equal, so... I can take the one,... ...the bottom one,
and I can substitute it into the top one. So, what that's going to give
me is that the probability of... ...A,... ...given B, is equal to, well,... ...the probability of the intersection,
but I'm going to rewrite that as the probability of... ...B, given A,... ...multiplied by the probability of A,... ...and then, all divided out
by the probability of B, as I have... ...down on the bottom, right here. So, what I want you to note
about this formula. This is going to be Bayes' theorem, right here. This is what it is, at least... ...in the single case, where we've got...
only got one B that were interested in. And what we have here,
is that we can sort of... ...alternate the A given B, or B given A. We can change that rule around... ...by multiplying by this particular ratio,... ...the probability of A
divided by the probability of B. Now, the reason why
this is so helpful is that... ...sometimes, computing the probability
of A given B is easy,... ...and sometimes
the probability of B given A is easy. Sometimes they're both easy, but... ...but in any scenario where...
where one of those two is easy to compute,... ...maybe you can go out on the real world,
and collect some data, and figure it out,... ...but that the other of the two
is a little bit more challenging,... ...you can use this formula
to convert them. You can get from the one conditional probability
to the other conditional probability. They are related by Bayes' theorem. So, let's look at an example
we've seen before in the previous video, but... ...we're going to investigate it
in the context of this Bayes' theorem. So, the example was: if you have a couple,
and they got two different children,... ...and you're asserted that... ...at least one of those children
is going to be a girl, but... ...what's the probability that... ...both of the children
are going to be a girl? So, let's put this into the formula, so... I'm asking, in effect,
I want to know, what is the probability... ...of the... ...two girls,... ...given that we're gonna have, at least,... ...one girl? Well, then, this by... the theorem tells me
that this is the probability, and I'm gonna... ...abbreviate even more,
and just go all the way down to one girl. I mean "at least one girl",
but I will write 1G. Given that I have two girls,... ...multiplied by P(A) here. P(A) is the first thing,
so multiplied by the probability of two girls. And then, finally, divided out
by the probability of B. So this is the probability of "at least one girl",
which I've abbreviated to be the probability of 1G. All right, so we have this computation.
So, how can we actually go and evaluate it now? Well,... ...let's look at this conditional probability,
the probability of having one girl,... ...at least one girl,... ...given that you know there's two girls. But,... ...if you're being told that
there's two girls,... ...then the probability
of having at least one girl is 100%. If you have two girls, you have "at least one" of them. So, the... the P(1G), given the 2G,
is really, really easy to compute. It's 100%, or is just the value of one. I don't have to do anything. Okay, well, that's nice. What about the probability
of there being two girls? Well,... ...you might remember
that the four cases are... ...you could have a girl-girl,... ...you could have a girl-boy,... ...you could have a boy-girl,... ...and you could have a boy-boy.
There were some... four different sort of possibilities. But then, if we're going to investigate this,... ...we want to investigate, what's the probability of having two girls? Well, there's only one of those four possibilities,
so this is just going to be the value of 1/4. And then, I divide out
by the probability of at least one girl. Well, this one has a girl,
and that one has a girl, and that one. There's three of them that have a girl, so... ...3/4. In other words, we get 1/3,
which is the same value that we computed just by... ...pure conditional probability, but we... ...verified that it works, using... ...Bayes' theorem.
That illustrates at least... ...some motivation that Bayes' theorem
is likely going to be true and useful,... ...presumably in other contexts beyond this.