4 Sample estimates and confidence intervals
4.1 How much caffeine is in your coffee?
The table below contains data on the amount of caffeine in a 16 oz. cup of coffee obtained from various vendors. For context, doses of caffeine over 25 mg are enough to increase anxiety in some people, and doses over 300 to 360 mg are enough to significantly increase heart rate in most people. A can of Red Bull contains 80mg of caffeine.
You can copy the data by clicking the “Copy” button. After you click the copy button, go to Google Drive and create a new google sheet. Paste the data into the google sheet and then download it as a CSV. To do this, follow the directions in Lab 3 Section 3.2.2 Creating a data file. Work all the way through the steps including uploading your new data to Posit Cloud
Read the data into an R session in Posit Cloud and use those data to answer the following questions.
What is the mean amount of caffeine in the sample of 16 oz. coffees? Round your answer to an appropriate digit. [1 point]
What is the 95% confidence interval for the mean? Use the 2 SE rule and round your answer to an appropriate digit. Report your answer like “lower - upper”. For example, if the confidence interval were -1.1 to 2.1, then I would report “-1.1, - 2.1”. [1 point]
Is the amount of caffeine in a cup of coffee relatively consistent from one vendor to another? To help answer that, calculate the standard deviation of caffeine level and round your answer to an appropriate digit. [1 point]
The table below has data on six 16 oz. cups of Breakfast Blend coffee sampled on six different days from a Starbucks location. Calculate the the 95% confidence interval for the mean using the 2 SE rule for these data. Report your answer in the same format as Question 2. [1 point]
Compare these results to the data taken on the broader sample of vendors in the first file. Describe the difference in 1-2 sentences. [2 point]
Calculate the approximate 99% confidence interval for the mean caffeine level in the first table by using 2.5 SE’s rather than 2 SE. Again, round your answer to an appropriate digit and report your answer in the same format as Question 2 and 4. [1 point]
Compare the 99% confidence interval calculated in Question 6 to the 95% confidence interval you calculate in question 2. Which confidence interval is wider (i.e., spans a broader range) and why? [1 point]
Based on the two data sets above (Multiple brands and Starbucks), which of the figures below depicts the mean caffeine concentration with error bars equal to \(\pm\) 1 standard error of the mean? [1 point]
4.2 Understanding confidence intervals
The figure below shows sample means (points) and associated confidence intervals of the mean (horizontal lines) from 100 different samples of the same population. In each case, the sample size is exactly \(n = 16\). Assume that all samples were conducted using an identical procedure.
83 of 100 have confidence intervals that overlap the true population mean (vertical black line). These are shown with black points and lines. 17 of 100 have confidence intervals that do not overlap the true population mean (vertical black line). These are shown with red points and lines.
- Which of the following statements most likely explains what you observe in this figure? [1 point]
- These are 95% confidence intervals from 100 random samples
- These are 95% confidence intervals from 100 nonrandom samples
- These are 95% confidence intervals but some confidence intervals do not overlap the population mean because the sample size is too small
- These are 95% confidence intervals but but some confidence intervals do not overlap the population mean because the samples are biased