Confidence Intervals for Means and Proportions Point estimates Margins of Error Estimation for the average of a population ( known) Estimation for the average of a population ( unknown) Estimation for the proportion of successes in a population Determining sample size Purpose: To show the calculations for margins of error and confidence intervals for parameters, see fourth Building Block of the course. 1. Point Estimates For population average use sample average For population proportion use sample proportion 2. Margins of Error Knowledge – inversely related Variability – directly related Confidence – directly related 3. Estimation for the average of a population ( known) 3.1 Requirements Simple random sample The sample size is large or sampling from a normal known 3.2 Margin of error Knowledge –sample size Variance – population variance Confidence – related to empirical rule Margin of error Standard normal table value times the population standard deviation divided by square root of n 3.3 Estimate sample mean plus or minus the margin of error xz n 3.4 Example: Suppose from a random sample of size 49, we find a sample mean of $30. It is known that the typical distance a value is from the population (standard deviation) is $35. What is the population mean with 95% confidence? Solution: First calculate the typical error in a sample mean. This is value is $35 divided by the square root of 49 = $5. Therefore when using this sample mean the typical error you would expect is plus or minus five dollars. Next determine how far you have to go either side of the sample mean for the specified confidence. With 95% confidence you have to go 1.96 standard errors (1.96*5=$9.8) either side of the sample mean to have 95% confidence that the population mean is within the interval. xz n $30 1.96 $35 $30 1.96 $5 3$0 $9.8 49 With 95% confidence we can say that the population mean is $30 with a maximum possible error of $9.80 For other examples, double click the embedded Excel file below. Scroll down to see solution. Press F9 to see another example. Estimate the mean age of all buyers with 98% confidence. After collecting a random sample of 6 buyers you find a sample mean of 35. Assume distribution of age for all buyers is normal with a standard deviation of 3. If the embedded Excel file does not work, then click on the following link http://wweb.uta.edu/faculty/eakin/busa3321/zconint.xls Exercise: Using Internet Explorer answer the questions on the following web page. You may attempt this many times using the Back command in Internet Explorer.. (The page keeps track of the number of attempts.) Print the page when successful and bring it to class next time. http://wweb.uta.edu/faculty/eakin/asps/examples/ZConfIntForMuQues.asp 4. Estimate of the population average ( unknown) 4.1 Requirements Simple random sample Sampling from a normal 4.2 Margin of error Knowledge – sample size Variance – sample variance Confidence – similar to empirical rule but using a different table in book Margin of error t table value times the sample standard deviation divided by the square root of n Found in Excel by choosing Confidence Level in Descriptive statistics 4.3 t-table columns are areas to the right of a number rows are degrees of freedom (n-1 in this chapter) values are the number of standard deviations for given confidence Example How many standard errors away from the mean will you have to go to have confidence 90% (use 0.05 column) if n = 10 4.4 Estimate sample mean plus or minus the margin of error 4.5 Example: You wish to estimate the average number of housing starts in all large cities in the United States. You have a random sample of 25 cities and obtain the number of housing starts in each. The sample mean is 525 with a sample standard deviation of 40. Solution: Identifier: “What is (or estimate) the population mean?” First calculate the typical error in a sample mean. This is value is 40 divided by the square root of 25 = 8. Therefore when using this sample mean the typical error you would expect is estimated to be eight. Next determine how far you have to go either side of the sample mean for the specified confidence. With 95% confidence and 24 degrees of freedom, you have to go 2.064 standard errors (2.064*8 = 16.512) or 16.512 either side of the sample mean to have 95% confidence that the population mean is within the interval. s 40 x t n 1 525 2.064 525 2.064 8 525 16.512 25 n Next make a conclusion about what you found: With 95% confidence we can say that average number of housing starts in all cities of interest is 525 with a maximum possible error of 16.512 For other examples, double click the embedded Excel file below. Scroll down to see solution. Press F9 to see another example. Estimate the mean mpg of all cars with 90% confidence. After collecting a random sample of 30 cars you find a sample mean of 34 and a sample standard deviation of 4. Assume the distribution of mpg for all cars is normal. If the embedded Excel file does not work, then click on the following link http://wweb.uta.edu/faculty/eakin/busa3321/tconInt.xls Exercise: Using Internet Explorer answer the questions on the following web page. You may attempt this many times using the Back command in Internet Explorer.. (The page keeps track of the number of attempts.) Print the page when successful and bring it to class next time. http://wweb.uta.edu/faculty/eakin/asps/examples/tConfIntForMuQues.asp 5. Estimate of the population proportion 5.1 Requirements Simple random sample n is large enough so that in the sample you have 5 successes and 5 failures 5.2 Margin of error Knowledge – sample size Variance – sample proportion of successes times (1-sample proportion) Confidence – use z table if n is large enough Margin of error – Standard normal table value times the square root of the sample proportion (1 – the sample proportion) divided by n 5.3 The confidence interval estimate is the sample proportion plus or minus the margin of error p̂ Z p̂(1 p̂) n 5.4 Example: You take a random sample of size 25 students and find the 5 who understand this lecture. With 98% confidence, what is the estimate of the proportion of all students who hear this lecture and understand it? Identifier: “What is (or estimate) the population proportion?” First, if not given, calculate the sample proportion. In this example 5 of 25 understood the lecture. The sample proportion is then 5/25 = 0.20 Second, calculate the estimate of the typical error in a sample proportion. This is the square root of the sample proportion times (1- the sample proportion) divided by the sample size. In this case it is the square root of (0.20*0.80/25) = the square root of 0.0064 = 0.08. Therefore, when using this sample proportion, the typical error you would expect is estimated to be 0.08. Third step, determine if you can use the normal table. The requirement is that the number of successes and number of failures must both be five or greater. In this example, you find 5 who understand and 20 who do not. Therefore you can use the normal table. Fourth, determine how far you have to go either side of the sample mean for the specified confidence. With 95% confidence, you have to go 1.96 standard errors (1.96*0.08=0.1568) or 0.1568 either side of the sample proportion to have 95% confidence that the population proportion is within the interval. p̂ z p̂(1 p̂) 0.20(1 0.20) 0.20 1.96 0.20 1.96 0.08 0.20 0.1568 n 25 Finally make a conclusion about what you found: With 95% confidence we can say that the proportion of all students who hear this lecture and understand it 20% with a maximum possible error of 15.68% For other examples, double click on the embedded Excel file below. Estimate the proportion of all highway trips with 98% confidence. After collecting a random sample of 17 trips you that 53% of these are highway trips. Or go to the following link: http://wweb.uta.edu/faculty/eakin/busa3321/zConIntForP.xls Exercise: Using Internet Explorer answer the questions on the following web page. You may attempt this many times using the Back command in Internet Explorer.. (The page keeps track of the number of attempts.) Print the page when successful and bring it to class next time. http://wweb.uta.edu/faculty/eakin/asps/examples/zConfIntForPiQues.asp 6. Sample size needed for a given margin of error The more you know the smaller the margin of error Solve for n knowing confidence, standard deviation and margin of error When rounding, always round your estimate of n UP to the nearest integer. 6.1 Sample size when estimating population mean n Z 2 2 e2 6.2 Sample size when estimating population proportion n Z 2 p(1 p) e2 for p use either p from a previous study or 0.50 if not known 6.3 Examples: 6.3.1 What is the sample size needed to estimate the population average to within $0.50 when the confidence is 98% and population variance is $25 n Z 2 2 2.33 2 (25) 542.89 e2 (0.50) 2 which rounds up to 543. Additional exercises: http://wweb.uta.edu/faculty/eakin/busa3321/SampleSizeForMu.xls 6.3.2 What is the sample size needed to estimate the population proportion to within 3% when the confidence is 95%. No prior information on is available. n Z 2 p(1 p) 1.96 2 (0.50)(1 0.50) 1067 .1 e2 (0.03) 2 which rounds up to 1068. Additional examples found at http://wweb.uta.edu/faculty/eakin/busa3321/SampleSizeForPi.xls