




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





Recall that we are trying to estimate the center of a population 𝜇 using the most obvious piece of information we can acquire, the sample mean 𝑥 , but moving a step further and making a statement about the quality of our estimate. Another way of thinking about what we are doing is the following: you’ve probably seen contests where you need to guess the number of jelly beans in a jar. If you must guess exactly the correct number of beans you will probably loose. If I let you be within 100 beans, you have a better chance. If I let you be within 500 beans you have a terrific chance.
Similarly, suppose you have been teaching an SAT preparation course and would like to demonstrate that you “add value” to your students’ math scores. Let’s assume that the population of such scores has a standard deviation of 𝜎𝑆𝐴𝑇 = 100. If you randomly select 50 students who have taken your course, can you estimate with a confidence interval the average (or population mean 𝜇𝑆𝐴𝑇 ) for all the students who have taken your course?
More formally, construct 90%, 95%, and 99% confidence intervals for 𝜇𝑆𝐴𝑇 if your sample is of size 𝑛 = 50 has a sample mean of 𝑥 = 530.
The 90% CI
We recall our formula
𝑥 − 𝑧𝑐 𝜎^ 𝑛 < 𝜇𝑆𝐴𝑇 < 𝑥 + 𝑧𝑐 𝜎^ 𝑛
And now gather our terms: 𝑥 = 530, 𝑛 = 50 , and 𝜎 = 100.
530 − 𝑧𝑐 100 50 < 𝜇𝑆𝐴𝑇 < 530 + 𝑧𝑐 (^10050)
We also had a table telling us what 𝑧𝑐 value to use for the different levels of confidence.
Level of Confidence 𝑧𝑐 90% 1. 95% 1. 99% 2.
Now substitute into the formula to get
If you take 500 as the average score for students who haven’t taken your course, it would seem that you might be adding value. After all, the sample mean is elevated over
Before I spend money on your course I would like to be a little more confident that your course adds value, so I use your data to construct the 95% CI.
𝑥 − 𝑧𝑐 𝜎^ 𝑛 < 𝜇𝑆𝐴𝑇 < 𝑥 + 𝑧𝑐 𝜎^ 𝑛
Since we wanted to be more confident of finding 𝜇 we looked a little farther out and constructed a somewhat wider interval.
If we keep 𝑛 = 50 and 𝜎 = 100 then we have 𝐸 = 𝑧𝑐 𝜎^ 𝑛 20 = 1. (^96 100) 𝑛
And so solve for sample size, 𝑛:
𝑛 = 1.^9620
𝑛 = 1.96 20 ∗^100
2
𝑛 = 96.
So, if you want to estimate 𝜇 and be 95% confident that you will be within 20 points, your sample size must be at least 96.04. It’s hard to find a fractional person, so we take 𝑛 = 97.
It’s a little silly to repeat this algebra each time we need to find a sample size, so develop a general formula:
𝐸 = 𝑧𝑐 𝜎^ 𝑛
2
You should think about this formula when you are designing a data collection scheme. There’s nothing worse than going through all the work and spending all the money to perform a study only to find out at the end that your sample size wasn’t large enough to give you meaningful data.
Sometimes we know how spread out a population is and just want to see where it is centered, i.e. we know 𝜎 and want to estimate 𝜇. This is often the case when we are working in an established area.
If you don’t know 𝜎 you can “get by” by taking a large enough sample (𝑛 ≥ 30 ) and still use the z-table.
Suppose you don’t know 𝜎 and there is no way you can get a large sample. Sometimes, for example in a medical study, you are studying a rare condition. Or, each data point may be expensive (I’ve spoken with people who spent over $1 million per data point). What do you do now?
Notice also that as you sample size gets bigger, the Student-t approaches a normal (z) distribution. That’s why for 𝑛 ≥ 30 we can use a z table.
Here’s a quick example. In the interests of science (and privacy) I planted some trees this summer. Here are their heights “out of the box”
19.50 19.00 21.00 28.00 22.00 23.00 21.50 19.00 17.00 18. 22.00 18.00 18.00 18.00 19.00 21.00 20.00 18.00 16.00 18. 22.00 20.00 18.00 17.00 18.00 22.00 16.00 22.00 19.00 18.
If I suppose this to be a simple random sample of trees back at the nursery (doubtful!) and that the lengths of saplings is normally distributed, how can I construct a 95% confidence interval for the average tree height 𝜇𝑇𝑅𝐸𝐸 back at the nursery?
(^0) -5 0 5
Student t with df= t z
(^0) -5 0 5
Student t with df= t z
(^0) -5 0 5
Student t with df= t z
(^0) -5 0 5
Student t with df= t z
Using Excel, verify that their mean height is 𝑥 = 19.6 and the sample standard deviation is 𝑠 = 2.509980. If we manipulate the 𝑡 formula the same way we did for the 𝑧 we get the following: formula for a confidence interval:
𝑥 ∓ 𝑡𝑐 𝑠^ 𝑛
Substitute as follows: 𝑥 − 𝑡𝑐 𝑠^ 𝑛 < 𝜇𝑇𝑅𝐸𝐸 < 𝑥 + 𝑡𝑐 𝑠^ 𝑛
What should we use for 𝑡𝑐?
Find your table called “Critical Values for Student’s t Distribution”. You can see a column labeled df. Since our sample size is 𝑛 = 30 we have our degrees of freedom 𝑑𝑓 = 30 − 1 = 29. This tells us which row to look along. We use this table for multiple values. You are looking for the 𝑡𝑐 critical value, so look along the row on top labeled c and find the column for the 95% confidence interval (0.95). So, along row 𝑑𝑓 = 29 and column 𝑐 = 0.95 I find the critical value 𝑡𝑐 = 2.045. Thus
That is, I am 95% confident that the average size of a sampling back at the nursery is between 18.662” and 20.5371”. You may have noticed a slight problem. The saplings all have roughly the same length, except for one which is 28” tall. We have to be careful how we treat “unusual numbers”. For now just suppose that we eliminate that troublesome plant. This brings us to another potential presentation problem. Compute the 99% confidence interval for the 29 remaining plant heights when we just drop the plant with height 28”.