If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content
Current time:0:00Total duration:7:42

Sample size for a given margin of error for a mean

AP.STATS:
UNC‑4 (EU)
,
UNC‑4.U (LO)

Video transcript

Nadia wants to create a confidence interval to estimate the mean driving range for her company's new electric vehicle she wants the margin of error to be no more than 10 kilometers at a 90 percent level of confidence a pilot study suggests that the driving range is for this type of vehicle have a standard deviation of 15 kilometers which of these is the smallest approximate sample size required to obtain the desired margin of error so pause this video and see if you can think about this on your own so the traditional way that we would construct a margin of error and a confidence interval we take a sample and from that sample we construct the mean and then we add or subtract a margin of error around that to construct the confidence interval and the way that we've done that since we're dealing with means is we say alright if we don't know the standard deviation of the population it's appropriate to use the t statistic so our critical value we'd to notice T star and you'd multiply that times the sample standard deviation divided by the square root of your sample size now this question is all about what is an appropriate sample size given that we want to have a 90% level of confidence and what's tricky here is when you're using a t-table right over here not only do you need to know the 90% level of confidence you also need to know the degrees of freedom and the degrees of freedom is going to be n minus 1 but we don't know what that's going to be without knowing n so how would we determine an N similarly you don't know what your sample standard deviation is going to be until you actually take some samples so instead of that well we could think about we know that another legitimate way to construct a confidence interval and the margin of error is to say alright I can take my sample mean and I can add or subtract a z-score a critical value and this time use the Z table where if I multiply that times the true population standard deviation and divide that by the square root of n now you might say well I don't know the true population standard deviation but they tell us a pilot study suggests that the driving range is for this type of vehicle have a standard deviation of 15 kilometers so we could use this as an estimate of our true population standard deviation so this is 15 kilometers right over here and then the good thing about a Z table is you don't have to think about degrees of freedom you could just look up your confidence interval and so then we could just say that look Z star times 15 kilometers over our square root of n this right over here is our margin of error this right over here is our margin of error that has to be no more than 10 kilometers so that has to be less than or equal to 10 and we can figure out what the Z star needs to be for a 90% confidence level and so then we just solve for n so let's do that now to figure out Z star I could use the Z table but just for a diversity of methodology let's use a a calculator here so to figure out the Z value that would give us a 90% confidence interval I can use a function called inverse norm and you can see that right over here that's choice 3 let me just select that and what it'll do is you give it the area that you want under a normal curve you can even specify the mean and the standard deviation although you want the mean to be zero and the standard deviation to be 1 if you really want to fight figure out a z-score here and so what it'll do is it will give you the z-score that will give you that corresponding area and so I want and actually it's already selected that I want the center area to be 90% so I could say 0.9 right over here if I use the left tail then that means if I have 90% of the center that means I would have 5% it either tails instead of doing it 0.9 and center I could have done Oh point O 5 and used the left tail or used 0.05 and use the right tail but this is exactly what I want so let me just go and paste this and so this should give me the appropriate z value so there you go if I want this middle 90% the center 90% I have to go one point roughly one point six four five standard deviations below the mean and that same amount above the mean so it's roughly our critical value here is approximately one point six let's just say one point six four five so we have one point six four five times times fifteen over the square root of n it's going to be less than or equal to ten and so now there's a couple of ways that you could do this we could do a little bit of algebra to simplify this inequality I encourage you to do so or you could even try out some values here and see which of these ends would make this true and we want the smallest possible one I'll do it the algebraic way because if you're actually doing this in the real world now they would not have a multiple choice right over here she'd have to figure out the sample size in order to conduct your study so let's do that so let's see if I divide both sides by one point six four five and 15 what do I get I get one over the square root of n is less than or equal to 10 over one point six four five over over fifteen and then if I take the reciprocal of both sides I get the square root of n is greater than or equal to from taking the reciprocal of both sides and so this is going to be one point six four five times 15 times 15 all of that over ten all of that over ten see fifteen over ten is just one point five so let me just write that as one point five right over here and then if I square both sides I would get that n needs to be greater than or equal to one point six four five x times one point five and then all of that squared I just squared both sides all of that squared and so let's get our calculator back we are going to have one point six four five times 1.5 and then we want to square it and we get six point approximately six point zero six point zero nine so n has to be greater than or equal to six point zero nine and of course our sample size needs to actually be a whole number so what's the smallest whole number that is larger than six point zero nine well that's going to be seven so that would be this choice right over here this is the smallest approximate sample size required to obtain the desired margin of error and of course we won't really really know until we actually conducted the study we obviously here use an estimate of the population standard deviation we used and we used a Z table but it will be interesting when not the actually conducts the study to see if our margin of error is indeed no more than ten kilometers with a ninety percent level of confidence
AP® is a registered trademark of the College Board, which has not reviewed this resource.