Let’s talk about something easier today, basic probability theorems.
Let’s say we have some event , and we know the probability of event
happening, given events
, so we know
for all i between 1 and n. We can find the probability of event
happening by using total probability theorem,
An example of when you could use this? Say you rolled a die and then flipped a coin as many times as the top face on the rolled die. You could find the probability of flipping a certain amount of heads by adding together the probability of getting that many heads given each specific dice roll. The problem is then broken down into 6 simpler cases, and these can be added together for the final answer.
For Bayes theorem, given an event A and B (for now, let’s say they are not independent), recall that conditional probability, probability of event A, given event B, is defined as
we can say the same thing given we want the probability of event B, given event A,
with these in mind, we can make it so that and substituting into the other equation, we get Bayes theorem,
Bayes theorem is extremely useful, and is used in Bayesian inference methods and a lot of modern statistical methods. But what practical problem is Bayes theorem useful for?
Say you are in a casino, and you think the house is sometimes using a trick coin that gets heads more often than tails (a normal coin would be called a fair coin, with 50/50 shot of getting either one). You can use Bayesian inference to make an educated guess at the probability of the casino using a biased coin, given the results you’ve observed, and the calculation would entail using probabilities of the results which, based off some assumptions and maybe prior information, should not be too hard to calculate.
Bayes theorem is used as the basis for maximum a priori estimation, or MAP estimation, Gibbs sampling, among other things, so it’s a good idea to be well acquainted with the theorem beforehand.
One thought on “Total Probability Theorem and Bayes Theorem”