Hello and welcome back, so we've talked about confidence intervals as being a best estimate plus or minus our margin of error. And today we're going to do the same thing, expect now we're going to look at a conservative approach. Which is where we play a little bit safer and have a bigger margin of error than what we typically we would use. And then with that, we can come up with a sample size consideration. So, we can vary how wide or how narrow our confidence interval will be based off our sample size. So we're going to start where we usually start with confidence intervals of being a best estimate, plus or minus our margin of error. Now, just to reiterate, our margin of error is a few estimated standard errors, where that a few is a multiplier, and we multiply that by our estimated standard error of our best estimate. For a one proportion case at the 95% level, it would look something like this of p hat plus or minus 1.96. So the 1.96 is the a few we have, and we multiply that by the estimated standard error of p hat being the square root of p hat times (1- p hat) over n. So in a previous example we had looked at the Motts Car Seat example, which is where Motts Children Hospital took a sample of 659 parents with a toddler, 540 of those or 85% stated they use a car seat for all travel with their toddler. With this background, we're able to come up with p hat of 0.85, we had a sample size of 659, and then we plug all this in and se ended up getting a confidence interval of 0.823 to 0.877. So this is where we believe our parameter of p to be. How we're going to change this up is by looking at the estimated standard error here. Because we're using p hat to come up with our standard estimated error. So maybe a question we would ask ourself is, what if p is not accurate? Maybe we didn't do a good enough job of making a random sample. Because of this question, sometimes you want to maximize the estimated standard error, and how is it done, is by plugging in p hat of 0.5. So at p-hat of 0.5, we would have 0.5 times 0.5 divided by n, all underneath a square root. So it's like 0.5 squared, or one-half, so the one-half comes out of the square root. And we end up with just the conservative standard error of 1/2 times the square root of n. Having this new standard error, we can use it to again calculate our confidence intervals. Instead of using the above estimated standard error, we're going to now use this conservative standard error. So here we're back to the Motts Car Seat example, where we still have a p hat of 0.85 and a sample size of 659. But now I'm using my estimated conservative standard of 1/2 times the square root of n. You'll also notice that here I chose to use 2 as my a few for the 95% level, just because I get a nice cancellation between my 2s here. So really it boils down to my confidence interval is just p hat plus or minus 1 over the square root of n. So our margin of error is only dependent on the sample size, which is a very, very nice thing to have. It allows us to vary our confidence interval with just by changing a sample size. Having this new formula for a conservative confidence interval, because we're using the conservative standard error, we're making a conservative confidence interval. We can calculate it all out, and we get a 95% confidence interval with a 4% margin of error, so that is 0.81 to 0.89. So again this is a wider interval than what we just previously saw, which it should be because we maximized our margin of error. So what we could talk about with our margin of error is that, and it's only dependent on two things, one of those is the confidence level. So that's the a few, where we typically have a 95% which leads to 1.96 or 2 being that z multiplier, and our sample size. So we've usually picked out a confidence interval before we begin, and then we also want to pick out a sample size. So let's say that now what sample size would we need to have a 95% conservative confidence interval with a margin error of only 3%. So we're able to minimize our margin of error to something more reasonable. So in the previous example we had 4%, now we're trying make it a little bit more snug, and get only a 3% margin of error. So we're estimating our parameter better, and we do that by varying our sample size. So going back to our margin or error for the 95% level, we just had 1 over the square root of n. So I can solve for n here and get n is equal to 1 over the margin of error, or MoE and square that, and we wanted a margin of error 3%. Plugging in that margin of error, we get 1/0.03 squared, which gives us a sample size of 1,111.11. Now you can't have a fraction of a person, so what we do is we always around this number up because we want to have at most a 3% margin of error. So the larger sample size is, the smaller your margin of error should be, so we round this number up. And we say n should be greater than or equal to 1,112 to obtain at most, a 3% margin of error. Now, what if we instead wanted to look at a 99% confidence interval instead of our typical 95%, when still wanting a 3% margin of error. So what we can do here is look at our margin of error which again is just the right hand side and we have Z* times 1/2 times the square root of n. So the Z* here is our a few that we typically say, and then the estimated standard error, or the conservative standard error, is 1/2 times the square root of n. Again, there it is reiterated, we have a nice equation, we can solve for n with this, and we get, doing the algebra out, n = Z*/2 times the margin of error squared. Using this, we can actually calculate what sample size we would need to have a 3% margin of error. So to find 3% margin of error at the 99% confidence level, we're just going to use our sample size equation here, Z*/2 times the margin of error squared. We have looking up at a table or Googling, we would have a Z* of 2.576 at the 99% level, and we want a margin of error 3% or point 0.03. Plugging in all these numbers, we would get n equaling 1,843.27, again we're not done yet, we want to round this number up always. Because we can't have a fraction of a person, and we to make sure that we get at most 3% margin of error, so we round up and say n is greater than or equal to 1844. To summarize what we've talked about in today's lecture, we looked at the estimated standard error a little bit more in depth and sometimes it could be too small inaccurate based off our sample. So we employ the conservative approach which again is us maximizing our standard error by setting p hat equal to 0.5 in a standard error equation. With that conservative approach, we can determine a sample size based off our confidence level and a desired margin of error. So with any confidence level you can look up your Z* multiplier, the a few and with a desired margin of error which often times is 3% for clinical trials. You can plug all those numbers in and get a sample size that you would want to obtain for your research.