IEE 385 Exam 1 S20 Review Part 1

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay hello my name's Robert this will be the exam 1 review for ie 385 sorry - riding on these already I made a mistake and had to rerecord part of this so sorry ok so first just a couple of miscellaneous probability rules that I think are always good to keep in mind these are very very useful to just kind of sanity check your work like if you get an answer and it doesn't seem to make sense just check if that's even valid because it can tell you whether your answer is even possible on an exam because especially with probability you can get answers that are very odd so you can just kind of sanity check yourself and make sure it works so in the sample space all probabilities must add up to 1 that is if I take a sample the probability that something happens has to be 1 if we look at the sample space of a dice right the probability that I get a number has to add up to 1 so each one is 1 over 6 they'll add up to 1 yeah a probability can never be negative if you get a negative number you did sign wrong right it's pretty simple and probably the most useful one for exams is the complement rule so the probability that a doesn't happen which is this little funky prime thing it's kind of hard to see sorry so a prime which is a doesn't happen is the same thing as 1 minus the probability of a right because if it doesn't happen which is the probability of this it's going to be just the inverse of the probability of a it does happen right because either a happens or it doesn't we can't kind of have a happen it either does it doesn't so you can just subtract one off because of this total probability rule this is they all add up to one right and this can be applied especially when you're dealing with distributions sometimes it can be easier to kind of flip it around and do it the other way so take place on if you need to go put the number of poise on outcomes is countably infinite right so if you want to know the probability that X is greater than a number so it'd be this one sorry they're probably the X is greater than some number if you want it to do that you'd have to add up all the probabilities from that and from that number plus one to infinity which is just completely undoable so you can just do the inverse and subtract or subtract it from one correct so if you have the probability that X is greater than some number its equal to one minus the probability that X is less than or equal to X notice how this one doesn't have the equal sign this one does right so if you start with equal sign you lose it switching if you don't have it you gain it switching because this has to account for every possible way I said outcome get this little closer so you probably see it a little easier so yeah don't don't lose this equal sign you can get stuff wrong for the articles like a wing okay so this will be just a review of intersections unions and events so sorry again sorry I wrote on this I made a mistake so let's say you roll a 6-sided dice okay your sample space naturally is every number from one to six and it's a uniform because it'll be a dice so if you enumerate the possibilities you can either get a 1 a 2 a 3 a 4 or 5 or 6 right so let's define a as the event that I roll an even number okay so what's the event that I roll an even number different color 10 I think so obviously the even numbers will be 2 something I'm just gonna draw a little box can't even see a pen you can kind of see it I'll do okay two four and six right so those are the even numbers so this is three of the outcomes out of the six we know they're all uniform so it will be 3 over 6 or 1/2 for the probability that they have this so now let's call be the event that you roll number greater than 4 so the number is greater than 4 are 5 & 6 right so the probability be rolling a number greater than 4 just by inspection is 2 over 6 or 1 over 3 right because they're good one now notice that a and B have some form of overlap here right so if we roll aesthetics both a and B happens so we can kind of think of this as the intersection between the two so the probability that both a and B happens is represented by this so this is the property of a and then the intersection which is an and B I like to think of this right I like to remember this so this looks like an N so you have you know intersection I N and then the other one is the Union which is au so just remember an intersection you Union another way if you're more inclined if you're a CEO student or you kind of relate to coding you can kind of think of this as an end function right so this is both a and B have to happen right so at 6 both a and B have to happen so it's 1 over 6 Union however can be thought of as an or it's when both a or B happens so in this case your Union will be equal to 2 over 3 because if we look at the possibility so when de a and B happen so a happens on 2 4 & 6 B happens on 5 & 6 but we can't just add these up because if you look if we just add them up we actually count this 6 twice so what you have to do is you add them up and subtract off the intersection so this is written down here kind of as just a law so the proud of a union B is equal to the probability of a plus the probability of B minus the probability of a intersected with B so if you and then if you do the math it'll be 3 over 6 because that's probably of a plus the probability which is 2 over 6 minus the intersection which is 1 over 6 as we said found here or by visual inspection window so you can also rearrange these so sometimes on an exam you might be given just so let's say you're just given the priority of a the probability of B and the intersection right then you might not be able to just look at this and go oh well the union will just be you know 1 2 3 4 over 6 that you might only be given the numbers if that's the case this formula is pretty much needed to solve the problem it's useful to have so just remember the union of a and B is equal to probably the a plus B minus the intersection right if you want to think about this as a Venn diagram so let's call this a this B right this little overlap here will be the intersection so if I'll use the same color pen so if this is a right and this is B if we just add up the probabilities we're gonna count this middle part which is the intersection twice so that is why this is true right so because if you just add them up and you'll get this twice which means that you're you can get a nonsensical number something greater than one okay now the multiplication rule so the definition is if processes a B and C however many have n number of outcomes and if for each one so n a and B and C outcomes the total number of outcomes possible for that process will be na x NB x NC so in English this basically means that you just multiply all the total outcomes together and you'll end up with the total on the outcomes so it let's just start with I flip a coin okay how many outcomes are there so I can hit that I can it can have to be heads or tails right now what if I roll a dice - okay well now the dice has six outcomes and the coin has two so we can go one two three four five six right these are all possible outcomes and if you want to draw your relationship tree and then this one also has one two three four five six right and how many of these are there well there's 12 because there's six of these times two because there's heads and tails right now if I roll two dice well now each one of these is going to have six more right I'm not going to write them all because it would take me forever but and as you can see you just multiply them all together so if I say what's problem or what's the total number of outcomes for flipping a coin and rolling two six-sided dice well this if we call the coin a that has two possible outcomes so na is equal to two okay and and B which will be the first dice has six possible outcomes right and then C which will be the second dice also has six outcomes so the total in your outcomes for this given process will be two times six times six which is 72 okay because they're just six times six times two right so your total will be this once you flip a coin and three dice okay so now you're going for two dice to three so you can just take this number and multiply it by six right because it's just gonna be these first three terms will be the same so you're gonna take this one and multiply by six so if you get your calculator it'll just be 72 times six which gives you 432 so this will be right now so two times six times six times six is equal to 432 okay combinations of permutations so these are fairly important for her basically Powerball hypergeometric but they're also Oh binomial also use the binomial negative binomial and that's it actually I think so as a general rule of thumb for combinations order doesn't matter no replacements you choose K items from N and your calculator can do these for you so so this is actually the formula and this is the notation so it's you know n with the brackets so this is n choose K right so this is the same thing as I draw K numbers from n all right so your catheter can do this for you you you probably don't have to do this by hand so if you have your calculator if you go here to math and go over to pRb we went too far there is a NCR function okay so this will give you combinations so if I want to know but the format here you put n first then NCR then K so if I want to know say if I have 5 outcomes and I draw two of them how many ways can I do that there at 10 it will also do permutations for you it's the same formatting so but naturally permutations will be more so the difference between the two is for a permutation order matters so let's say I have a bag with three tokens and I draw two how many ways can I do that I'm going to number them one through three okay so I have my little I'm gonna do it over here so I have a bag okay and I have one two and three in the bag okay and I blindly reach in and I draw two of them without replacing them so if I draw the one I don't put the one back before I draw the second one so there's no replacement so how many ways can I do this well if you enumerate the possibilities right so you can do one and two you can do one and three and you can also do two hundred right so there are three possible outcomes and they're all equally likely so this is the sample space right but what happens if order matters okay if order matters one and two is now no longer the same as two and one so now you've got more combinations so now you have 1 & 2 1 & 3 2 & 3 2 & 1 3 & 1 & 3 & 2 right so there are now six possible outcomes in your sample space rather than three so if we and this can just be given to you this number can be found by using this function in your calculator so for this one we'll do the combination one first you go to NCR so I have three total so I put three before the NCR and then I'm drawing two of them right so I'm drawing two three okay that's the same thing we got here and if you do the same thing for the combination function I'm just going to do it this way or sorry the permutation function you'll get six right permutations we'll always have higher numbers than combinations because there's just more outcomes if you compare the formulas there will be K factorial more permutations than there are combinations because the combination number is divided by K factorial which in this case K is 2 because that's how many I draw so two factorial is 2 so there will be half as many of these because this is kind of 1 over 2 this one isn't this one doesn't have the 1 over 2 term so there are six of these three of these you know you'll probably never have to know that offhand but you can just find it by using the function as a general rule of thumb if your K is zero the number of outcomes is one so if I don't draw anything there's only one way I can do that okay and if you plug this into the formula you'll get zero factorial is just one so you'll get one times n minus K if K is zero this is just n factorial divided by n factorial so it's just 1 here it's the same thing you'll get n factorial divided by n factorial 1 if K equals n the number of outcomes possible is also only 1 this only applies to combinations not permutations ok this only applies to combinations so if K equals and what happens so now you get this is 0 factorial which is just 1 and then you'll get n factorial divided by n factorial right because k factorial equals n so but here notice that this just becomes 0 factorial which is just 1 so the number of possible outcomes with K equals and for permutation will just be n factorial but these are nice to know because you don't want to get to an exam and realize you don't actually know what you know something choose 0 is it's nice to know because especially when you're dealing with hyper geometric when you get into really big numbers you know it could save you time because you have to do three of these per problem and if you're doing the CDF you have to do even more so it's nice to know just offhand that sneaky can actually be Powerball so if we say 69 choose 1 right this is just 69 right it's how many ladies time she's won it's nice to you you know if you haven't memorized it saves you time because time on an exam is nice because you can go back and check your work or if you have say 69 choose zero you know it's a nice no that's just one okay so now Powerball so this is this is a good problem because it when you learned you I didn't realize it but this is just hypergeometric right so it's good practice if you want to practice hypergeometric and this at the same time you know it's nice enough so these the rules you probably know them by now so if we say X is the amount of money I win what's the probability I win $100 okay well if we look over here so there are two possible you can't really see that but there are two possible scenarios where you win $100 so the probability that I win $100 will be both of these probabilities added together okay well what are these probabilities so this one I need to get for white and no red balls so the probability of that will alcohol this just we'll call this one a and this one B okay so the probability that I win this will just be probability of a plus probability of B right so for a I need to draw four white balls so out of the 69 five will be drawn for the white balls so your denominator term will be 69 choose five right because so there's takedown total you're drawing five that this is the total number of ways you can do this your numerator will be so of the so I choose five so there's five successes so it will be of those five I need to draw four of them right and of the failures I need to draw one so this will be 64 and this will be one right now this is hypergeometric so if you want to just really quick check your work make sure you this even makes sense these two added together have to add up to this one so four plus one is five five plus 64 is 69 right so that kind of checks out we don't mathematically but that's not all that can happen in order for a to happen we also have to not draw the red ball so what's the probability that we don't draw the red ball so that's the intersection between the two so because both of them have to happen so this has to be multiplied by the property we don't draw a red ball so out of the 26 red balls we draw one right so it's 2016 the numerator however so when we pick one so we need to not choose that one so over the won success that we could have we need to not draw it right and of the 25 failures that we did not pick right we have to draw that one so this becomes 25 choose one right because there's 25 numbers that I did not pick and one number that I did and I don't want to draw the one I picked right because for this one I need to not do that so if I do this math so this like I said it's nice there's no these offhand this is 25 over 26 right times this will be 64 times let me do 5 choose 4 I think it's 20 but let me double check five use for no it's 5 actually so it'll be 5 times 64 divided by 4 over 69 choose 5 is it will be nine choose five that number one one two three eight five one three Wow okay um yeah you will play these together and you get so we're going to do this times now what we'll do this side first so it'll be five times 64 divided by this number times 25 over 26 because that's this term so that comes from here so this number is the first one so this one will be five times 64 do I buy that really big number multiplied by this and you'll get this but this doesn't look like this does it so but this is actually one over this because this is the odds you win this is how many you have to do on average to win which if you can't see this this is three six five two five point one seven so if you do one over this you get that number right there that's it so you take one over it you get this number but that's not all because this is just a probability of a right so if I say the probability of a is equal to one over three six five two five one seven point one seven because that's what we just found right but to win $100 I need to do this or this so I can add up their probabilities right because if either these happen I have $100 so in order to do this one it will be so the denominator will still be the same because I'm still drawing the same possible outcome so I'll be 69 choose five [Music] and numerator will be in this case I only want three of the white bowl so of my five successes I need three of them and of the failures it will be 65 choose to write because I now only need three of the white balls instead of four so this will be the first part and then this will be multiplied by the probability I draw my red ball so it will be 26 choose one will still be the denominator the this one so the last one I need you to not draw the red ball now I actually do need to draw it so it would be 1 choose 0 times 25 choose 0 sorry this is this should be 1 choose 1 my man and this will be 25 to 0 and again you can just check your work right so 1 plus 25 is 26 1 plus 0 is 1 right these numbers make sense 5 plus 65 is sorry this ryu 64 again check your work don't do don't do what i you always go back and check stuff like this because you know you might make mistake so 5 plus 64 is 69 3 plus 2 is 5 ok so this number you know if you do the math you'll get that number and then you add them up and you'll get your net probability of you and $100 because this will be the probability of B and the probability you $100 will be a plus B right I'm not gonna do it but you can do it for practice so another thing you go over in this class is the birthday problem so the birthday problem is not as complicated as it sounds so if you call this so let's say that X let's define X as a random variable that is the number of people who share a birthday okay so let's call X equals 2 number of people who share a birthday with at least one other person [Music] okay so in other words so what is the probability that any room of any people there is at least one duplicate birthday so if we go back and we look at this if you want to think about this so let's go back and look at this right so this in other words is what is the probability that X is greater than one or even in or equal to one right because we want more one or more duplicate birthdays right so we can also find the probability that X is less than X right because this is going to be really hard to complicate yeah compute but one minus the probability that X is less than X is actually not that bad because if we reword this or rewrite it this can be 1 minus the probability that X is less than 1 well what is this so X can never be negative right you can't have negative a negative quantity of number of people you share a birthday so you can also write this as 1 minus the probability that X is equal to 0 right well what's the property of X is equal to 0 so let's start by just writing out some numbers so let's call this let's just say like this is n people ok and you have 1 2 3 4 5 6 and this does this go this is uh okay so you have n equal okay if you have one person in a room what's the probability that they have a duplicate or they they have an individual birthday so if we define X as so like what's probably the x equals zero so X is the number of duplicate birthdays so what's the probability there are no duplicate birthdays with one person in the room right it's one you'll never have a duplicate birthday with one person in the room because of the 365 days in a year none of them are duplicates because there's none that would be a dude with it so this is one where you have two people okay well so the first person to have their birthday anywhere the second person can have their birthday of the 364 days left so this becomes 364 divided by 365 right and what's the third person okay well now these two people have claimed birthdays so this will be 363 over 365 right and that this just goes on so this becomes 362 over 365 if you want the you can kind of as you can see there's kind of a pattern forming there right because this will be 361 this will be 365 so this is kind of this is a repeating pattern but this is all so in order to answer this question what's the probability that are no duplicate birthdays well all of these have to be true because the five people the probability that there's not a duplicate birthday is not this this is this is only the probability that the fifth person has no table two birthdays the probability that none of them do will be all of these multiplied together right so it'll be one times this times this times this times this I found a Khan Academy video about the birthday problem that I thought was very useful and when I took the class this is actually what helped me understand the birther problem because I struggled with I guess seeing it so I'll post the PowerPoint later and you can dismiss abhi link so you can look at it later okay so Bayes theorem okay I can guarantee you there will be a question on this on the exam pretty much without question so make sure you know base theorem oh one last thing so the birthday problem so this is a really annoying calculation and on an exam there will more than likely be kind of a trick question that looks like this so if I have three hundred and sixty-six people in a room what's the probability that there is at least one duplicate birthday right it's one because there's only 365 possibilities if I have 366 people one of them is going to have a duplicate another on the quizzes there's a question like this and it was if I have the seven week or days of a week so Monday Tuesday Wednesday Thursday Friday Saturday and Sunday right if I have more than seven people the probability that there will be a duplicate day not date is one right so when you if you see a question like this make sure just do a quick check right and just kind of see if you can kind of common-sense your way out of it because doing this math is tedious and kind of annoying so if you have a number that's greater than the possibilities it'll be one right or just just make sure you do this because on the quiz I think there was a question where it was if you have 13 people in a room what's the probability that none of them shared a birthday or something and it was a rush have their birthdays on all different days of the week well you can't there's not 13 days right one of them will have a duplicate so it's just one okay base there so like I was saying based on was very important make sure you understand it okay so Bayes theorem looks very complicated but I personally find it easier to not look at the formula if you think it's easier for you to look at the formula and solve it that way and kind of plug it in that's okay I personally think it's easier to kind of just logic my way through it so let's look at this problem so a factory has three machines a B and C these machines account for 20% 30% and 50% of the factory output respectively the rate of defect for these machines is five percent for the first three percent for the second and 1% for the third okay so to start I recommend you just define events so let's call a the event that the machine came or that the part came from machine a okay so this is the probability of a is twenty percent right because twenty percent of the items coming there B will be just for Machine B so this'll just be point three C will just be point five right so that's it now let's define D the event that a part is defective okay well in order to find the probability that a part is defective we need to go through all of these because the probability of D will just be the probability of D given a plus the probative D given B plus probe of D given C right so the probability of D given a is given here it's point zero five right the property of D given B is point zero three the probability of D given C is point zero one okay and this is all just given in the problem now we need to find what's the probability that something is defective because I might have found a part that's defective okay what's the probably that's defective well a B and C are all mutually exclusive which means that one of them has to happen and both of them can't happen if your events which another way to phrase this is a B and C form a partition of the sample space which means that they are mutually exclusive and they all you know one of them has to happen you can't have both you can just add these up right so the net probability that emission that a pole be defective will be because 20% of them are defective 5% of the time 30% of them are defective 3% of the time and 50% of them are defective 1% of the time so you can just add these up so this will be point two times point zero five plus because it's or like if either of these happen point three times point zero three plus 0.5 times point zero five right and if you do this math out you'll get a probability of D will be out here so 0.2 times point zero five plus point three times point zero three plus 0.5 times point zero one okay you get so it is two point four percent of the time you get a part that's defective so decibel okay so that is the probability that a part is defective now I really do like to just kind of check yourself right does this number even make sense it's a pretty small number but as you can see the probability that something is defect was pretty small and this looks about right right so it's somewhere in this ballpark that's good so this this number makes sense so we probably didn't do sign wrong now you need to find the problem you see given D so the probability of C given D I like to think of this as okay so you can just blindly follow the formula here right so we've got what's the probability of D in this case so we have a probability of D over here so this will be point zero two four well what's the numerator okay so we've got probability of B given a right so in this case we have C and D so this will basically be probability of D given C so we have that so we point zero one and then we have the probability of a which in this case is C so we have a times point five right and then and this will give you that number so I said then you go over to question if Part A is if a part is found effective what is the probability that came from Machine C okay so in other words what is the probability of C given that it is defective okay so B is defective so C is I camera C so let's probably have C given D now you can just kind of plug this in and go but I personally like to think of this in a different way because to me it personally makes more sense if you think of so if you look at a probability in a sample space it's out of one right because one is the event that something happens okay so any probability out of a sample space kind of has this denominator of one because something happens because it's out of a hole right all of them have to add up to 1 well in this case you're kind of I guess unity which was something happens is actually that it was defective so instead of adding up to one they all have to add up to point zero to four and if you want to think of a probability as how much does something the way I like to think about is how much does it contribute so if you think about this as the probability or if a part comes from a factor at this Factory it adds to one okay well how much does the machine see contribute to that okay it's 50% right so the probability of C is 0.5 over the part coming from the factory which is one okay B is point three over one in this case instead of the part coming from the factory I like to think of it as the part is defective so that is now your new I guess unity which is what everything has to add up to was just point zero to four and how much does machine C contribute to that new number well if you look at how we got to this number this part of the problem is from a machine seed right this is machine this is C this is B and this is a right so how much does this machine C contribute to this number well if you look at it and you make it a proportion that's just this so it's point zero one times 0.5 if I do i point zero to four which if you do the math it will give you five divided by an answer you get twenty twenty percent almost twenty one percent so you get point two zero eight okay either way you'll get the right answer so either you can just look at a formula and kind of just plug it in just make sure you're doing it right so because this is a CBD no to replace it with the appropriate numbers alternatively like I said the way I like to think about it is how much does a machine C contribute to the number of defects that just make more logical sense to me and is how I prefer to think about it definitely have this hormone your cheat sheet though then it'll go over valid PMS and PDFs so like I said earlier in the review so all probabilities in a sample space must add up to one so any given PMF or PDF when you take its entire sample space will be one because a PDF is just a sample space right in this case this is literally pushing out the quizzes so consider the following PMF probability of X is equal to K over 3 or it'd be K to the negative 3 power sorry 4x equals 1 to 3 through 8 what value of K makes us about PDF okay so if we enumerate the values here so this is discrete so there are only 8 possible values so it can take on X can take on 1 2 3 4 5 6 7 or 8 okay and each of those probabilities is 1 over K to the negative 3 power right because if this is uniform right because this does not depend on X so the probability will be the same for every value and the probability for anything in a discrete uniform is just 1 over this number right it's just probably that property of the uniform distributions so these probabilities will just be 1 over this constant so well let's solve for this constant okay because we know all of these added together have to add up to 1 so this is 1 over K to the negative 3 plus 1 over K to the negative 3 right and this goes on so this goes on eight times so I'm just gonna abbreviate this and we can call this 8 over K to the negative 3 right because if I just add these up I'm just gonna get 8 right [Music] well now we know that if we add all of them up it has to add up to one right so I'm gonna set this equal to one because this is now the total sum of the probabilities if we don't know what K is so we know this has to add up to one so we set this equal to one right and now it's a pretty basic Alden problem so you multiply by K to the negative three you get cake the negative three is equal to 8 and then you write here so 8 equals K to the negative 3 and now you can just do cube root of 8 which is 8 to the power of 1 over 3 you get 2 ok so k equals 2 right and again we can go back and check our work here does this make sense so if I do all of these and add them up which I'm just going to use the 8 because it's all of them added up already so if I do 8 divided by it'd be 2 to the negative 3 all right so hold on I'm interesting so this should be 2 to the power of negative 3 and then it's 8 over this sorry put enjoy [Music]
Info
Channel: Dr C
Views: 265
Rating: undefined out of 5
Keywords:
Id: 6QKztl12nqo
Channel Id: undefined
Length: 39min 22sec (2362 seconds)
Published: Wed Feb 19 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.