 Last time we were talking about a interplay between probability statistics and data science. We said that real world is going to have some underlying model, probability model which we are going to capture. So that is where we try to come up with some probability models and then from the real world we observe some data and we analyze the data and do some statistical analysis on that to get the parameters which will further go and help us improve our probability models. So that was just the interplay but now let us get back to our study of the probability. So I want to really go through quickly because some of this as I said is also covering and now I will not get into any examples, I will just go through this notions. Because of you have any issues, just raise your hand, we will discuss that. I should go beyond her, right? Then I will be just ending repeating the same thing, right? Sir, if you do not move many, for example, like 2, 3, 4, 5, 6, 10, okay, let us see. So maybe I will go now, start, maybe after 10, 15 minutes I will ask you the pace and you can tell me, okay, okay, conditional probability. What is conditional probability? Like let us say you have 2 events and I want to know event happening, one particular event happening after you know that another event has already happened. For example, if you take 2 events E and F and probability of event E, given that F has occurred, we are going to write it as P E given F and this event is defined in this way. Probability E given F is ratio of 2 quantities, the numerator is probability of the intersection between E and F divided by probability of F and naturally this definition going to make sense when probability of F is greater than 0, otherwise this ratio is not defined, right? And also you do not want to condition on an event for which likelihood happening is 0, you want to condition on the things which has some positive probability of happening and based on that you want to see what is the probability of other events, okay? So this makes sense, okay? For example, if you are going to roll a dice, a fair dice and you are interested in 2 events, the first event is outcome is event, the second event is divisible by 3. Now if you want to condition, want to understand, okay, event E, F has happened, what is the probability that event E is going to happen? Now if you have been already told that, see either 3 or F has happened, now what is, which one of them is divisible by 2 and which of them is E 1, like the E 1, that event E will happen only if out of 3 and 6, 6 has happened, right? So if 3 and 6 has happened, you already have a, you know what is the likelihood happening of E now? You know that 2 and 4 are not going to happen, only possibility is 6, now your likelihood has changed about the, whether you are going to see E 1 number or not. So and now onwards, sometimes I will also use this notation instead of saying E intersection F, I may simply write it as E F, okay? That already means that, sorry, that it is going to be simply E and F, that means already E intersection F, okay? Now with this, let us, we will get to the notion of independence of 2 events, we are going to say that 2 events are independent, if occurring of one event does not provide any information about the other event, okay? For example, I have, let us say, if it so happens that probability of E given F is same as probability of E, so you see that probability of E, this is like an unconditional probability and whereas this is conditional. So the conditional probability is same as unconditional, means happening of the event F is not providing improving anything about the probability of E and similarly if this is the case here also, happening of E is not improving anything about my knowledge of F. So whenever this happens in a way like observing, this one event is not providing any information about the other, maybe that means there is some kind of independence in this and that is where the independence comes into picture and what we are going to say formally is based on our conditional probability, that is right, that is the type of here, okay? Okay, now if I go with my conditional probability P E given F, this is equals to P E F divided by P F, right? But if E and F are independent, the left hand side is simply equals to P of E. So what this is going to say is now P of F is simply P of E into P of F. So in a way like our intuition about independence is kind of implying that probability of E and F happening together is equals to the product of probability of E and F. Now that is what we are going to take as a definition of our independence. We are going to say that E and F are independent if probability of their intersection is nothing but the probability of the, sorry, is equals to product of the probability. Now naturally, if the two events does not satisfies this, we are going to say that to be dependent, okay? And one trivial thing we need to observe is whenever we are going to talk about E and F, right? Obviously, we need to assume that this E and F, they are not equals to null set. If one of them is a null set, what happens? So this quantity is going to be null set, if let us say E is a null set, E intersection F is going to be null set, probability of a null set is 0, whereas on the other side also probability of null set is also 0. So this also becomes 0, if this is if let us say E is a null set. But then is let us say if I have E null set and some event F, does null set provides any information about F event F happening or not? It may not provide, right? Like I mean null set here, that means if it is null set, the complement that means omega has happened, F is a part of omega, right? F is a part of omega. So it may provide some information. So but according to this definition, they are independent because both left hand side and right hand side is 0. So that is what when you are going to apply this definition, we will make sure that both of them are not equals to null set. If it is null set, it becomes a little bit a vacuous definition. Okay, now example, I will just look into one example, other I will skip. Let us say we have two dice and we know that in this outcome, there are 36 possibilities and now I am interested in event when the outcome is 6. Now let us say I am interested in two events, event E is like outcome is 6. So these are the possible possibilities. It has to be 6, 1, 5, 5, 1, 2, 4, 4, 2 or 6 can happen or something is wrong here, right? And the second event F is outcome, the first outcome is 4. If the first outcome is 4, I mean 4, 1, 4, 2, 4, 3 all of interest to me. Now what I want to now want to see, I want to understand whether these two events E and F are independent or not. So how to do this? First I want to go and apply my definition. I will compute probability of this intersection. So what is the probability of that intersection? The only thing that is common to E and F is 4, 2. And what is the probability of 4, 2 happening? 1 by 36, right? This is 1 out of 36 possibilities. What is probability of E? E is there are about 5 possibilities E can happen in 4 and out 5 out of 36. And what was P of F? That this is 6 out of 36 probability that is 1 by 6. Now if you look into that 1 by 36 is not equals to the product of these two. So naturally as per our definition E and F are dependent. Now can you think about how does if the outcome is 4, how we can see that whether it will tell me something about whether my outcome is going to be 6. So let us say F has happened. F and happen means my outcome, first outcome is 4. Now does this provide me some information whether my 6 can happen? There is a possibility, right? Like if 4 has happened, now that if 2 comes there is a chance that my I can have some, yeah the sum can be 6. So there is already some dependency here and that is kind of getting implied here. And similarly I will not go into this example you can see that instead of 6 I am interested in sum being 7. And if let us say first outcome forms to be 4, is there a possibility that I can get 6? So now my question is this like if my first outcome is 4 and I mean I mean interested in sum to be 7. So what happens in this case like will I get, if first I have 4 then is there chance that still I am going to get 7? So this 2 events are dependent or independent, but what they are saying, if you are going to look into this what is that probability of intersection this is 1 by 36 and P of E and P of F 1 by 6 1 by 6 that is also 1 by 36. So as per our definition what they are independent, but you are saying that is dependent why is it so? So 4 has happened and now if you 4 has happened you know that there is a chance that if 3 happens my sum can be 7, if 4 did not happen something else has happened. So 4 did not happen means it could be 1, 2, 3, 5 or 6 ok. And now does it still if 4 does not happen can you still say that what is your likelihood of happening 7? It could be same right. So event 4 happening or not it is not improving your knowledge about 7 happening. Now can you just go back and apply the same analogy and see that why this is not true here like now we are concluding that these are independent. Why because 4 happening or not there has the same information about some happening but why that is the case why? Do you all agree if 4 did not happen let us say 6 happen can the sums be 6, 6 no right it cannot be 6 something it has to be greater. So that is the kind of intuition. So often intuition may be not apparent whether looking into the two events whether they are going to be dependent or independent, but we will go with our definition. Definition is easy to verify just compute their intersection and see the probability and see that that probability is equals to the product of the each of the events ok fine. Now in collect so often you may have to deal with more than two events maybe you will have to deal with a sequence of events and want to see whether they are independent or not. Now how you are going to check that we are going to extend the definition we had for 2 for the multiple event case and what we are now going to do is if you have this finite set of events even e 2 e 3 up to all the way up to e n. Now we are going to say that they are independent if you take any subset of this n events and if you look into their joint probability that probability should be equals to the product of their individual probability. What we are saying is suppose let us say you have this 1 2 3 up to n and let us take I took some numbers 1 3 and 4 this is the one subset of this right. Now I looked into probability of e 1 intersection of e 3 intersection e 4 this should be equals to probability of e 1 into probability of e 3 and probability of e 4 this should happen. This has now happened on one set one subset of 1 2 3 4 n. But what we are asking is for any subset other subset could be let us say other subset could be 2 5 like that if you take any subset this should happen. Now if you now look into that at least when we want to talk about independence I need at least 2 sets. So when I have only 2 sets I just need to see that whether take them and see their intersection. But now when I have more than 2 there are so many subsets possible and that is what we are doing to do that. So you have to select 2 2 at a time how many possibilities n choose 2 are there you have to take 3 3 how many possibilities n choose 3 are there and at the end all of them. So this will lead to total sum of 2 to the power n and I think there is also minus 1 missing here. So all of you know what is this sum to n choose 0 plus n choose 1 plus n choose 3 like that n choose I if you start from I equals to 0 to n this is equals to 2 to the power n right. So if you just add this I am subtracting n and minus 1 because there is no n choose 0 and n choose 1 term in this ok. And now you see that this is growing like exponentially in n. So if you have more events to check for independence you have to do lot of that combinational things are just exploding. But because of this often most of the times you will be not interested in independence of the hall events but some subset some kind of weaker notion called as pair wise independence. So in this what we are going to do is we take the set of events and look into just to take 2 2 at a time I am only interested in 2 2 and see that their intersection their the probability of their intersection is nothing but the product of their probability if this happens then I am going to say they are pair wise independence. And as you see that in this case I only need to check n choose 2 conditions and it is going to be quadratic in n you can check and often it so happens that obviously it is independent it is implies that pair wise independence but pair wise independence need not in imply that the set of those events are independent.