 Hi, I'm Zor. Welcome to Indizor Education. We continue talking about conditional probabilities and this lecture is about a very interesting theorem which was proved by very a long time ago living individual. I can't even tell that he is a mathematician, Thomas Bias and he was Englishman He was actually theologist, but he was really very good mathematician as well. I shouldn't really say he was not and so this very very simple theorem has his name It's very simple. I will prove it to you in just almost like one line or two lines but it has a very interesting practical applications I do recommend to listen to this lecture from Unizor.com because this is basically a part of the whole course of advanced mathematics for teenagers So you can read the notes to this lecture. It's basically written as a textbook and then listen to the lecture if there is anything which you might not really understand from the first reading So this is basically the suggested way of working with this website. Anyway, so let me go straight to this Bias theorem. Bias, that's the name of the guy Sometimes it's called formula. Bias formula or Bias theorem doesn't really matter So what I will do is I will actually present this theorem as a purely mathematical statement, which is very very easy and then we will talk about how to apply it in different cases So here is the theorem. Let's consider You have certain sample space Well, I can use a Greek letter omega, which sometimes is used for this Which contains certain elementary events I know E1, E2, etc. E n doesn't really matter And if you have two different Events, which is basically a combination of elementary events, right? Whatever the indices are doesn't really matter Then I have introduced the concept of conditional probability of event A under condition B And we have agreed that this is a good expression for the probability of this conditional probability Now, I really hate formulas which are not really supported by good understanding of what it is So let me just deviate from my main Theme of this particular lecture and again talk about this particular formula This is an extremely simple formula and all it does it basically states that if you have certain number of elementary events This is everything whatever is possible to occur There are elementary events here certain number Let's talk about finite case when you have a finite number of points inside of this area And then you have certain event which encompasses only part of these elementary events Then geometrically speaking the probability of this event is a ratio of number of points which are inside relative to the entire number of points in the area or If you're not talking about finite number of Elementary events and if you are not talking about Elementary events which which have equal chances. It's still exactly the same thing Whatever number of points here this area. Let's use the geometric term area divided by this area represents the probability of This particular event So it's nothing but really very very plain geometric interpretation of the probability Now if for whatever reason You know that this is Event a now if you know that this event b actually has happened which means All the probabilities are concentrating now from the entire space Only into this sub set Then obviously if you are looking for The probability of happening of the event a All which is theoretically possible to happen Are these elementary events which are inside the intersection, right? Because everything outside of b is not happening. We definitely know this is our knowledge Before we even maybe conduct an experiment or we conducted some other experiment that this event b is Happening always which means that the probability of all the points outside of this b is zero There is no measure allocated And all the measure is allocated to this particular Sub set b then obviously you have to divide only the intersection by The area of the entire b Intersection divided by the area of b to know what's the probability of occurrence of of event a Under condition that basically only events from the b Actually can happen, right? So That's why i'm saying that this is a formula which you should not really remember as a formula You should remember it as a picture that would be the great That would be really the great way to to understand it better It's always the ratio of the areas in this case It's area of intersection divided by the whole area because otherwise You cannot have any other event outside of b happening So it's only the intersection between a and b which actually Constitutes events a under condition that b is happening, right? So that's my deviation And that's how I if you wish derive the formula for conditional probability But now let's talk about this way if my conditional probability Of a under condition b equals to this The intersection of a and b the probability divided by probability of b then I can equally say That probability of b under condition a is a b and a divided by p of a Right, it's exactly the same formula just a and b changed places now obviously a Intersections b and b intersections a is exactly the same thing because the set theory operation of intersection is commutative, right? so a Intersect b is equal to b intersect a so these probabilities are the same Which means what I can do is I can resolve it for this And substitute it into this so the probability of a intersections b is probability of b times the conditional probability so I have So I have this formula Equals So instead of this I will use this expressed as p b times p a of b divided by p a So it's basically one liner Derivation right and this is the bias formula. It combines two different conditional probabilities b under condition a and a under condition b Why is it so important? Well to demonstrate how important it is I will just go into out a concrete problem and In that problem, I will try to demonstrate the importance of this Okay, so let me Go to concrete example Now for this concrete example I do need One very small Formula Which which is not really a theorem. It's just basically kind of an introduction into this problem Which I'm going to do. Let's say again geometrically. This is your Omega this is your Sample space so all the elementary events are here Let's call it e1 e2 em And let's consider that they are of the same chances to occur So every elementary probability is exactly the same and equals to 1 over n If it's not that It's exactly the same kind of logic. It's just simpler to assume it this way. Now. Let's consider that this entire Sample space is subdivided into two different events x and y So let's say x has elementary events Up to k and y Has elementary events from k plus 1 To n Doesn't matter The most important they are Not intersecting They do not have anything in common. They divide basically into some Unequal generally speaking parts, right? That divide the whole the whole set of elementary events into two into two parts And I also would like to say that their union Is equal to entire space Entire sample space Now under these conditions sometimes I will use Different notation instead of intersection I will use the multiplication sign and instead of union. I will use The plus sign now Why is it justifiable? well, um Basically, it's just easier to to to write the books in this particular case and the text But in general you will see that the probabilities are obviously Supposed to be added. You see the probability of x plus probability of y It's the area of this and the area of this it's supposed to be the probability of the entire space, right? Which is omega so the union x as a Edition Now the intersection is not really acting as as multiplications. So don't don't Um, don't assume that but the addition is probably the most important, right? All right, so let's assume that my Entire uh sample space is subdivided into these two mutually exclusive mutually exclusive events For instance Well, I flip the coin and there is either Cat cats or or tails, right? There are no others. So these are two Events or if you roll the dice it can be either Odd or even, right? These are mutually exclusive events or it can be less than two Or greater or equal than two on the dice. I mean, there are many different ways how any space Any sample space can be subdivided into two events. Now now let's consider you have some event a Which also encompasses certain elementary events some of them belong to x some of them belong to y, right? now obviously It's obvious from the set theory um I can always represent my a as a union of two different subset a Intersections with x. It's this one And a intersection with y. It's this one and obviously their union or I like to really put plus sign here because this is a union of non intersecting Non-intersecting parts. This is not intersecting with that Right. So similarly the probability of a Is equal to probability of a and x plus probability of a and y Right Now let's remember our conditional probability formula. Let's do it again That's the one which we just talked about right Okay So what does it mean in this particular case? Well, if b is actually x I can replace it with So this probability of their intersection is probability of b which is x in this case Times probability of A under condition Uh, b is x actually. So let's just use x Plus in this case instead of b. That's y. So that's probability of y Times probability of a under conditioned y And this is two p of a So you see if my Initial um sample space is subdivided into x and y I can always represent the probability of some event as a sum of probabilities Which are calculated using this thing. So Look at it this way. Well event a Can happen Under some circumstances, right? So sometimes it happens if x is happening, right? And that's these things And then obviously the probability of this piece which is intersection of a and x Is the probability of happening of the x. That's what That's what conditional probability is times The uh conditional probability of A under condition x same thing this this piece That's basically represents the probability of a under condition of y, right? So the area is equal to probability of y times Uh, probable conditional probability of a under condition of y Why is it important To to to do this type of manipulation? Because sometimes we don't know the probability of a but we do know conditional probability of a Under certain conditions and this is exactly the example which I would like to present to you Let's consider I am in a business of selling the tennis balls, okay um, I have two suppliers One supplier Oh, by the way, this is called a formula of total probability, right? So one supplier supplier x manufactures white and green tennis balls, right? So it manufactures White And green and let's say it's 50 50 That's how it's produced Now the supplier y Manufactures also two kinds of uh tennis balls two different colors yellow 90 of the production goes to yellow And green 10 Now I'm buying from both suppliers. I'm supply. I'm buying 40 of this guy And 60 of my entire stock from this guy now Here comes a customer And he wants a green ball Now what I do with all the balls which I am receiving from those guys. Well, I just put them in one very big box And there are whites yellow Green another white another green. So all the balls are together in one big box from all these guys Now, what do I know about the contents of this box? Well, I know that 40 of this box comes from supplier x And out of these 40 percent 50 percent are white and 50 percent are green Now 60 percent of the entire box belongs to the second supplier and out of these 60 percent I know that 90 percent is yellow and 10 percent green Now if I just randomly pick the bar the the ball From from this particular box. What's the probability of this ball to be? the green one This is a perfect example Of this formula Look at this formula. What do I know? I know this The probability of getting the ball Manufactured by supplier x is actually 40 0.4 I also know that If This is a tennis ball produced by the manufacturer x Then the probability of the event a that this ball is green is equal to 50 percent I also know the probability of getting the ball from um The second supplier That's 60 percent i'm getting from it, right? So this is 0.6 And finally, I do know That the probability of getting a green tennis ball Manufactured by the supplier y is equal to 10 percent 0.1 And that would give me the total probability of Getting the green ball, which is what 20 26 0.26 So If I just randomly pick up the ball the probability of this tennis ball to be green is 0.26 or 26 percent That's where this total probability actually is applied so notice that This is a pure conditional probability problem. I have not yet Used the bias theorem in the beginning of this lecture when i'm basically reversing the usage A under condition b And b under condition of a and they are expressed one over another For this particular problem. I didn't use it. But now let's consider that this problem is solved But what i'm interested in the real In the real case i'm interested in the following My customer Wants actually a a tennis ball, which is manufactured by well, let's say the first manufacturer Now if i'm picking up the white ball, then obviously this is manufactured by the first Supplier because white ball is only from this guy if I Pick the yellow It's obviously from the second supplier white, right? But what if I pick the green one? And this is my next problem and that's where i'm going to use the bias theorem so What is the probability that this tennis ball is manufactured by the first Supplier if I picked the green one Because again the probability of this if I picked white Is one right because there are no more suppliers which are manufacturing the white So if I pick the white ball, I know with the probability of 100 that that's manufactured by x if I pick the yellow The probability of this yellow to be manufactured by the first is equal to zero right because all 100 goes to What but if it's green it needs some calculations so What exactly are the calculations? So that's my next problem, okay Let's just reverse all these calculations. I know What basically I'm supposed to get is the probability of x under condition a right the probability that my Tennis ball is manufactured by x if it's green Okay That's what I need to know now Now let's recall the bias theorem Well, obviously I don't remember the formula, but I do remember that p of a over x is equal to p of a and and x over p of x right and p of x over a Is equal to p of again a and x divided by p of a so this one is equal to p a and x which is p x times p of a over x divided by p of a Okay So as you see, I just decided to derive the formula on the fly Rather than remember. Okay. I know that now Is that sufficient? Oh, well, let's think about it p of x. I do know that's 0.4 40 percent is manufactured by the first guy conditional probability of getting green from x is 50 percent right so it's 0.5 And p of a that's a total probability which includes both manufacturers this and this and I have just calculated it That's this formula and there is a result which is 0.26 So the whole thing is equal to what 0.20 divided by 0.26 And I think I calculated it somewhere Right at 0.77 So if I fooled the green tennis ball from the box Randomly and it appears to be green Then the probability of this particular tennis ball to be manufactured by my x supplier is 0.77 which is 77 percent And obviously the corresponding probability of this particular guy to be manufactured by the y supplier Should be the opposite, right? Let's do it the probability of y under condition of me picking the green ball is equal to p of y times p of a under condition y divided by p of a Which is equal to the probability of getting y it's 60 percent which is 0.6 conditional probability of the green tennis ball If it's manufactured by y is 10 percent 0.1 And this is still the same 0.26. This is the total probability of getting the green ball And that's equal to 0.06 divided by 0.26 Which is approximately 0.23 which is 23 percent. So under all these conditions all these numbers if I pick the green ball my probability of Having this tennis ball manufactured by the first guy is equal to 77 percent and by the second supplier 23 percent If I have picked any other tennis ball then everything is obviously If it's white then it's 100 percent to this guy and if it's yellow it's 0 percent for this guy So i'm talking about only the probability for the first one. All right That's it. I suggest you maybe to read again these All these calculations and formulas are in the notes for this lecture And again, it's always good to register on the website on unizor.com. It's completely free And that would enable you just just to go through a complete course With Enrollment and taking exams, etc. So that's what I definitely recommend you to do All right. Thank you very much and good luck