 So, we want to talk about a binomial probability distribution. Lesson 7 says, using the binomial theorem to calculate probabilities, and this to me also has kind of a high nerd, very cool concept in it. Objectives it says to identify the conditions of a binomial experiment and to develop the binomial probability distribution formula. And here's the question we're going to start out with, what's the probability of correctly guessing the outcome in exactly two out of three rolls of a die? We're going to do a three-level tree. I said I always do a tree for two levels. I sometimes do for three levels. More than that, we're going to try and see if we can spot a pattern, Amy, and come up with an equation or a formula or some kind of a shortcut. So, we had students walk in late today. Let's suppose I was trying to guess their roll on the dice of fate. What are the odds of me guessing correct? Will you see for correct and not see for me not correct? What's the odds of me guessing correct? It's rolling a dice. What are the odds of you guessing the right number? One out of six. What's the odds of me being wrong? Five out of six. What about on the next roll? What are the odds of me being correct? Still one out of six. Five out of six. One out of six. Five out of six. Are these two branches identical? That's how you know they're independent. What about the third roll? You know what? Still one out of six. Five out of six. Let's fill them in. So, the question wants to know what are the odds of me being correct in exactly two out of three? Down this branch, how many am I correct on? Three out of three. That's not good. How about this branch? Oh, this one is exactly two out of three. How about this branch? See, not see. See, oh, this one is exactly two out of three. No. Yes. No. No. No. You know what? Those three branches that I put a check mark under, those are the only ones that have had exactly two Cs and one not C. The probability of, oh, Vitaly, we're saying this. This branch or this branch or this branch. The probability of me being correct is exactly twice. One out of six times one out of six times five out of six or one out of six times five out of six times one out of six or five out of six times one out of six times one out of six. If I walk down that branch, that branch, or that branch, and here's what I notice that's kind of nice. The same number appeared in all, the same three numbers appeared in all three terms. So, as one shortcut, Amy, instead of typing this in three times, because each of these, because each of these has two one-sixths and one five-sixths, instead of typing them in three times, a simpler way would be to go three times that. And there's also another shortcut. How many one-sixths appear in both? I could go one-sixth squared, five-sixths to the one. If I really wanted to type that in with as minimal amount of work as possible on my calculator, I think the tally, what I've written here in black, is this blue here. Simplified. Let's look for patterns. What were the odds of me guessing one correct? What do we say the odds were of me guessing correct? One out of six. Do you see a one out of six in the equation? How many times did I want to be correct? How many times did I want to be correct? Twice? Do you see a two that appears anywhere in the equation near the odds of being correct as it were? What were the odds of me being wrong? How many times did I want to be wrong? Which is why I put the one there, Amy, so it would stand out. What about this? Now, it comes from the fact that there's three paths. But what if I didn't have the three in front of me? This can be thought of as the product of the number of pathways that have two Cs. It looks like if you look at each pathway, each pathway that I've colored in, each pathway that I've colored in, I think has two Cs and one not C. I think that's a word. How many letters in that word grand total? Three. Choose. How many Cs are there? Can you, on your calculator, try three choose two to three choose two? Work out to three because that would be a delightful and wonderful coincidence if it did. That, are you saying that this right here is really from three guesses choose two correct? That's not a bad pattern. If the pattern is, how many times are you rolling the dice? Choose how many you want to get right? Times the odds of getting one right to the power of how many you want to get right? Times the odds of being wrong to the power of how many you want to get wrong? That's actually not a bad pattern and that is the pattern. We call this a binomial probability distribution function. By the way, do you notice this looks a little bit like when we expanded binomials where we have the two exponents adding to the number and this is very similar to that thing we do with the A's and the B's last unit? Turns out Pascal's triangle has a lot to do with this too. What's the probability of correctly guessing the outcome in exactly two out of six? How many times are we rolling the dice grand total here, Jasmine? How many times are we rolling the dice grand total here? How many times are we rolling the dice? No. How many times are you rolling the dice? Six. Six. Do I want to do a six level tree? No. How many times do I want to be correct? Okay. It says the probability tree method is tedious but we can extend the ideas from here by saying this and I'm just going to go straight down to the bottom here. The probability of exactly two correct guesses in six rolls. Jasmine, how many times am I rolling the dice grand total? Six times. Choose. How many do I want to get right? Two. That's the first part of the answer. What are the odds of being right once? How many do I want to get right? Two. What are the odds of being wrong once? If I have to write, how many do I want to get wrong? Four. And that is the answer. Get out your calculators and go to ten. Six. Choose two times one sixth to the power of two times five sixth to the power four. The odds of me being right twice point two zero zero nine. What would the odds of me being right all six times be? How would this equation change? It would be from six rolls choose six right one six to the how many times I want to be right six five six to the by the way what do you think I'd be able to correctly guess the dice six times in a row is that likely or very very unlikely exceedingly unlikely that scientific notation so 10 to the negative five point zero zero zero zero two one four. What would happen most often if I roll the dice six times and the odds are one and six on average what would I usually get right do you think out of six guesses? Madison once probably right if the odds are one and six and I'm rolling six times probably if I repeat this game over and over and over the most common result would be getting one right oh let's see if that gives me a slightly bigger answer than getting two right one five wrong oh yeah about 40 percent of the time I'll get one right 20 percent of the time I'll get two right almost never but not zero will I get six right this is also going to allow us for example to answer the question what are the odds of getting 20 out of 40 on a multiple choice test it's going to be the same math here this is the binomial probability distribution this is the long version but this is on your formula sheet as the long version now your calculator actually has this built in in a very obscure location and I'll show you that in a little bit but you do need to get comfy with the long version which actually isn't all that long got me on next page over okay if I want to get x correct in six rolls the pattern is from six rolls choose x correct one out of six to the x five out of six to the to the what six minus x technically is what we were doing right if that's a two that's a four if that's a three that's a three if that's a five that's a one so try finding the odds of getting three out of six correct on your own right now we're not going to do all of them try doing three out of six correct I'm going to freeze the screen let's see if we end up in the same place and I got that yeah oh you know what the odds get three and three out of six correct not very good which it which they shouldn't be now you cannot you cannot use this for cards why can't you use this for cards because once you picked one card what happens to the remaining odds they have changed so kids for some reason unless you put it back which is boring okay kids sometimes want to use this for cards no no no no no you cannot you can only use this it's the odds never change for example Brett suppose you shot free throws at 70 percent for the whole season we could ask in your next ten shots what are the odds you hit seven right seven shots what are the odds you hit eight what are the odds you hit nine what are the odds you hit ten or what are the odds that you hit at least seven which would be seven or eight or nine or two very easy to calculate and you can see where oh they might actually want some of this in sports you could use a lot of information batting averages is a great one as well so if you know a guy's career or season batting average and you're towards the end of the year what's the probability of the next five at bats he goes two for five do you think managers could use that as part of their strategy yeah yeah and you you're involved in baseball enough you've noticed in the last ten years stats have exploded in baseball right the whole saber saber metric so whatever you call it for me oh yeah well when I was young all they were talking about was batting average nobody cares about batting average anymore what's the big stat on base percentage and slugging percentage and those only came around in about 1996 or 97 well nobody mentioned those before yeah it's how well you hit the ball when there are people on base because if there are people on base the defense plays you differently and you're pitched to differently of course you'll have a different batting average then than if the bases are empty and so this is also challenging many long-held managers beliefs you read the book Moneyball you want to read because as a baseball guy and as someone who's got enough of math background now fascinating read it's about the Oakland A's and how for years they were able to be very cheap but still compete with everybody because Billy Bean had found mathematical ways to find players that seemed worthless but actually know were worth much more than their current salary in terms of the stats that they would produce on average he's the one who taught players that it's better to get walked than to hit a single anyways overturning some very very common beliefs the sacrifice fly I believe is what they talk about the sacrifice fly mathematically is a terrible terrible terrible thing if I recall the book off the double check now what's the relationship between this and the binomial theorem can you see here if we expanded instead of gen A plus B to the sixth power if we expanded P plus Q to the sixth power remember the pattern from last year it was six choose six choose six choose starting at six down to zero and then it was eight of the six eight of the fifth eight of the four B to the zero and take a look at the three that we did here six choose three P to the one-third Q to the one-third doesn't look an awful lot like what you have right here except instead of the letter P it's a one six and the set of letter Q it's a five six P is the probability of success Q is the probability of failure and that's going to give us a generic approach example one a biased coin is flipped four times now the word biased for my ESL students it means the coin is not balanced properly this coin does not amrit have the odds 50 50 what are the odds of getting heads here it's a rigged coin okay I did that because 50 50 gets really boring so I said I'll make it a biased coin what are the odds of getting exactly four heads in four flips so here's the notation that we're going to use we're gonna use the letter P for the probability of success what are the odds of getting heads point seven gotta go to a decimal now we're gonna use the letter Q as not P and in fact you're gonna hear me sometimes say mind your P's and Q's which is an English expression but here in math it actually meet be careful what are the odds of not success did you how'd you get that so if you look on your formula sheet you will actually see the formula Q equals one minus P I trust you don't need to look that up hopefully I've emphasized the compliment enough that it's now instinctive the fact that they gave it to you almost embarrasses me off you serious so point three if I want exactly four heads how many times are we flipping a coin grand total for it's gonna be this for choose oh and in the second question how many times are flipping a coin in total it's also gonna be for choose we're gonna do both of these simultaneously so we can see the difference how many heads do I want to get here how many heads do I want to get here to what are the odds of getting ahead point seven what are the odds of getting ahead point seven how many heads do I want to get in this first question for how many heads do I want to get here to see how all the numbers are coming together what are the odds of getting a tail point three point three how many tails do I want up here zero how many tails do I want here to and I think if you type this first one in very carefully you should be able to go second function enter and just change some numbers to get the second one so let's type the first one in very carefully for choose for I know for choose for is one but I want to type it this time so I'll have to retype it next time times point seven to the power of four times point three to the power of zero the odds of getting four heads not bad 24% basically would you bet on that the odds are not 50 50 in your favorite no that'd be a bad bet is it point two four oh one you guys got that as well what are the odds of getting exactly two second function enter instead of a four to correct to correct which also implies too wrong by the way this should be pretty good odds because the odds are better than 50 50 that you get ahead every time so getting half of them heads should be better than 50 50 oh what this is actually saying exactly to not two or more exactly to the odds of getting exactly to the best of all but still not 50 50 yet point two six four six the last one what are the odds of at least three now what does at least three mean this means three or four let's write out the equation for three four heads choose sorry for flips choose three point seven is one head three of those point three is a tail one of those or did we already do four in the very first example on this page I'm just going to drop the point two four oh one down because for pizza let's use our brains second function enter three three one point four one one six almost a fifty-fifty chance of getting three heads point four one one six plus point two four oh one what are the odds of getting three or more at least three what do you get point six five one seven would you take that bet yes absolutely it's in my favor totally totally okay a fair coin hey what are the odds for a fair coin okay let's put in the margin here P is point five Q is point five by the way apparently actually not quite true just the way they mill the coins one of the sides is slightly slightly slightly slightly slightly slightly heavier but we're going to pretend that it's true okay I don't know but they actually the NFL made a big stink about that wire coin tosses important in the NFL not kick off that big overtime and there's there's huge stats that show whoever gets the ball first and overtime wins like 60% of the time that's a big deal and so the NFL raised a big stink about their specially minted made for the TV coins how do we know these are properly balanced because this guy wrote a paper and showed that regular coins are proper aren't properly balanced now it's like to the fifth decimal place it hardly makes a difference but they made us think about it look two years ago yeah what's the equation here going to be how many flips grand total 12 choose how many heads six odds of getting ahead point five how many heads six odds of getting tails point five how many tails six amrit this is why I gave you a biased coin for the previous question because the point fives there are kind of boring and the same number of it confuses kids but for a real coin it is the same number what do you get what David point two two five six anybody else yes okay so are you all okay with the long way look on the inside cover of your workbook see if you can find the algebraic version of this equation in the probability section I think it goes n choose x p to the x q to the n minus x is that correct see it there inside covered okay so it's there you don't have to memorize it but you need to know what all those things mean I kind of find it easier to memorize it but Jordan this is the long way your calculator actually has these built in next page I'm skipping a few of these I think you have to kind of hang of it next page here is the more interesting question tests that are multiple choice because if your multiple choice test has four answers for each question hey those are independent the odds never change it's point two five on every question is it not so now we can start to say hey what are the odds of getting five out of ten on a test or on a provincial 20 out of 40 but that says exactly 20 out of 40 what we really want to know is 20 or 21 or 22 or 12 passing which is 20 or more okay pretty good I don't know you knew I told her to elbow you but your head came up right away okay we're gonna do these questions two ways we're gonna do it the long way and then I'm gonna show you your calculators built in function you are allowed to do both but if you use your calculators built in function and it's a written question you have to show me what you've typed in so a multiple choice test has how many questions Jasmine how many questions 10 how many rolls of dice 10 how many 10 so it's going to be 10 choose right how many correct how many wins how many heads how many successes do we want in part a to now in this question what's P the probability of randomly guessing right on a question or point two but your calculator will let you put a fraction there what's Q 4 5th right and I'm gonna add some more notation by the way N is the number of trials what's N here 10 if we do this the long way we would go one-fifth to the how many right to four-fifths to the how many wrong 8 what are the odds if you randomly guess of getting exactly to right and give it to me to four decimal places please what do you get someone just started what 3019 anybody else yes that should be the most common one if you got a one and five chance of guessing you should get about one-fifth of the questions right and one-fifth of 10 is two draw the line put your pencils down and look up get your calculators in front of you okay we call this the binomial probability distribution I'm gonna say it again we call this the binomial probability distribution and would you believe if you look very closely on your calculator you'll see in yellow a distribution button find it right here look up if you all go right now second function bars these are all different probability distributions we don't look at all of these in math 12 fact we don't look at any of these in math 12 except for one if you go down arrow down arrow dine it down stop when you think you reach the binomial probability distribution function oh option zero binom PDF which is how I'll always say it that stands for for me you didn't go second function bars you just hit bars the distribution feature is in yellow do you know you've got to go yours is on letter a okay you got extra one whatever make sure you're not binom CDF make sure you're binom PDF okay look up Jen you found it second function bars down down down down down for a while until you see binom PDF look up thank you second function bars second function this okay down down down down got it okay press enter to activate it okay here is the syntax the first thing you type we're gonna write this down but I'm just gonna do it with you the first thing you type is how many trials how many rolls of the dice in this case how many questions then you have to find comma your comma is right here next to your bracket yes you're finally going to use it comma the next thing you type is the odds of success what were the odds of guessing one question right one comma the last thing you type is how many you wanted to get right how many did we want to get right to close bracket and if you hit enter should get same answers we got long way except apparently someone didn't round off properly when they gave me this answer they should have said point three zero two zero yes so I'm gonna fix it here because I can't stand it when you round off wrong and here's what we're gonna write over here if you did it this way here's what I would ask you to write binom PDF bracket ten comma one fifth comma two we're gonna write the syntax out in our notes a bit later right now I'm just showing it to you we will actually write all this down okay so we're gonna come back to be in a second we're gonna come back to be in a second instead cross out C and just underneath it right getting perfect what are the odds of getting perfect on this test by randomly guessing and again we're gonna write it both ways it would be from ten questions choose how many right do you want to get ten one fifth is the odds of getting one right how many right do we want to get ten four fifth is the odds of getting it wrong how many wrong do we want to get don't reach for your calculator that's too much typing I'm gonna suggest and I'm good with you learning to do it this way as well it's gonna be by known PDF how many questions are their grand total ten what are the odds of getting one right one out of five or point two how many right do we want to get I think this is way faster to type especially if you've just finished typing a by known PDF and couldn't go a second function enter and just change the two to a ten what are the odds of getting perfect basically zero point zero zero zero zero zero well let's write it down one point zero two four times ten to negative seven one point zero two four times ten to the negative seven let's go back to Brett let's suppose Brett's shooting three pointers why did you guys duck let's suppose Brett's shooting three pointers okay and let's suppose the probability of Brett hitting a three pointer is point three what are the odds in your next 20 shots you go 15 for 20 it would be by known PDF 20 shots point three hit 15 not very hot not likely pretty small right you only got a 30% chance of hitting one going 75% right hitting 30 you know with only a 30% chance on each one not likely okay but free throws let's suppose your free throw percentage is I think Spencer last year was point seven what are the odds of him going 15 for 20 over two games from the foul line not bad oh no that's exactly 15 for 20 what we would like to know is what are the odds him going at least 15 for 20 which means 15 or or or or or or what does or mean oh there's got to be a better way to do that and there there is your calculator does have methods whereby you can enter more than one piece of data okay we're gonna do that in just a second but there's the binom PDF useful just on its own to be quite honest but we can do more so in the bottom of the page here's the formula on your formula sheet or binom PDF of n comma p comma x is the syntax and well it has it right here x is the number of successes and is the number of trials p is the probability success on a single trial I am good with either of those it's worth learning both but once you've mastered the first one the calculator way handier way handier and you can do some nearly cool questions can you turn in your workbook please to we're gonna have to skip a long ways as it turns out mr. do it yeah give me a moment here principles math 12 copy cut myself off guard here tiny bit paste forgot to print one set of questions I think see if we're here yeah there if you can turn please to page 489 page 489 page 489 for some reason this textbook puts the binomial probability distribution in a completely different topic don't know why but it does delete all ink come on just have patience come computer responding I know you'll get the hang of it good lead all the ink come on okay we're back so on page 489 folks quiet please page 489 you can again do your standard hey box it's on the formula sheet and let's do example three together okay example three so here's some nice applications thank you here's some nice applications example three 20% of patients taking a certain migraine drug suffer side effects if the drug is given to eight patients what's the probability that at most let's all underline the word at most at most to suffer side effects to the nearest thousand how many patients are their grand total eight tree no do the odds change no if the odds changed like cards this would be bucket side effects others this is not bucket this is going to be how many patients grand total eight what's the probability that one patient has side effects point two how many patients do we want to have side effects well none but how many patients does this question want to have side effects to so you can either go eight shoes to point two to the I'm gonna use binom PDF of eight comma point two comma two what are the odds oh wait a minute that's at most to what does at most to include two or one or so here's to underneath that there's gonna be and underneath that there's gonna be now we should be able to type this in our calculator pretty quick just type the first line and go second function enter change the two to a one enter change the two to one do is your enter the handwriting is the really long part let's try it where was by known PDF do you remember the distribution second function bars down down down down down down eight comma point two comma two point two nine three six rounded off properly second function enter for one point three three five five second function enter for zero point one six seven eight what's the total what are the odds that two or less will have side effects Amy point seven nine six nine do you think a research drug company might be interested in yeah they might want to know because side effects may mean future lawsuits you can actually budget how much do we need to charge for this drug because every drug has side effects there's no such thing as a perfect drug but some drugs save more lives than they kill sad but true okay no seriously so you may be as a drug company saying look I know people from this rare obscure horrible side effects some people might die but I also know 50 million people are gonna live but we're gonna get sued how much do we need to charge for this drug so that we can cover the lawsuit we could use that to figure out the likelihood of it occurring right for me oh yeah the money behind behind patent drugs is stunning in the billions in the trillions in the trillions turn the page page 490 page 490 by the way I'm gonna go right to the tone your homework today is gonna be none because I don't think many of you do the combinatorics homework your homework is gonna be the combinatoric stuff that I assigned to the very very beginning of this okay here is your calculator okay so I said we would have this in our notes somewhere there it is now do you see how we did two or one or zero there's a better way if you want to enter more than one value for X we wanted to enter zero or one or two put those funky brackets let's go back and apparently Amy we could have done this second function enter now where are those curly brackets can you find those in yellow somewhere you know what shift normal bracket isn't it second function normal bracket and if I go zero or one or two second function curly bracket and then close off the main bracket that gives us the first value zero the second value the third value right there I don't know what did I say second function regular bracket now what if you want to add those up read what it says here if you want to add them up use the sum answer so we're using obscure stuff on our calculator command to find the sum answer command use second stat let's see second function where stat right there second function stat and if you scroll over to math option number on mine five some of all of the previous answers add them up and Amy there's the point seven nine six nine that you gave us now do you have to do it that way you can survive by writing out the answers and adding them up Brandon it works just fine to do it this way but am I a techie nerd will I show you how the tech works yep there is one more short cut I'll show you that next class next class is going to be about a 20 minute lesson a few more examples like this next class is going to be work on the binome PDF homework and then Tuesday big take-home quiz I don't see you know I do see you Thursday Friday as a pro D day and you probably test will be the week after we're in the home stretch