 Hi this is Don and I want to go over a problem that has given a number of you difficulty and a number of you have asked questions as to why technology gives you a different answer than my stat lab suggest is the correct answer. I will show you how to do this using both Excel and stat crunch because I think it's important for you to if you haven't tried stat crunch to give it a try for some of these problems. Of course if you are good with Excel and if you plan on going on to quantitative analysis business 430 or getting a master's degree then learning to do this with Excel will give you some skills that will be transferable and of course you can get access to stat crunch even after you you know finish this course if you want to use it for your stats stat crunch is a good tool to get quick answers and save you some time. So let's see how to do it with both the long way using Excel and using Excel functions as well as stat crunch. The problem is that we're given a binomial distribution here and I wish I could see that a little bit better it's very small but it won't let me expand it and it has highlighted three areas here in the binomial getting either a 6 a 7 or an 8 that's the the blue areas there in there we're given a 16 and the probability for the binomial is 0.55 remember binomial has certain characteristics let's bring up the Excel and over here in the corner I've written down the properties of the binomial experiments there are n independent trials and in this problem the trials were 16 there are two possible outcomes success or failure the probability of success is p and we're given that p is equal to 0.55 the probability of failure is q is 1 minus p and I've set up the spreadsheet to calculate that equal to 1 minus the value of p which gives us a q of 0.45 p the probability is the same free trial that's mandatory and x is the number of successes that we're interested in now the long formula for the binomial is this formula and it is equal to n factorial divided by n minus x factorial times x factorial times p raised to the x power times q raised to the n minus x power and we can calculate that using Excel and what I've done over here is set up an input area for my data and I highlighted those in blue and you just put in type in n for 16 p for 0.55 and the first value we're going to solve for is x equals 6 and then I set up the rest of the spreadsheet this solves the the long binomial formula I've calculated n minus x which just m1 minus n4 n factorial and there I use the excel function fact for factorial and you just type in fact and highlight your n value there of 16 and then I got the factorial for n minus x and also the factorial for x this is raising p to the x power which is just m2 which is p using the care sign gives us the exponential of m5 which is x again and then q n minus x done similarly and then p of x I just wrote or use these values to solve this equation m6 which is the n factorial divided by m7 which is n minus 1 times x factorial times p to the x times q to the x and we get a value of 0.075478861 and I just show all the decimal places that x is calculating in order for you to see that it's pretty consistent and the second way to do it is using the binomial distribution function in excel and it asks for x which is 6 m1 which is n the number of trials m2 which is the probability and then false when you're using the binomial distribution function you either have to put in the or cumulative which will give you everything from negative infinity up through your number or just the specific value in this case that's what we want so we use false and that gives us an identical value for the probability of p of x and in the problem at hand we need to know the probability of six which is I showed you a shorthand here if you're just entering specific values you can just type that in there six and then use the same input for the n value the p value and the fact that you want the probability distribution function value of false false and you get each of those values and we get the probability of six plus seven plus h is equal to 0.3885 which is the answer that my stat lab now just to show you here in reusing a spreadsheet I want to go back and put in seven and you can see that we get 0.13179 same answers there and if I put in eight and recalculate we get the 0.18121 same same answer so you can reuse that spreadsheet and just calculate three times and then sum those up or you can do it the way I did here okay let's look at the normal approximation and in this case we've got to check some things we have to check is n times p greater than five and is n times q greater than five if both are true then the binomial random variable that we're looking at in this problem is approximately normally distributed has a mean of mu is equal to n times p and a standard deviation sigma equal to square root of n times p times q and I've just restated the probabilities binomials let's go over here in my input area n was 16 number of trials probability is 0.55 and it calculates my q and this little section here I actually borrowed from one of my students most of this area here I changed a few things and the student had produced a spreadsheet I don't want to use his name in case he didn't want me to identify him but he did an excellent job of coming up with a way to streamline some of his calculations there and I made some minor modifications to it in this area but I use his general format and one of the things this setup he's just got using the xl to use an f statement there if s2 times s3 greater than five that's n times p I'm sorry n times p I'm sorry is greater than five which it is we get a yes is n times q greater than five we calculate that and we also get a yes can we use a normal if both of these are true we get a yes answer and then his spreadsheet calculates the mean which is n times p n times p is 8.8 rounded off and the standard deviation is the square root of n times p times q which is 1.990 and I've rounded it off again now those are the values that my stat lab comes up with too now let's look back over here for a second it's something that that this student included I don't know if he created this himself or if he found it somewhere but I I'm going to reuse it and it is similar to what I used in one of my other videos talking about how to set my profitless test if you're asked in the binomial exactly c and c would be uh a a value that we're considering then the normal approximation is equal to that value c minus 0.5 our value x that we're interested in is less is greater than that and then c plus 0.5 is greater than x in other words the note is it includes c if the wording is exactly c at most c x is less than c plus 0.5 so we're on the the right side of that plus or minus 0.5 that the approximation uses fewer than we're on the lower side of that plus or minus 0.5 at least we're on the upper side it includes c more than c it does not include c it it goes from that plus 0.5 out to right infinity so those are some things to keep in mind when you're asked these questions looking at this spreadsheet a little more closely here we have an area where we can enter in the exact value that we're interested in the number of successes which is six and we applied the continuity correction for exactly six and that goes from minus 0.5 lower that would give us 5.5 to plus 0.5 which would be 6.5 for our x1 and x2 the way I've set this up and we calculate the z value for each of those x's and there we're using the basic formula the normal distribution formula z is equal to x minus mu the mean divided by sigma and that's all I've done there is just to calculate the z for x1 and the z for x2 and once I have those values I can use the xl norm s distribution function for that z value and we use true because we want the cumulative which is the area under the normal curve from negative infinity all the way to that value of 5.5 and we get a p or an area equal to 0.0486 doing the same thing for the x2 of 6.5 we get a probability of 0.1239 and we want the area just from 5.5 to 6.5 so we need to subtract those two values and we get a probability of 0.0753 for exactly six using the normal approximation and just so we recall when we did the binomial long equation we got a value of 0.0754 so just for estimating the exact value of 6 the normal approximation is very close to the binomial all right now but in our problem we want to solve for the probability of x1 which would be 6 up to 8 and using the normal approximation we have to subtract 0.5 to be inclusive of 6 and we have to add 0.5 to be inclusive of 8 and the way this spreadsheet up if I enter 9 and we want to be less than that so that gives us a value of 8.5 for our x2 and similarly using the normal equation x minus mu sigma I get a negative 1.65831 for z for at least 6 and using my norm as distribution formula again I get a p value of 0.0486 for my 8 value we go up to 8.5 I get my z using the same formula and using the norm as distribution formula function again I get 0.4401 and thus the range that we want from 5.5 to 8.5 that area and that probability is just the difference between those two 0.4401 minus 0.0486 and that gives us a p value of 0.3915 now here's where some of the students that are troubled because my stat lab gives an answer of 0.3919 and even though I go back and review quizzes and homework to give credit they want to know why that difference and the reason is that in the my stat lab they rounded off the z value to minus 1.66 and if you use the xl norm s this the old equation there to calculate the probability of exactly minus 1.66 you get 0.0484 of all those decimals and then the my stat lab used exactly minus 0.15 and that gives you 0.04 and all those decimals and if you subtract those two numbers you get the my stat lab of 0.3919 my point being is that even though you might be concerned that you didn't get exactly what my stat lab says it's just because they usually have rounded off some place in the intermediate calculations whereas on a typical xl spreadsheet that we set up we don't round and we carry the decimals through so we'll get a little bit of a different value there but again you know when I review the quizzes and exams I would of course give credit for the 0.3915 even though my stat lab initially does not okay I want to show you how to solve this problem using stat crunch and remember in my stat lab you can usually find a link that will open up stat crunch and if you don't have to have the links it's a for some reason the links aren't there you can always go to statcrunch.com sign in using your my stat lab information and open up stat crunch okay once we have stat crunch open to we'll solve it using binomial calculator remember that's just stat calculators binomial and I'll just open up a freshman there you'll see that okay on this problem n was equal to 16 p is 0.55 and we want to use the between option for the calculator and in this case lower value is six the other value is eight to compute and we get 0.3884 if you remember when we did the exact calculation using excel we got 0.3385 which is the same answer we will get here if we round this off so that's how fast stat crunch will do this okay we're going to do this time using the normal calculator and bring up this dialog box remember our main was 8.8 our standard deviation is 1.9900 and we want the between tool our low end remember was because we're using a normal approximation 5.5 and our upper end remember was 8.5 we click on compute and we get 0.3915 which is recall exactly what we got using excel with the exact number of decimal places and that compared favorably with the mystatlab value of 3.919 so consider stat crunch once you understand the the basic normal distribution and again one of the things I like about stat crunch is it draws this sketch for you shows you that we're going from 5.5 to 8.5 where that fits on the normal distribution with our mean of 8.8 and the area under the curve is 0.3915 or approximately the same answer is 3.919 hope this helps