Bayes Theorem, or Bayes Rule, is one of the most important concepts used in Bayesian estimation or
probabilistic estimation, Bayes Theorem allows you to calculate the likelihood or bounds of an unknown
parameter or event based on some prior information related to that event.
And this process is called Bayesian inference.
Bayes theorem is derived from conditional probability.
So from conditional probability, we can work out the conditional probability of A given B as the joint
probabilities of A and B over the marginal probability.
We can also write this equation in the opposite way so we can work out the conditional probability of
being given a it's just going to be the reverse.
And now from probability, we know that the joint probability, so the probability of A and B and the
probability of B and A, they're going to be equal the same thing.
So joint probabilities are equivalent.
So then we can rearrange this equation and substitute them into each other.
We end up with Bayes Theorem.
So Bayes Theorem, a rule is now displayed on the slide.
We can see that this first term here, this is a conditional probability and it is the likelihood of
event A, given the event B occurs the next time over here is another conditional probability.
It is the likelihood of event B given the event A has occurred.
The next term is the marginal probability is just the likelihood of event A occurring.
And this last time the divisor is another marginal probability and it's the likelihood of Event B occurring.
Now when we talk about these different conditional and marginal probabilities, we give them special
names.
When we're talking about Bayes Theorem, first time here.
Sometimes we can call that the posterior probability.
So this is the probability, given this information over here, this term here is called the likelihood.
This next term here is called the primary probability.
And this term here is called the evidence.
Now, we'll go over what these terms actually mean in the next sample here.
So let's look at an example.
So we might be asked, what is the likelihood of it raining today?
Well, we can use Bayes Theorem and a bit of information to work this out.
What we want to do is we can want to use some prior information.
So if we know that it has rained in the last 18 days and 30 days, well, then we can work out the probability
of it raining today so we get probability of rain being point six.
So this is the prior information.
Now, if we just use this information, we can get one estimate of the likelihood of rain is going to
be today, but we can include some other information.
So if we know some other information, we can come up with a better estimate of the likelihood of rain.
So this is called the prior information.
This is this term up here.
Next, we can look at evidence so we can look out the window and we can come to some evaluation and
some judgment.
And we're going to say it is a forty eight percent chance of clouds in the morning today.
So now we can look at including some other information and we can include the likelihood.
So that's this term up here.
And in this case, it's going to be the what's the likelihood that is going to be cloudy, given that
it rains so we can use some prior information so we can look at on the days that is range rain, we
can sort of say that 68 percent of the time it was also cloudy in the morning.
So this is its point, six, eight.
So we can include all these term into using Bayes Theorem and we can come up with the posterior probability,
what is a probability that it's going to rain today, given that it might be cloudy in the morning?
So evaluating this equation here, we can work out that there's a point eighty five or eighty five percent
chance that there's actually going to rain today.
So you can see here this probability is a lot has included a lot more information than just this probability
of rain over here.
So using this information, we can say the probability that it's going to rain today is not point six
is point eight five.
So in that case, we better bring an umbrella.
So this is an example of how we can use Bayes Theorem to include more information on prior information
into the estimate to come up with an even better estimate of some probability.