4. Confidence Intervals

Learning objectives (and summaries)

Estimate population parameters with a confidence interval using simulation.

    • Understand that a sampling distribution is a collection of many possible statistics

    • For example, it is a bunch of means of different samples thrown in one histogram together. Not all sample means are the same.

    • The main reason we care about this is to see how spread apart the different possible means are from each other. This helps us make confidence intervals.

    • Understand the purpose of a confidence interval

    • To give a clearer prediction of the parameter (the mean or proportion of the population). A single number says little about the precision of the guess, but 95% confidence that the mean is between 12.2" and 15.8" is much more informative.

    • Understand the importance of an unbiased sample as the basis for a confidence interval

    • A statistic from an unbiased sample is just as likely to be too high as it is to be too low. An SRS with low undercoverage, low non-response, and properly worded questions should produce an unbiased sample.

    • Biased samples push a statistic one direction and make all of our calculations or simulations pointless. Voluntary or convenience samples will often produce biased (bad) data.

  • Understand that most estimates will never be checked to prove that they are "correct"

    • The reason we use statistics and intervals is that it takes too long / costs too much / isn't possible to do a census, so there is no way to check and see if we're right. As long as our methods and calculations are right, we just have to trust them and hope for the best.

    • Use bootstrap simulation to predict a confidence interval for means

    • Use the StatKey simulator with a set of sample numbers and thousands of resamples to create a simulated sampling distribution. Use this to identify the ___% confidence interval of the population mean.

    • Use bootstrap simulation to predict a confidence interval for proportions

    • Use the StatKey simulator with a set of sample values (2 option categorical data) and use thousands of resamples to create a simulated sampling distribution. Use this to identify the the ___% confidence interval of the population proportion.

  • Understand that confidence level and margin of error are a trade-off

    • You can gain confidence in your estimate (such as going from 90% to 99%) by making the interval wider (more possible correct guesses), and vice versa.

    • Convert between interval and ± forms of confidence intervals

    • For example, 12.2% to 15.8% can be rewritten as 14% ± 1.8%. The second form is often nicer to read since you can see the middle estimate (14%) and the margin of error (1.8%).

    • Recognize the term after the ± as the margin of error

    • It is how much your confidence interval goes above and below your statistic (middle estimate).

    • Communicate a confidence interval in a sentence

    • CI of means: I am _(__)_% confident that the average _(_____)_ of _(_____)_ is between _(___)_ and _(___)_.

    • For example: I am 95% confident that the average weight of dogs in Minnesota is between 17lbs and 26lbs.

    • CI of proportions: I am _(__)_% confident that the proportion of _(_____)_ who/that_(_____)_ is between _(___)% and _(___)%.

    • For example: I am 90% confident that the proportion of people in Byron who drink milk weekly or more is between 78% and 86%.

Assessment (x core points)

    • Test (11pts): 8 questions (2 T/F, 1 MC, 3 numeric, 2 sentences); 1 of these free response questions (3pts):

      • Explain why confidence intervals get smaller as the size of your sample goes up.

      • The "__% confident" statement is only true under certain conditions. What are these conditions? Why would your true confidence go down if these conditions are not met?

      • Describe the trade-off of confidence level and interval size. Where is the right balance in different situations?

Instruction

Printable guided notes: version 1, version 2, PDF

For more material from the New Zealand lady (Dr. Nic), check out this page.

Vocabulary

bootstrapping- Used to find hypothesis tests and confidence intervals; it takes your set of data and uses it as the population and uses it to do a bunch of tests so that you get more results

Practice

1. A group of students decided to track the average number of touches by both teams in each point in volleyball games in the HVL this year. They did an SRS of which games to watch and then used systematic sampling to decide which plays to record data about. The list of values, in number of touches: 4, 3, 17, 12, 1, 19, 7, 26, 7, 3, 9, 15, 28, 11, 7, 3, 13, 8. [Copyto StatKey from here.]

  • a. Are the sampling conditions met so that we can actually perform a meaningful confidence interval?

  • b. What is the population that we're studying?

  • c. What is the variable that we're studying? Is it quantitative or categorical? Is it summarized with a mean or a proportion?

  • d. Copy the data into StatKey and perform the appropriate type of confidence interval at 95% confidence using at least 1000 bootstrap samples. What is your interval?

  • e. Explain all that you just found in a sentence.

  • f. Rewrite your interval in +/- form.

  • g. Explain your findings in a sentence using the +/- form of the interval.

  • h. Did your interval capture the true mean/proportion of your population? How would you check?

2. A study was conducted on Minecraft players between the ages of 12 and 18 to ask whether they thought the game would be appropriate to use in school as an educational tool. The makers of the game did a SRS of 52 registered players. 40 of the 52 said yes, while the rest said no.

  • a. Are the sampling conditions met so that we can actually perform a meaningful confidence interval?

  • b. What is the population that we're studying?

  • c. What is the variable that we're studying? Is it quantitative or categorical? Is it summarized with a mean or a proportion?

  • d. Copy the data into StatKey and perform the appropriate type of confidence interval at 99% confidence using at least 1000 bootstrap samples. What is your interval?

  • e. Explain all that you just found in a sentence.

  • f. Rewrite your interval in +/- form.

  • g. Explain your findings in a sentence using the +/- form of the interval.

  • h. If you performed 100 samples and created a 99% confidence interval for each, then there will always be one that does not contain the true mean/proportion. True or false, and why?

3. Marketplace wanted to measure the proportion of customers that bought chips from a new display they put up in the store. To do so, they randomly selected time intervals over a week-long period where somebody watched the display and counted the number of customers that walked past and the number who grabbed something from the display. When the data was compiled, 158 of 783 customers grabbed something.

  • a. Are the sampling conditions met so that we can actually perform a meaningful confidence interval?

  • b. What is the population that we're studying?

  • c. What is the variable that we're studying? Is it quantitative or categorical? Is it summarized with a mean or a proportion?

  • d. Copy the data into StatKey and perform the appropriate type of confidence interval at 90% confidence using at least 1000 bootstrap samples. What is your interval?

  • e. Explain all that you just found in a sentence.

  • f. Rewrite your interval in +/- form.

  • g. Explain your findings in a sentence using the +/- form of the interval.

Practice solutions

1. Volleyball touches

  • a. Yes -- SRS and systematic sampling are good, random techniques

  • b. Volleyball games in the HVL

  • c. Number of touches per play. This is a quantitative variable, so we're looking of the mean.

  • d. 7.44 to 14.44

  • e. I'm 95% confident that the average number of touches per play at HVL volleyball games is between 7.44 and 14.44 touches.

  • f. 10.94 ± 3.5 (work below)

    • Middle: (14.444 + 7.44 )/2 = 10.94

    • Margin of error: (14.444 - 7.44 )/2 = 3.5

  • g. I'm 95% confident that the average number of touches per play at HVL volleyball games is 10.94 ± 3.5 touches.

  • h. Who knows? The only way to check a confidence interval is to do a census -- track EVERY play of every conference game. If we had time to do that we wouldn't bother with confidence intervals, so you just have to trust that stats works at there is a 95% chance that we got it right.

2. Minecraft for education

  • a. Yes -- SRS

  • b. Minecraft players 12-18

  • c. If the player thinks the game would be appropriate in school as an educational tool. This is a 2-option categorical variable, so we can summarize with a proportion.

  • d. 0.596 to 0.904 (59.6% to 90.4%) -- if you're getting something different, don't forget to convert to a 99% confidence interval.

  • e. I'm 99% confident that the proportion of Minecraft players ages 12-18 that think the game would be appropriate in school as an educational tool is between 59.6% and 90.4%.

  • f. 0.700 ± 0.154 or 70.0% ± 15.4% (work below)

    • Middle: (.596 + .904)/2 = 0.700

    • Margin of error: (.904 - .596 )/2 = 0.154

  • g. I'm 99% confident that the proportion of Minecraft players ages 12-18 that think the game would be appropriate in school as an educational tool is 70.0% ± 15.4%.

  • h. False -- we expect 1, but there could easily be 0, or 2, or some other number. The problem with probability is that it only tells us what to expect -- there are no guarantees.

3. Marketplace chips

  • a. Yes -- SRS of time slots

  • b. Marketplace customers that walk by the chips

  • c. If the customer takes a bag of chips or not.

  • d. 0.179 to 0.226 (17.9% to 22.6%)

  • e. I'm 90% confident that the proportion of Marketplace customers who walk by the chips that actually take the chips is between 17.9% and 22.6%.

  • f. 0.202 ± 0.024 (20.2% ± 2.4%)

    • Middle: (0.179 +0.226)/2 = 0.700

    • Margin of error: (0.226 - 0.179)/2 = 0.024

  • g. I'm 90% confident that the proportion of Marketplace customers who walk by the chips that actually take the chips is 20.2% ± 2.4%.

Other Practice Problems and Solutions

1. A group of players decide to track the average number of goals in each soccer game in the state this year. They did an SRS of which games to watch and then used systematic sampling to decide which teams to record data about. The list of values, in number of goals: 2, 4, 3, 1, 6, 3, 9, 2, 3, 5, 2, 5, 1, 2, 1, 4. (Use StatKey)

a. Are the sampling conditions met so that we can actually perform a meaningful confidence interval?

b. What is the population?

c. What is the variable? Is it categorical or quantitative? mean or proportion?

d. Use StatKey and perform the appropriate type of confidence interval at 95% confidence using at least 1000 bootstrap samples. What is your interval?

e. Explain all that you just found in a sentence.

f. Rewrite your interval in +/- form.

g. Did your interval capture the true mean/proportion of your population? How would you check?

2. A study was presented on soccer players between the ages of 14 and 18 to ask whether they would rather play soccer in the spring rather than the fall. The school did a SRS of 54 players. 31 of the 54 players said no, while the others said yes.

a. Are the sampling conditions met?

b. Population?

c. Variable? Quantitative or categorical? Mean or proportion?

d. Use StatKey and perform the right type of confidence interval at 99% confidence using at least 1000 samples. What is your interval?

e. Explain all you just found in a sentence.

f. Rewrite in +/- form.

g. If you performed 100 samples and created a 99% confidence interval for each, then there will always be on that does not contain the true mean/proportion. True or False?

3. Subway wanted to measure the proportion of customers that bought cookies from a new display they put up in the restaurant. To do so, they randomly selected time intervals over a week-long period where somebody watched the display and counted the number of customers that walked past the display and the number who grabbed something. When the data was compiled, 103 of the 533 customers bought cookies.

a. Are the sampling conditions met?

b. Population?

c. Variable? Quantitative or categorical? Mean or proportion?

d. Use StatKey and perform the right type of confidence interval at 90% confidence using at least 1000 samples. What is your interval?

e. Explain all you just found in a sentence.

f. Rewrite in +/- form.

g. Explain your finding in a sentence using the +/- form of the interval.\

Extra Practice Solutions

Soccer Goals

a. Yes, SRS and systematic sampling are good, random techniques

b. Soccer goals in the State

c. Average number of goals per game. This is a quantitative variable, so were looking for the mean.

d. 2.375 - 4.375

e. Im 95% confident that the average number of soccer goals per game is between 2.375 and 4.375.

f. 10.94+- 3.5

g. There is no way to tell, the only way to check a confidence interval is to do a census.

Soccer Players

a. Yes, SRS

b. Soccer players 14-18

c. If the player likes the spring or fall better. This is a 2-option categorical variable, so we can summarize with a proportion.

d. 0.596 to 0.904

e.Im 99% confident that the proportion on soccer players ages 14-18 would like to play in the fall is between 59.6% and 90.4%

f. 70%+- 15.4%

g. False, we expect 1, but there could easily be 0, or 2, or some other number. The problem with probability is that it only tells us what to expect.

Subway Cookies

a. Yes, SRS

b. Subway customers that walk by the cookies

c. If the customer buys the cookie or not.

d. 0.179 to 0.226

e. 0.202 +- 0.024

f. Im 90% confident that the proportion of Subway customers who walk by the chips that actually take the cookies is 20.2% +- 2.4%.

Notes

http://stats.stackexchange.com/questions/26088/explaining-to-laypeople-why-bootstrapping-works

https://oli.cmu.edu/jcourse/workbook/activity/page?context=f6d17e9f80020ca601dac03c4d71b34a

Cole's notes:

Some of the stuff in the first two videos were redundant but most of it was still needed to portray a accurate description of what the student needs to do.

But I think that you can omit from 2:14-3:00 in the second video, and instead just explain the concept rather than show it again.

It seems redundant to show what bootstrapping is again in the second video, but that is the only part that can be taken out with out missing any important parts.