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.

# Example constructing and interpreting a confidence interval for p

AP.STATS:
UNC‑4 (EU)
,
UNC‑4.D (LO)
,
UNC‑4.D.1 (EK)
,
UNC‑4.D.2 (EK)

## Video transcript

we're told to della has over 500 songs on her mobile phone and she wants to estimate what proportion of the songs are by a female artist she takes a simple random sample that's what SRS stands for of 50 songs on her phone and finds that 20 of the song sampled are by a female artist based on this sample which of the following is a 99% confidence interval for the proportion of songs on her phone that are by a female artist so like always pause this video and see if you can figure it out on your own della has a library of 500 songs right over here and she's trying to figure out the proportion that are sung by a female artist she doesn't have the time to go through all 500 songs to figure out the true population proportion P so instead she takes a sample of 50 songs and is equal to 50 and from that she calculates a sample proportion which we could denote with P hat and she finds that 20 out of the 50 are sung by a female 20 out of the 50 which is the same thing is 0.4 and then she wants to construct a 99% confidence interval so before we even go about constructing the confidence interval you want to check to make sure that we're making some valid assumptions we're using a valid technique so before we actually calculate the confidence interval let's just make sure that our sampling distribution is not distorted in some way and so that we can with confidence make a confidence interval so the first condition is to make sure that your sample is truly random and they tell us that it's a simple random sample so we'll take their word for it the next condition is to assume that you're sampling and distribution of the sample proportions is approximately normal and there you want to be confident or you want to see that in your sample you have at least 10 successes in at least 10 failures well here we have 20 successes which means well 50 minus 20 we have 30 failures so both of those are more than 10 and so meets that condition and then the last condition is sometimes it'll call the independence test or the independence rule or the 10% rule if you are doing this sample with replacement so if she were to look at one song's test whether it's a female or not and then put it back in her pile and then look at another song then each of those observations would truly be independent but we don't know that in fact we'll assume that she didn't do it with replacement and so if you don't do it through a replacement you can assume rough independence for each observation of a song if this is no more than 10% of the population and so it looks like it is exactly 10% of the population so dela just squeezes through on our independence test right over there so that out of the way let's just think about what the confidence interval is going to be well it's going to be her sample proportion plus or minus there's going to be some critical value and this critical value is going to be dictated by our confidence level we want to have and then that critical value times the standard deviation of the sampling distribution of the sample proportions which we don't know and so instead of having that we use the standard error of the sample proportion and in this case it would be P hat times 1 minus P hat all of that over and our sample size all of that over 50 so what's this going to be we're gonna get P hat our sample proportion here is 0.4 plus or minus I'll save the z-star here our critical value for a little bit we're gonna use a z table for that and so we're gonna have 0.4 right over there 1 minus 0.4 is times 0.6 all of that over 50 so we can already look at some choices that look interesting here this choice and this choice both look interesting and the main thing we have to reason through is which one has a correct critical value do we want to go 1.96 standard errors above and below our sample proportion or do we want to go to point 5 7 6 standard errors above and below our sample proportion and the key is the 99% confidence level now if we have a 99% confidence level one way to think about it is so let me just do my best shot at drawing a normal distribution here and so if you want a 99% confidence level that means you want to contain the 99% the middle 99% under the curve right over here that area and so if this is 99% then this right over here is going to be 0.5% and this right over here is 0.5% we want the z value that's going to leave 0.5% above it and so that's actually going to be 99.5 percent is what we want to look up on the table and that's because many Z tables including the one that you might see on something like an AP stats exam they will have the area up to an including up to an including a certain value and so they're not going to leave this free right over here so let's just look up 99.5% on our Z table all right so let me move this down so you can see it alright that's our Z table let's see we're at 99 point okay it's gonna be right in this area right over here and so that is two point five looks like two point five seven or two point five two point five eight around that and so this right over here is about two point five seven it's between two point five seven and two point five eight which gives us enough and form information to answer this question it's definitely not going to be this one right over here we have two point five seven six which is indeed between two point five seven and two point five eight so let's remind ourselves we've been able to construct our confidence interval right over here and but what does that actually mean that means that if we were to repeatedly take samples of size 50 and repeatedly use this technique to construct confidence intervals that roughly 99% of those intervals constructed this way are going to contain our true population parameter