okay so what we want to do in this video is build a contingency table that includes the information that's given to us here in this example this is the example of the on-time delivery where two copies of a document are sent using two services service a and service b we know the probability that a document sent with service a arrives on time with a probability of 0.9 for service b it arrives on time with a probability of 0.8 and we also know that if it's [Music] if we look at the probability of a and b so it's sent with both the probability here of that is 0.75 so in a contingency table what we're going to do is have one side of the table let's say the left side of the table is for the event a but if a can happen we also want to account for the fact that the complement of a might happen so we could say not a the complement of a a does not happen and of course either a happens or it does not and and so we know however that the total probability that a happens is 0.9 so in addition to taking into account the events we're also going to have a total for both rows and columns and so what we want to look at here is this basic fact that says the probability of a is 0.9 so if the probability of a is 0.9 then the total probability of a happening should be over here in this column and this should be a 0.9 we also know about this other event b so let's make that the top of the table so we're going to have the event that b happens but just like before where we said that a can either happen or not happen the same is true for b so let's have a second column for not b now we also know that the probability that b happens is point eight so if we were to look at uh this column here the total here would have to be 0.8 so we're going to fill that in as 0.8 now let's take a look at what else we know in in the problem here we're told that the probability of a and b is 0.75 so both a and b have to happen and so that corresponds to the place in the table where a and b intersect each other where row a and column b intersect which is this cell that is going to be a probability of 0.75 and the rest we're just going to fill in by basic arithmetic if we know that the probability of a total is 0.9 right then these two cells in the first row that corresponds to a have to add up to 0.9 so 0.75 plus what number has to give me 0.9 that's got to be 0.15 so we put that in here and we can continue to do that just filling in numbers where it's possible to do that we know the total probability for b is 0.8 and so this cell here right above it has to be 0.05 now let's just really just stop here for a second to see what this really means we know the probability of b happening is a total of 0.8 what we're saying here is that this right here corresponds to when a does happen that's 0.75 but there's also the possibility that a would not happen when b does and that is the probability of 0.05 here these two numbers add up to 0.8 so this is the probability 0.8 of b happening but it's breaking out for us the two possibilities when a either happens up here at 0.75 or a does not happen at 0.05 here in this cell okay and now if we continue this process we can continue to fill in numbers now this second row not a has two missing numbers so we're kind of stuck right however we know that the probability the total probability for any contingency table has to be one corresponding to one hundred percent so this lower right hand corner represents the total probability of all possible outcomes and that has to be exactly one 1.0 and what that's going to allow us to do is fill in a bunch of other stuff because if this bottom total row has to add up to 0.1 excuse me to 1.0 and we already have 0.8 accounted for when b happens then this cell right here the last remaining cell in the bottom row has to be 0.2 and then we can continue to fill out as you know in a couple of different ways we could we could fill out this cell on the far right in the middle um using one minus 0.9 which is 0.1 so we'll do that so this is 0.1 and then finally 0.05 plus some empty cell here has to be 0.1 so that has to be another .05 and as a check we can look here in this column that corresponds to not b .15 plus this .05 does indeed add up to 0.2 so to check our contingency table we'll want to make sure that one is here in the lower right-hand corner if it's the probability and then we want to make sure that each row the two numbers in each row adds up to its corresponding total in this case 0.75 plus 0.15 is indeed 0.9 0.05 plus 0.05 does add up to 0.1 we do the same thing for the columns 0.75 plus 0.05 does add up to 0.8 0.15 plus 0.05 does add up to 0.2 and we can also check across here 0.8 plus 0.2 is 1 0.9 plus 0.1 is also 1. so everything has to add up and if it does then we've got an accurate contingency table