 Hi, I'm Zor. Welcome to Unisor Education. This lecture is a continuation of the course of advanced mathematics for teenagers presented on Unisor.com. I recommend you to listen to this lecture from this website, because the website contains notes for the lecture, which is basically a written presentation of exactly the same material, sometimes slightly different. Well, it also contains exams for registered students, which means you can organize an entire educational process around this website. Alright, so we are talking about conditional probabilities, and we are going to solve a few problems related to conditional probabilities. Okay, we have three problems. Problem number one. You have three white and two black socks in a box. Well, you just have to pull up two socks and hope that this is a pair of two white socks. That's what you need, and we would like to evaluate the probabilities of this. Alright, so first you pull one sock and then you pull another sock. My problem is what is the probability of pulling the second white sock if the first one, which you have already pulled, is white. So this sounds like a conditional probability. Probability of the second to be white on the condition of the first sock was white. Well, we can approach this in two different ways. One is a relatively simple way. We basically conduct two different experiments. Experiment number one, we are pulling the first sock, and we know that this happens to be the white sock. Now, this experiment has finished. We know the result of this experiment. So what's left? Well, we are facing the situation when we have to pull the second sock from a set of only four. One white sock is already gone, so we have two white and two black socks in a box. And we are randomly pulling one, and the chances are obviously two out of four, which is one half. So that's a simple approach, which does not really involve the conditional probabilities per se. Now, I wanted to use this problem as an illustration to conditional probabilities. So the question is how? Well, the problem with the first solution, and which is correct solution, but the problem for my purpose, for educational purposes, is that I do not have a one single experiment, which has certain elementary events combined into event A and other elementary events combined into an event B. And I am really interested in conditional probability, let's say, of B under a condition of A. I don't have this. I don't have a unique sample space from which these two events are picked. We have basically two different sample spaces. One sample space is three plus two, three white and two black socks, and I know the result of this experiment. And then a completely different experiment is whatever is left after the first one. So I would like to make it slightly differently. I would like to approach this differently. How? Okay, here is basically how? I have to consider, instead of having these two experiments with two different sample spaces, I am considering one experiment with this as a sample space, and the experiment is pulling a pair of socks, ordered pair of socks. So I know what's the sock number one and what's the sock number two. Now, so what do we have right now? Event A, the first sock is white. Event B, the second sock is white. In the ordered pair, the first one in the ordered pair and the second one in the ordered pair. So now it looks like we have a one unified sample space from which, which contains five different socks, which I'm using to randomly pick an ordered pair of socks. So first question, how many elementary events do I have? How many ordered pair of socks I can pull from this box? Well, I have five socks, so I have to pick number one, and I have five choices, right? And then I have to pick number two, which is four choices. All together I have 20 different elementary events. That's basically how the partial permutation actually from five by two is derived, the formula. So I have 20 different ordered pairs. One, two, one, three, one, four, one, five. Then two, one, two, three, two, four, etc. So this is my sample space. 20 different ordered pairs. Now, from all these ordered pairs of socks, I have certain number where the first sock is white. How many of them are? Well, I have three different white socks, so I have three different candidates for number one. Now, with each of them, I can have anything as a number two. So I can have white sock number one and four different other socks as a candidate for number two. And that means I have four different ordered pairs. Then I can have a second white sock as number one. And again, four other socks, whatever I have as a number two candidate, another four. And I can have the third white sock with the same. So I have 12 different combinations, 12 different ordered pairs of socks when the first one is white. So that's my event number, that's my event A. And the probability of this event A is 12-20s. Altogether, I have 20 different elementary events, and 12 events satisfy this condition. Now, I don't really need the probability of the event B, but what I do need is, and that's the condition which I really need, a conditional probability of the event B that the second sock is white, under condition that the A is happening, that A has occurred, that the first one is white. That's what I'm interested in, and that's where my conditional probability actually starts to play. Now, as we know, this probability is equal to probability of the simultaneous occurrence of both, divided by the probability of the condition. Remember why? Well, again, if this is my A, this is my B. Now, A I consider as occurred, which means all the probabilities are concentrated only in elementary events which constitute A. Now, what's the relative part of the B relative to A? It's these, divided by these, because these are all outside of A, and which means their probability is zero. So all the probability measures are concentrated among these, within the boundaries of the A. So, if I would like to know what's the measure of event B relative to event A, then I have to take the intersection of them and divide by the measure of the condition itself. And now, probability of A I know, that's this one. So, I need the probability of A intersection B, which means the first and the second socks in the pair are white. So, what's the number of the pairs, ordered pairs, which contain only white socks? Well, if I have three socks, I have basically three versions, three different choices for number one, and with each of them, I have two remaining choices for number two. So, it's six different ordered pairs, and we can actually enumerate them. It's the first one and the second pair, the first and the third, the second and the first, the second and the third. Then, the third white and the first white, and the third white and the second white. Six different pairs, and again, I'm talking about ordered pairs, sock number one, sock number two. Which means that the probability of A intersection B is equal to six quantities, and divided by probability of A, which is 12 quantities, that gives me one-half. Six quantities divided by 12 quantities, that's one-half. And obviously, we have exactly the same solution as in the first solution, which I have offered without the conditional probabilities. So, again, this is more of an illustration of how conditional probabilities can play in this case. And yes, this problem can be solved without, but that's not the point. The point is I would like to actually illustrate the usage of the conditional probabilities, which means I have to organize my events, my sample space and events inside, so they all belong to the same sample space, the same experiment. That's why I switched from two individual experiments as in the first solution without the conditional probabilities to the second solution where I have an experiment which results in an ordered pair of socks picked from the five. Okay, that's it. That's my problem number one. Problem number two. Okay, let's consider the recertained computer game, and the children like to play this game, and this game has two levels. You know, usually all these games have certain levels. So, you start with, let's say, level one, and then there is a level two, which is more advanced. So, statistics are that 50% of the kids complete level one in one day. However, only 10% complete levels one and two in one day. Obviously, it's more difficult, right, to complete two levels in one day. So, we have 50% of the children completing one level and 10% of the children completing both levels in one day. Question is, what is the probability to complete the second level for those guys who managed to complete the first in one day? So, let's say they spent half a day and they completed level one. So, what's the probability that during the remaining part of the day they will be able to complete level two? Alright, so, let's just consider these two events separately. So, event A is completing the level one in one day. Event B completing the level two in one day. What we are interested in is a probability of completing the level two under condition that we have completed the level one. And again, that's equal to their simultaneous completion divided by probability of the condition A, which is equal to... Now, what's the probability of simultaneously occurring these two events? Well, obviously, that's this one. So, I know that only 10% of the children complete both levels and that's what it is. So, it's 0.1. Now, what's the probability of completing level one? Well, again, we know the statistics. That's 0.5. So, the probability is equal to one-fifth, 0.2. So, it's 20% of the children who have completed the level one in one day would manage to complete the second level in the same day. Well, again, that's not obviously like every time it's happening. This is not an exact number. It's a probability of happening of this particular event. So, let's just think that, on average, if the number of children would tend to infinity, then about 20% of them would be completing the level two out of those who have completed the level one. All right. That's my problem number two. The third problem is about the formula of total probabilities, which is presented on the Unisor.com as a theoretical lecture. That's in relation to bias theorem. All right. So, total probability problem. Here we are in the following situation. We have a certain place, a village or whatever. There are different people in this village. 20% of them consider themselves Jewish. 30% consider themselves Muslim. And all other 50% consider themselves to be atheists. That's how they consider themselves. Now, different religions have different restrictions on food, like Kala'al food for Muslims, kosher for Jewish. So, let's consider one specific food, X, whatever it is. And it's considered to be as prohibited, not by all Jewish, because, again, people who adhere to certain religion are not necessarily very strict in this particular religion. Some people are more strict, some people are less strict. So, what I would like to say is that only 90% of Jewish people consider X as no X, as a prohibited food. Out of Muslim, 80% consider that X is prohibited. And out of atheists, nobody considers it prohibited, everybody can eat whatever they want to. Okay, so that's the condition. Now, let's consider you want to invite a random person from the street for dinner. Well, question is to prepare or not to prepare the food X. So, you would like to evaluate your chances that the person who you would invite might actually consider this food as prohibited and would not like to eat it. So, that's your task. You have to evaluate the probability of the fact that one randomly picked person from the street would consider the food as prohibited. Okay, let's just think about it. Now, you picked the person from the street. So, event J is that he is Jewish. Event M is he is Muslim. And event A means he is an atheist. Now, these events have their own probabilities, right? The probability of event J is equal to 0.2. Probability of event M is 0.3. And probability of event A is 0.5. That's given, right? Now, what else is given? Let's consider event B no food X. So, the person considers food X to be prohibited. That's event F. What do I know about F? Well, I don't know the probability of F. That's exactly what I would like to find out that the randomly picked person considers the food prohibited and would not eat it. But I don't know anything about this. What do I know? Well, I know these. What does it mean? It means that probability that the food is prohibited if the person is Jewish is equal to 0.9. Probability of food F to be prohibited if the person is Muslim is 0.8. And finally, probability of food F to be prohibited if the guy is an atheist is 0. That's what I know. So, I know the conditional probabilities. So, this is basically what is given. This is just the beginning. There is nothing which is related to solution. I have just written everything which I know in a more or less mathematical way. Okay, now we have to come up with the solution. And here is the solution which I can offer you. Okay. Events J, M and A. So, the religious affiliation actually are mutually exclusive and together they completely encompass an entire population. Because that's what I said in the very beginning. There are only three categories, non-intersecting, which means that an entire sample space is actually a combination of these events. And they are mutually exclusive. That's why I was using plus instead of union. Therefore, any event F can be actually represented as a sum of its intersection with these three events. Right? Now, it's obviously Y. This is my omega and it's divided into three different parts. J, M and A. And these are, this is my F. This is all the people who do not eat the food X. Now, obviously, this event F can be a sum of this plus sum of that plus sum of this. Right? So, if my entire sample space is divided into three pieces, then any event can be represented as a sum of three independent mutually exclusive events. One being an intersection of my event F with J. This one is an intersection with M and this one is intersection with A. So, that's obvious. And again, these are non-intersecting. That's why I was using pluses in between. And that's why the probability of my F is equal to a sum of these three probabilities. They are not intercepting, so I can sum the probabilities. Okay? Now, knowing that and knowing the formula of conditional probability, let me use something like U and V. V is equal to U and V divided by probability of V. That's the formula of the conditional probability. Right? So, I can always use, I can always resolve this for the union and express my intersection, sorry. So, I can always express my probability of my intersection as probability of V times conditional probability of U under conditional fluid. Right? So, this is exactly the same thing. I'm assuming no probabilities are equal to zero in this particular case. So, that's always true. Alright. So, I'm going to use this formula to calculate these three separate components because I know the conditions, which is the right part of it, the condition V here. And I know the conditional probabilities. So, my probability of F is equal to, for this one, it's probability of J times probability of F under condition of J, plus probability of M and probability of F under condition of M. And the third one is probability of being an atheist times probability of prohibition of food F under condition of atheism. And now I know all the components here. So, this is 0.2 times, what was it? 90%, right? 0.9 plus probability of Muslim 0.3 probability that the guy is not eating the food is 80%. And the probability of atheism A and the probability of the prohibition of food for this particular guy is 0. So, the result is 18 and 24, 0.42. So, the probability is 0.42 or 42% of the fact that the randomly picked person from the street would consider the food acts as prohibited and would not eat it. So, I think it's a relatively high probability, 42%. So, if you would like to prepare the dinner for a randomly chosen person, I think it's better not to prepare the food acts because 42% of those who are in the population might actually be considering this food as prohibited. Well, that's it. These are three problems I wanted to present for conditional probabilities and in the last case it's also the total probability concept. I suggest you to go to theunisor.com and read again the conditions and whatever else with these problems. Try to solve these problems yourself, again, based on whatever you know, just to inculcate in your mind the methodology of this. And obviously, if you are a registered student, then you can go through exams and stuff like this. So, that's it. Thank you very much and good luck.