 So, we have discussed the first the day before last lecture, two lectures back. We started with basic notions of probability description probability and then we discussed the axioms. Then the last class started with probability properties. We discussed equally likely outcomes sample space with equally likely outcomes and then you went for the basic principle of counting and how by using the method of counting we can compute probabilities. And I said that these goes very well with the notion of frequentist probability ok. That you can count the number of outcomes in repeated experiments and based on that you can find out probability or the likelihood of occurrence of any specific event. Then we discussed what is conditional probability and discussed some examples on that. We discussed the theorem of total probability which again comes from the conditional probability and something called as the multiplication rule and we discussed one or two examples on the theorem of total probability as well. So, today's lecture starts with Bayes theorem. I am sure that many of you have heard about Bayes theorem maybe not all. So, we will go through a basic description of what Bayes theorem is where it came from. So, it came from this British minister known as Thomas Bayes who was there in 18th century in England and he developed this theorem. So, he comes from a theological background that is what he studied also in university. He studied logic and theology and he also studied other things like basic Newtonian methods of mathematics such as calculus. He defended the foundation against various criticism that Newton had received at that time. The other significant work of Thomas Bayes was on the book by DeMauver which is known as The Doctrine of Chances. So, Bayes did a lot of work on the concept of chances, concept of probability. These are the initial ages of probability theory and Bayes did a lot of work on that and he published a paper which of course, got published after Bayes died and on that I think if I remember correctly the paper was called an essay on the Doctrine of Chances that means he was developing on DeMauver's work where he actually gave the idea of Bayes theorem. So, that is where Bayes theorem comes from and it deals with a little bit of conditional probability, total probability, etc. But today when we talk about Bayes theorem we do not necessarily mean only that specific theorem that Bayes had formulated some more than 200 years ago. It has much more wide application when we talk in terms of Bayesian statistics or Bayesian probability. I am not sure if you have heard of these terms Bayesian statistics and Bayesian probability is a very commonly adopted tool commonly adopted by scientists, mathematicians, engineers, technologists, everybody almost everybody also people in the medical profession. It is a very commonly used one and the applications are really, really wide ranging. There is a whole group of people known as Bayesians who work in this field. It has primarily to do with something known as Bayesian inference. You have heard of a statistical inference. So definitely the Bayesian inference is a subset of the statistical inference but it has its typical way of looking at things. So when you talk about Bayesian and you can check this website Bayesian.org where you can see what are the kind of ways the Bayesian system of statistics and probability had developed into from the very basic Bayes theorem that was given in 1760s, 1762 or 4. So this is the Bayes theorem. We go there from the total probability theorem. This is just a recap of the total probability theorem. How is it expressed? We said that if we have these events e1, e2 to en which are mutually exclusive and collectively exhaustive in a sample space s then for any event a in the same sample space you can express the probability for that event a as this. This is the theorem of total probability. Bayes, excuse me, Bayes looked at this conditional probability from the reverse direction. So we will, as we see the Bayes theorem we will know better why we call it in an inverse probability theorem. So this is Bayes theorem. So now we are looking in the reverse direction. Earlier we are finding out what is the probability of a given an event ei. Now we are looking at what is the probability of an event ei given the occurrence of a. And Bayes said that this is the theorem, basic theorem. P probability of ei given a is, how do you express that? Of course it comes from the conditional probability theorem. So the numerator is nothing but the intersection of a and ei and the denominator is probability of a. Is that okay? Just an extension from the conditional probability theorem. But we are looking in the reverse direction, okay. So you may ask I mean what is the importance of Bayes theorem? It is same as the conditional probability theorem. If you look at the application then you will see why it is important sometimes to have a different perspective of the same theorem and look it from a different rather for this case exactly opposite direction. We can also extend that Bayes theorem using the total probability theorem. Now we are changing the denominator. We are expressing it as the summation of all those multiplications. You remember the multiplication rule where we said that the intersection is nothing but this a given ei times probability of ei. So we sum up all of those and that is how the denominator we express now. So this is also the same Bayes theorem just a little different expression. Now we come to an example and these examples I hope that we will explain things clearly to you how useful it is to look at a different perspective. At the same thing look from a different perspective. So we take the same example that we discussed for total probability of the example of a flood in an upstream river and the overflow in a dam downstream overflow where the river water get stored. So again we denote the event of overflow of the dam as o and we know that that event is conditional on the situation in the upstream river if the river is flooded or not. And we consider the same known probabilities let us say the statistics that we have is the same. So that you can see it matches with the conditional probability concepts. So the reverse water for situations can only be and again only is very important over here because only means that these are collectively exhaustive. So flooding with this probability are normal flood level with that probability and below normal or low flood level with the probability of 20 percent. This same as what you have seen earlier and we also have the same conditional probabilities that the possibility of overflow given that there is flood upstream is 90 percent, possibility of overflow given that its normal water level upstream is 50 percent and possibility of dam overflow given that its low flood level upstream is only 10 percent. So we have the same basic things now we are looking at a different probability which is if given that the dam is overflowing this might be an observation that you make you see that ok here is a dam is overflowing and now we want to know what is the condition in the upstream river what is the chance that the upstream river has flooded given that its overflowing downstream at the dam or we could find in the same way what is the chance that it has a normal flood level in the upstream river given that it has not overflow or it has overflow in the dam downstream ok. So the probability that we are trying to find out over here is probability F given and O probability of flooding in the upstream river given its overflowing in the dam and we just simply apply the Bayes theorem. Now you know the formula so in the numerator we have probability of O given F times probability of F and in the denominator we have the summation summation again comes from the total probability. So what is the denominator what does the denominator give you is the probability of overflowing of the dam the total probability of overflowing earlier we computed this parameter only the total likelihood of overflowing of a dam given all kinds of situations in the upstream river. Now we are saying that ok the dam has overflowing what is the possible situation in the upstream river. So you find out this probability given the dam has overflowing and we can compute it very easily based on the known conditional probabilities and original probabilities by conditional I mean this and original I mean this. We go to the second example and these type of examples from medical tests are usually the most commonly cited examples to explain Bayes theorem. So in medical case test test the concept of false positives or false negatives are very common. If you are not aware of it this is what it means a false positive means that a person actually does not have a disease, but the medical test says that he or she has the same disease ok. So let us say you go and get a test for having cancer ok the real situation is that you do not have cancer, but the specific test for checking if you have cancer or not says that you do have cancer ok. So that is a case of false positive and see we are coming to Bayesian inference. Based on this test a doctor has to decide if a patient really have a disease or not ok. So that kind of inference comes from using the Bayes theorem and we will see how. So let us say these are the different probabilities these are the different events ok. So the person actually having the disease we denoted with D. So automatically the person not having the disease same person not having the disease will automatically be denoted with the complementary event DC right. And the outcome of the medical test if it says yes the person has the disease is denoted by Y and if the test says no it is denoted by N. So these are the four different events four different outcomes of the same sample set. Well usually not, but you can construct a sample set having all this you can define your own sample set depending on the type of experiment that you want. Let us look at the conditional probabilities let us assume that what is the likelihood that the test gives you correct results. So the medical test says yes given the patient actually having the disease is 99 percent, but sometimes the test go wrong that means even when the patient does not have the disease that means the event DC even with that sometimes the test says yes it gives you wrong result and the probability of that is 5 percent. Now if we from this if we infer that only 5 percent of positive results are false that would be wrong, but notionally if you look at the those two bullets and the second one specifically P, S given no disease is 5 percent. So we tend to say that well the positive results are wrong in 5 percent of cases, but if we do a proper calculation based on Bayes theorem we will see that this is not really the case. For an example we take the case of a rare disease where only 0.2 percent of people is found to have that disease. So probability of having that disease for any person is only 0.002 and you are trying to find out what is the probability of having a false positive result. And by false positive we mean that given the test had said yes, but the patient does not have that disease. So probability of DC no disease given y. So we apply Bayes theorem. So probability of DC given y can be calculated as probability of y given DC times probability of DC and we have these values these individual values we have with us. We have this, we have this. In the denominator we have the total probability of having a yes result from the test which is probability of y given DC times probability of DC plus probability of y given D that means the person has the disease times probability of D. So I put these values and the result is 96.2 percent. So very different from the 5 percent that notionally we would think. So I will get back again and repeat this. This is what you see that the conditional probability of y given DC is only 5 percent, but if you actually compute what is the case where you have a false positive result it is not only 5 percent, but 96.2 percent over here based on Bayes theorem. So you can see for a rare disease you can have a lot of false positive results. The more rare the event is it is more likely that the test would wrongly say yes. Does it seem reasonable to you now? If I say it that way I will repeat again. The more rare a disease is it will be more likely to have a false positive that means the test would wrongly say yes even if the patient does not have that disease. And what we do? We change the probability of that disease. Let us say the disease was very common 25 percent of people generally have that disease. If you do the same computation now we are changing P D by 0.25 and not changing anything else by anything else I mean yes. So P y given D and y given DC remains same. You still might say on the basic notion that 5 percent of the positive results are false. Instead of having P D equal to 0.002 now we say that P D is 25 percent. If you do the same counting then the probability of having false positive goes down to 13.2 percent. A huge change from more than 96 to 13.2 percent still more than 5 percent it is not 5 percent. So what we see over here is that the number of false positives really depend on what is the likelihood of a person having the disease that P D or P DC that changes the whole calculation. So this is basically this gives you an essence of what Bayes theorem looks like and what its applications are. Also Bayes theorem is applied a lot for similar example such as updating a model. What is a model? A model is what describes a system. A system always have some uncertainties as we have discussed earlier. So the systems will have conditional probabilities. We can apply total probability theorem etcetera. So every system we try to explain that system and the function of that system with some kind of a model. Using Bayes theorem we can do model updating based on new evidences ok. Later on if I find time I will discuss some examples of Bayesian model updating based on new informations. Or if you do a quick search on these things on internet you will find examples such as another very common example for explaining Bayesian theorem and Bayesian model updating is that. Let us say a trial going on in a court room and the juries give some verdict ok. So many percentage says ok that person is the criminal has committed the crime. The other say that no she or he has not committed the crime. And then you have some additional information based on let us say some test DNA test or some other evidence ok coming in. So now you can add that information to the basic model which was the information only coming from the juries. And you will have a new system using which you can estimate I will not use the word predict. You can estimates likelihood of different events for this case if a person is criminal or not or has committed the crime or not. You can estimate those events or likelihood of those events in a more rational sense in a better sense because you are updating the model based on the new evidences available. So that is all Bayesian studies is for you now. We move on to something else. We move on to the concept of random variables which is very essential for this course. And random variables are very essential for describing anything regarding probability. You might have heard of this random variables, probability distributions, some distributions we are going to go through in this course you must be already familiar with. We will see how these things are. We first go through a definition and again our random variable really does not need a definition it is better to have a sense of what random variable is ok. But as customer I give a definition here. So a random variable is defined to be something that maps sample events into intervals in the axis of real numbers ok. You are familiar with the concept of mapping are you? Mapping let us raise hands how many of you have used or heard the term mapping ok. So mapping is kind of a translation ok or even transformation. You have one set of items over here, you have another set of items over here. You have mapping system which translates or transforms items from this set to that set. That is what mapping is. Let us take the example of what we call one to one mapping. Let us say on one set you have five items named A, B, C, D, E. Let me go to the, let me try to use a diagram to explain this. So this is set one, this is set two. From set one to set two we can have a one to one mapping. So that means each item in set one will have a corresponding item in the other set. So these arrows represent what we call mapping ok. It is a part of transformation geometry are you familiar with transformation geometry? Again raise your hands yes ok. So mapping gives kind of a one to one correspondence not in the both directions but usually in one direction. Let us get back. So basically what we are trying over here is to say that a random variable is a translator and interpreter of events on two numbers ok. It is a numerical interpretation of events ok. So you have this axis of real numbers. So events or outcomes in an event can be represented as numbers by the random variable ok. So here we have the event. These are corresponding representations by the random variable ok. So these are numbers here. This is what the random variable is doing is translating those event outcomes in an event into numbers. To explain things through another diagram here is what we have. So S is nothing but the sample space. In S we have two sample events E and F and the random numbers X and Y what they are doing they are representing E on the axis of real numbers and F on the axis of real numbers. So E is getting represented by this line and again F is represented by this part. So these are two intervals the random number X translates the event E into this interval and Y does the same for the event F. This is the interval of F. This is the concept clear now what random variable is ok. Again as I say it is not very important to have a specific definition for random variable. Even when we start using it we know how it is and many of you must be familiar with different random variables and different distributions as well. So there are typically two types of random variables discrete and continuous. So what I would like to know I want some examples of these random variables from you discrete random variables continuous random variables. Just raise your hand I will ask the TAs to go to you with the mic. So can I have some volunteers example of a discrete random variable. Very simple question give me an example of a discrete random variable. The height of 6 students it will be students you can say age and height we can plot that as a discrete one. Should be a discrete one. Yes sir. How explain. We cannot take 18 and half as age we take 18, 19, 20 like that. So it will be discrete. Yes sir. Why not? 18 years, 3 months. When it is 17 days, hours, minutes, seconds. When it depends how we wish to still we cannot make it continuous. Give me more. There is a limit to making it small sir. I agree but give me more understandable explanations, examples. Yeah give me one more then I will go to another person. Well the weight versus height, weight versus height. Again why what kind of what kind of numbers you can assign to weight I mean you can assign any number right. So that is more like a continuous random variable. Depending upon the result of a match it can either be a win or a draw or a loss. Yeah this is. Minus 1 can be can denote a loss 0 a draw and 1 a win. Even if you do not assign specific numbers of course random variables are supposed to numbers. We can first see that these are events where the outcomes can only take a few values. And the random variable and then we will translate these values to certain numbers. Like he said winning a match we will have some value having a draw we will have some value and losing the match we will have some other value. So these are discrete whatever continuous we already have the examples. Height of a student in this class age of a student in this class unless of course you want to group it into things like age of a student being 18 to 19 is one event age of a student being 19 to 20 another event. So then it becomes discrete. Otherwise things are continuous when you are discussing age and height. There are specific functions basic functions which we use a lot to describe a random variable which are the probability mass function cumulative distribution function and probability density function. And we will go to the definitions of each of these. So the probability mass function many a times we will just use the abbreviated term PMF is the probability that a discrete it is important to note that it is discrete random variable only. So the probability that a discrete random variable x is equal to a specific value x where small x is a real number. Note that we are denoting a random variable by the capital letter and the value it can take by the small letter. So these are very common system of notation and I would suggest you to follow the same that you will always use a random variable with a capital letter as far as possible and the numbers it can take if you want to represent that number as a variable use a small letter for that. So the PMS is represented as this one small p with subscript x and within parenthesis you have small x this is capital X. So it says that this is the probability of capital X PMF at a value x. So PMF of random variable x at value small x which is nothing but the probability that the random variable x can take a value small x that is the probability mass function. Then you go to cumulative distribution function or the CDF which is the probability that a discrete or continuous random variable x is less than or equal to small x. The common notation for CDF cumulative distribution function is capital F and again you have a similar notation in the subscript we write capital X which represents the random variable x and the value is evaluated at small x. When it is evaluated at small x it means that it is the probability that the random variable is less than equal to small x. CDFs are defined both for discrete and continuous random variables very important to note that one as well. The third one that you have is the probability density function or PDF. This is defined at the first derivative of the CDF that means the cumulative distribution function and you can easily see that since it is defined as a derivative it has to be for the continuous random variable. For the discrete you can find out the derivative. So the basic notation for a PDF small f with a subscript again capital X evaluated at x. So this is nothing but the first derivative with respect to x of course of the CDF of the same random variable. We will evaluate it at that value at that point x. So basically again you say that it is the slope of the CDF. PDF is the slope of the CDF and if you look at the other direction you can also find out the CDF cumulative distribution function by integrating the PDF over x from minus infinity to the value where you are evaluating the function. The same equation written in two different ways. Both are very useful and we will see how. I will just try to give you some examples and show you how CDFs and PDFs are related. By the way remember that the D for CDF and the D for PDF they do not represent the same thing. CDF is cumulative distribution function and PDF is probability density function. So typically you will see that when you are plotting a CDF which is fx and let us say I will just have this line. You are plotting PDF. What will be the horizontal axis? What will we have in the horizontal axis? Numbers. Because random variables the functions are evaluated where at small x that means small x is a number random variables translate the events to numbers. Coming back to this let me have a break. These are two different diagrams. So probability density functions look somewhat like this and this is x, this is also x and the cumulative distribution function which you obtain by integrating this would be what? For any given part it will go something like this. Does it make sense? The CDF will gradually increase because what is CDF? If you count up to let us say a value a CDF is the if I get back over here CDF is the integration from minus infinity to a. So this area let us call this area a at a. So similarly at a value when the CDF is evaluated at a this should be the same area. So the value of the CDF at any given value small a is nothing but the area under the PDF from minus infinity up to that value a. So it comes from the basic definition of slope and integration. Let us get back. Now we try to cite some examples. First we try with the probability mass function which is defined for discrete numbers. We take the example of number of students attending this class today. What is when we evaluate it at the value 513 that means that we are trying to find out the probability that the number of student exactly is 513 over here. So first we will check. Is it the case of a discrete random variable? Yes of course it will be only whole numbers positive whole numbers etcetera. So small p of random variable x which we see as a subscript over here evaluated at this number of 513 is nothing but the probability that x equal to 513. What do you think the probability is today? 0 definitely 0. Is it 0 most of the days? Why? Is it because you never see more than 500 students or is it because something else? So let us say if it is a fair case you know unbiased case that if the total student strength for this class is 750 what is the likelihood that one student comes or two students come? Let us say for each if they are all equally likely outcomes the likelihood of each of these events px at 1 px at 2 or px at 3 px at 750 will be equal to 1 over 750 based on the basic principle of counting. So very low probability for any number you pick 513 you pick 200 you pick 13 you pick 713 does not really matter based on the theory if these are all equally likely outcomes then the probability of x being equal to any number is very low which is 1 over 750 and with only 30 lectures or semester you would hardly see you would hardly put you know I mean any probability to any number the probabilities are so low. Of course, this is not really a case of equally likely outcomes right do you think the probability that there are 150 students today is same as there are 700 students today I do not think they are same ok. But anyway it gives you the idea of what is the probability mass function we go to CDF again site another example take the previous one x is a random variable representing the number of students are in the class today evaluated at 2010. So probability x less than equal to 2010 what do you think the value of the CDF is 1 in any of the days it is 1 yes right. So you can this way evaluate various functions like PMF and CDF. The second example is from a continuous random variable in civil engineering we use reinforced concrete as a very common material and to have reinforced concrete we use reinforced concrete in buildings bridges constructing anything the first thing that you need is concrete you are familiar with concrete right. And by changing the ratio of the constituents of concrete you can have different strength of that concrete. So before you use any concrete in a real construction you always test concrete and how do you test it? We prepare sample cubes ok these are 15 centimeter by 15 centimeter by 15 centimeter cubes of concrete we prepare several of them and it test them how do you test them? We put them in a compression testing machine and just press it hard enough and see what is the pressure that we applied when the cube crushes ok. So that is compression testing and that is the strength of a concrete cube that is the mode of evaluation of the strength of the concrete that you are preparing. Now we do several tests of course because it is a statistical situation and we do not get the same strength for all the cubes obviously we do not and we do some probability calculation to see if it is ok to use this concrete or not. Now this term M25 grade concrete we have certain proportion of the ingredients to get M25 concrete which is concrete which should have or which is designed to have as crushing strength 25 megapascal 25 Newton per millimeter square ok. Now of course if you test 5 some will be 25 some will be 24.9 some will be 23 some can even be 30 megapascals ok. So is it a case of continuous under variable? The strength of concrete C is it a continuous under variable? Yes right it can take any number in certain range it does not have to have the full range from minus infinity to plus infinity but it should be continuous in certain intervals that is what makes a continuous random variable. So the CDF of C that means strength which is the random variable evaluated at 26 means that the strength of the concrete cube is less than 26 megapascal. Here is a something I would like you to note random variables do not have units ok. So we do not write that C less than equal to 26 megapascal ok. Ideally that is how random variables are defined we said that it interprets events into numbers pure numbers but as engineers we may many times put some units to random variable to make things a little easily understandable for us ok. So these were examples for PMF and CDF. What about example of a PDF? Can anybody volunteer and give an example of a PDF? But I will continue and see ok. Well some basic properties of these functions CDF and PMF defines a probability it is probability of X being something probability of X being less than equal to something. So you can apply the probability axioms to this. So for example we have the CDF of X has to be greater than equal to 0 and less than equal to 1 this comes from the axioms of probability. Also CDF is a non decreasing function that means for X1 less than X2 the CDF at X1 has to be less than equal to CDF at X2. I will get back to the previous plots. So you can see the CDF over here. Let us say this is X1 less than X2. So this is F at X1 and this is F at X2. Since you are adding on area as you go ahead in the PDF plot. So you can see that F at X2 cannot be less than F at X1 is that ok? It is cumulative in nature it has to be non decreasing. We do not say increasing because PDF or PMF might be 0 at certain range. So it has to at least remain at that level but it can never be less than what it was for a lower value. Again from the axioms we have CDF at minus infinity equal to 0 ok has to be and CDF at plus infinity equal to 1. Plus infinity means you have included all the possible outcomes. The whole sample set has been included. So it is 1. For continuous random variables probability that X is within A and B is nothing but CDF at B minus CDF at A which can also be expressed at the integration from A to B of the PDF of X ok and zeta is nothing but a dummy variable. So a quick one I will go this way now. So this is F PDF and this is CDF. So A B this is the area which is this is F A and this is F at B ok make sense is the integration of the area between those two points where it is evaluated. So similarly if you integrate the PDF over the whole range minus infinity plus infinity you get 1 and finally say that a PDF does not define a probability. You see that dimension wise what is CDF? CDF is what you get by integrating the PDF. So they do not have the same dimension. So if CDF expresses a probability of X being less than equal to some value then PDF cannot be a probability. That is why if I ask you to give an example for PDF can you give one? Not as an example for probability ok like you can give for PMM for CDF. Here we do a very quick example. We have a PDF for a function for random variable X. So it is defined as this function b times x square minus 2x for that range for X being from 2 to 4 and 0 otherwise we want to find out the value of b. We use the axiom the properties. We use that from minus infinity plus infinity if you integrate the PDF we will get 1. So basically turns out to an integration from 2 to 4 and from that if we evaluate the integral we can get the value of b equal to 0.15 from this equation. Now you come to the concept of jointly distributed random variables. So for a discussing random variable separately sometimes you may need to find out the occurrences likelihood of occurrences of two events together or more than two events together. For example we say that if X the random variable X denotes the strength of material of a machine and y the number of operation cycles. So what happens as the machine goes to various cycles its strength strength of the material goes down. How much it can take that value goes down. So you might like to see how many operation cycles have gone through and what is the current strength of the material of the machine. Similarly I go to another example if X is the total rainfall in a basin and y represent the flood in the downstream river. Again you might like to see what are the joint probability of this being high flood and this being overflowing the basin and so on. So joint CDFs we express this way very similar to the CDF of a single random variable. Here you have a joint probability of X being less than equal to small x and y being less than equal to small y. Similarly joint probability mass function we also have X being equal to x and y being equal to y. Similar notations we have two random variables here as the subscript and two values of those random variables in that order within the parenthesis. And also a joint PDF which is obtained by taking the partial derivative twice of the CDF with respect to x and with respect to y. And you can inversely obtain the CDF joint CDF of the random variables x and y. You can evaluate that at x equal to a and y equal to b by doing an integration. And what is the limit of integration? Integrate from minus infinity to a for x minus infinity to b for y. I think I should have changed this order should be divided x. Properties you can obtain the CDF of x only if you consider the whole range of y ok. Y is infinity. If we evaluate the joint CDF at y equal to infinity that means you are considering all the y. So we do not have to consider y because that part becomes one the whole sample space for y. So that remains only the CDF of x. Similarly you can get the CDF of y only by considering the whole range of x, x up to infinity. And the mass function individual mass function can be obtained by considering all those j values look at the third expression for the joint PMF ok. And you can extend this to the continuous random variable as well. You have to replace the joint PMF by joint PDF and instead of summing you have to do an integration from minus infinity to plus infinity for one variable let us say y. Then you will get the function only for x. A simple examples I will stop over here probably. Why sometimes you think that joint mass functions may be important ok not a very realistic one. So here we are looking at how many wild boars obelisk hunt a day and similarly how many romance he let us say hunts a day ok. We are looking at the joint probabilities of different things. So in terms of wild boars we are looking at the whole sample set less than 2 between 2 to 4 and greater than 4 ok. So these individual numbers let us say take this one. This is a joint mass function of hunting wild boar less than 2 and hunting romance less than 10 ok. Similarly 0.15 hunting wild boars from 2 to 4 and romance less than 10. See this has the whole sample set for wild boars this has the whole sample set for romance right. So you can have this matrix it is a 2 dimensional matrix. If you have 3 random variables you can have a 3 dimensional matrix ok. What is interesting to note over here is that this summation of this row this one, this one and this one. What is that probability? What is this 0.3? 30 percent is the probability of number of romance being less than 10 ok. 50 percent probability of romance being 10 to 20 and similarly you can have also in this direction. So when you are summing up the rows what you are doing is we are considering the whole sample set for the other one that means the wild boars. So you have this one. Similarly you can sum up the columns and get this one which is the probability for wild boars only independent of romance ok. And if you sum in this direction either way or this direction either way you get 1 because in both directions we are considering the whole sample space ok. Thank you.