 Welcome back to learning analytics tools course. This week we will continue on predictive analytics. So, we will discuss Naive-based classifier and a decision tree classification algorithm in this week. So, Naive-based classifier is a probabilistic classifier, the output will be probability of getting pass is some probability of a point 7 or 0.8 or 0.2 or 0.3 and it is very widely used in test categorization. So, it is one of the supervised algorithm because we have to give the label also not only the X we also have to give the Y. So, we know what to be done like a classification whether you have to predict pass or fail or you have to predict whether the student will continue in the course or not something like that. So, it is based on Bayes theorem that is why it is called Naive-based. So, what is Naive? There is a Naive assumption here that is very important in the Bayes theorem. Bayes theorem is very simple, you might have used it in the probability classes, but this Naive-based classifier assumes a Naive assumption that is the features occurring in this are independent that is the main assumption. Suppose if you try to model the students performance based on their attendance, assignment, submission or some engagement in the class, there is something you have to assume that these occurrences are independent although it is not possible, the student has to be attending the class to improve the engagement, but the Naive-based makes this assumption that is a Naive assumption. So, you can think of other features like in MOOC, a student logging in, student interacting with the forum, student watching video, these are independent because not every student is going to interact with forum or something like that. So, this assumption is the Naive assumptions in the Naive-based theorem. So, let us start with the activity before we jump into what is Naive-based theorem. Let us see what is conditional probability, you just to brush up your memory. So, there are two independent events, sorry there are two dependent events A and B. If two events are dependent given this kind of diagram, what is the probability of A given B? That is what the probability of A occurring given B already occurred. Can you write down the formula for conditional probability, you know this Venn diagram, intersection, joint all those things. Can you use that just to write the conditional probability of these two events, two dependent events. So, Bayes theorem starts with this conditional theory that is probability of A given B is probability of A and B occurring together given probability of B occurred like a probability of complete B and the joint probability of A and B that is the Bayes theorem. For example, if I want to know probability of student will fail the exam if attention is low. So, that means probability of failure and attention low as to occur the student who are have a low attention also failed in exam, there are a lot of other might have failed plus given that the probability of B attention occur, there is a probability of attention. So, let us see this in a detailed conditional probability. Let us look at the example, this is a standard probability sum there is a box which contains four apples and three oranges. Out of these two apples are defective and one orange is defective. What is the probability if you pick a defective fruit that fruit will be an apple. To identify it you can apply a conditional probability also is very simple, you know it is very simple to answer directly. Let us see what is the probability of apple and it is being defective and proud of defective fruits. So, let us see since it is complete divided by all this fruits involved I am just going to complete ignore everything I am just going to simply apply apple and defective is two and the total defective fruit is three. There are three fruits available defective if you pick two one it will be one among three and how many of them can be apple is two out of three. So, it is very simple probability two by three because you do not even think of much there are three fruits three are defective you know that is out of three how many will be apple like a two out of three that is 66 percentage of chances that fruit will be apple or 0.66 probability. Let us look at the base theorem from the conditional probability. Probability of a given b is probability of a and b that is equation one that you can write it that you saw that in the previous slide simple and probability of b by a that is probability of a and b same right because b by a but probability of a. If I want to replace this term with the other term suppose consider this probability of b by a this term can give probability of b by a into probability of a this is equal to this right I mean like this particular term can be kept and these two can be removed. This can be this like probability of a and b sorry probability of a and b right this is exactly. So, you can replace this particular statement by this value. So, that is probability of a by b equal to this p this p of a and b can be replaced by this particular term probability of b by a into probability of a divided by this p out of b that is very simple right. So, just how to equation you just have to apply that that is called the base theorem that is it this is the simple base this is a base theorem and you have a naive assumption on it that we can use as a naive base classifier that is exactly this equation is going to explain yes probability of a by b or in a base theorem it is exactly the same value. So, base theorem is very simple it is just a two conditional probability it is like a probability of what is the probability of that a will occur given b already I could argue some value some value of b is probability of b by a into probability of a divided by probability of complete b like not just a particular probability of event occurring all the possibility of event occurring if it has 3, 4 values all the values to be occurring together. That is a base theorem a simple base theorem can be derived from the conditional probability you might have already known that but for people you do not know just this is brushing up what is base theorem. So, now even this particular question also can be solved without using base theorem but I want to apply a base theorem this consider a couple has two children they are twins one of which is boy what is the probability that they have two boys they have two children boys or girls anything possible. So, boys boys boys girls girls boys girls boys girls something like that consider one of which is boys the first child is boy what is the probability that they have two boys second child also boy something like that. So, please write down the answer after writing it down I assume to continue. So, how do you do that if I want to do a solid by a base theorem first I need to understand what is the question. So, question is probability of both children of boys we want to predict this right what is the probability they have two boys and given one of them is boy right one of the child is boy. So, we have to predict probability of A given B what is the probability of both children or boys given there is a one children might be one children is boy. So, that is probability of A given B you can simply apply in the base theorem and the B word of A by probability of A into B by A into. So, how this numbers came this numbers are very simple right. So, probability of both children or boys there is only two possible right. So, child one child two first possibility is both are boys second possible outcome the outcome space right outcome space is one is boy first child is boy second child is girl third is first child is girl second child is boy fourth is both child are girls. So, the outcome the even space is only this four events possible you know and I said that there are the first one and second child and twins all these things I gave. So, given there are four possible outcomes in that being both are boys is one that is why it is one by four this is actually this being both are boys it is one by four. Probability of being one of the child being boy like here at least one child is boy this one child is boy and he also one child is boy at least one child is boy out of four the three times this one child can be boy it is simple right. So, that is the answer here. So, one two three three three chance that one at least one of them will be boy. So, now we have to compute this. So, probability of A is you know probability A is one by four true and the tricky part you know the tricky part is this one probability of B given A what is B? B is probability of one of them being boy given probability of both are children or boys. This is tricky part you might have missed if you do answer correctly that is correct if you do miss this is an exact tricky point you have missed. The point is probability of B by A means one child is equal to boy given both are boys you know both are boys means definitely one child will be boy right. So, the probability is one simple as I said that is a one actually if you substitute that the answer will be this as I mentioned this you do not need to use the Bayes theorem to solve this problem but I took the simple problems to explain the theorems here because that you can understand step by step. So, you can solve without applying the Bayes theorem that is fine but this is how you can apply Bayes theorem on this kind of problems. Please go ahead and solve more problems related to this probability Bayes problems in the internet and understand how it works that helps a lot to understand Bayes theorem. Bayes theorem is just this Bayes theorem only. So, we saw what is Bayes theorem not the Bayes classifier in this slide but it is a Bayes theorem how it is constructed from the conditional probability and I request you to go to solve much more probability problems using Bayes theorem. Thank you.