|
|
Confidence Interval for Population Mean

Suppose you own a coffee shop, and are considering adding a drive-through lane for customers. One of the things to consider is how long people will wait in line inside for their coffee versus how long they will wait in line for their coffee. So you do a random survey of coffee shops with drive-through lanes, and find that of the \(40\) cars you watched go through the line, it took an average of \(14.5\) minutes with a standard deviation of \(1.7\) minutes.  

Mockup Schule

Explore our app and discover over 50 million learning materials for free.

Confidence Interval for Population Mean

Illustration

Lerne mit deinen Freunden und bleibe auf dem richtigen Kurs mit deinen persönlichen Lernstatistiken

Jetzt kostenlos anmelden

Nie wieder prokastinieren mit unseren Lernerinnerungen.

Jetzt kostenlos anmelden
Illustration

Suppose you own a coffee shop, and are considering adding a drive-through lane for customers. One of the things to consider is how long people will wait in line inside for their coffee versus how long they will wait in line for their coffee. So you do a random survey of coffee shops with drive-through lanes, and find that of the \(40\) cars you watched go through the line, it took an average of \(14.5\) minutes with a standard deviation of \(1.7\) minutes.

From this you could say that you think the average time someone will wait in the drive-through lane is about \(14.5\) minutes, but you certainly can't say it is exactly \(14.5\) minutes. The amount of time someone waits in their car is going to vary based on the sample you take, so what you mean is that the average wait in the drive-through line is about \(14.5\) minutes.

So how can you get a better idea of what is going on before you spend the money to build a drive-through? You can make a confidence interval for a population mean!

Confidence Intervals for a Population Mean a very un-fancy coffee drive-through StudySmarterNot every coffee drive-through is fancy!

Definition of the Confidence Interval for a Population Mean

Remember that confidence intervals are one type of statistical inference. They allow you to find a range of values where you can be relatively confident the true value will be. In this case, you are constructing a confidence interval for a population mean.

The general form for a confidence interval estimate for a population mean is

sample mean \(\pm\) critical value \(\times\) standard error of the statistic.

Here the sample mean, \(\bar{x}\), is an unbiased estimator for the population mean \(\mu\) as long as the sample size \(n\) is such that \(n > 30\) so you can apply the Central Limit Theorem. Remember that being able to use the Central Limit Theorem implies you can assume that your sample is approximately normal, even if the population itself is not.

Let's start by looking at the case where you know the population standard deviation, \(\sigma\). In general, you won't know this, but it is a helpful starting case to go over. Then the standard deviation of the sample is :

\[ \sigma_{\bar{x}} = \frac{\sigma}{n} \]

So when the sample size is large enough, and \(\sigma\) is known, the confidence interval is given by:

\[ \bar{x} \pm (z \text{ critical value})\left(\frac{\sigma}{\sqrt{n}}\right)\]

Going back to the coffee shop example, the sample mean is \(\bar{x} = 14.5\) minutes, the sample size is \(n=40\). Suppose you also know that the population standard deviation is \(\sigma = 2\) minutes. Find a \(95\%\) confidence interval for the wait time in the drive-through.

Solution:

Remember that the \(z\)-value for a \(95\%\) confidence interval is \(1.96\). So the confidence interval is:

\[ \begin{align} \bar{x} \pm (z \text{ critical value})\left(\frac{\sigma}{\sqrt{n}}\right) &= 14.5 \pm (1.96)\left(\frac{2}{\sqrt{40}}\right) \\ &= 14.5 \pm 0.3099 \\ &= (14.1901, 14.8099) \end{align}\]

So you can be \(95\%\) confident that the true average wait time for the drive-through is in the confidence interval.

What about when you don't have the population standard deviation?

Construct the Confidence Interval for the Population Mean

First, let's look at the conditions that need to be satisfied before you can construct the confidence interval for a population mean when you don't know what the population standard deviation is.

  • Either the sample size is large enough (\(n\ge 30\) ) or the population distribution is approximately normal.

  • The sample is random or it is reasonable to assume it is representative of the larger population.

When these conditions are met, you can construct the confidence interval for the population mean. Unlike the case where you know the standard deviation of the population and can use the \(z\)-value as your critical value, when you don't know the standard deviation of the population you will need to use the \(t\)-distribution instead.

Confidence Interval for Population Mean Formula

When the conditions to construct a confidence interval for the population mean are satisfied, the formula for the confidence interval becomes

\[ \bar{x} \pm (t \text{ critical value})\left(\frac{s}{\sqrt{n}}\right)\]

Here \(s\) is the sample standard deviation. The \(t\) critical value is based on the degree of freedom, \(df\), which is calculated by:

\[df = n-1\]

and the confidence level you are using.

Calculate Confidence Interval for Population Mean

Let's go back to the coffee shop example at the start of the article. The sample mean is \(\bar{x} = 14.5\) minutes, the sample size is \(n=40\), and the sample standard deviation is \(s=1.7\) . The sample size is large enough to construct a confidence interval, and it is reasonable to assume that the coffee drive-through and car samples are random.

Suppose you want to construct a \(95\%\) confidence interval. The degree of freedom is:

\[ df = n- 1 = 39\]

If you are using a \(t\)-table, you won't find \(39\) degrees of freedom on the table! That is because for any degree of freedom larger than \(30\) the increase isn't very much when you just increase the number of degrees of freedom by \(1\).

That is why you will see tables go by \(1\) up to \(30\), and then start to jump by \(10\). The difference between the \(t\)-critical value for \(df = 39\) and \(df = 40\) isn't really big enough to affect your calculations, so you can use the table value for \(df = 40\) and a \(95\%\) confidence interval instead. There you will find that the appropriate \(t\)-critical value is \(2.02\).

Then the confidence interval for the population mean is:

\[\begin{align} \bar{x} \pm (t \text{ critical value})\left(\frac{s}{\sqrt{n}}\right) &= 14.5 \pm (2.02)\left( \frac{1.7}{\sqrt{40}}\right) \\ &\approx 14.5 \pm 0.54 \\ &= (13.96,15.04) \end{align}\]

You still need to interpret the confidence interval and communicate your findings to other people. You can say two things:

  • The method used to construct the confidence interval estimate will capture the actual population mean \(95\%\) of the time.

  • You are \(95\%\) confident that the actual mean time it takes to get coffee in a drive-through is between \(13.96\) and \(15.04\) minutes.

Examples of Confidence Intervals for Population Means

You may need to determine how many samples you need in advance to make sure the margin of error is relatively small. This can be important when gathering data is expensive or time-consuming. Remember that the margin of error is defined as the maximum likely estimation error you can expect when using the statistic is used as an estimator.

The margin of error is given by the formula:

margin of error = \(1.96 \left(\dfrac{\sigma}{\sqrt{n}}\right)\).

When you don't know the population standard deviation, you can approximate the margin of error using the formula

estimated margin of error = \(1.96 \left(\dfrac{s}{\sqrt{n}}\right)\).

If you let \(M\) be the margin of error, solving for the sample size \(n\) gives you:

\[ n = \left( \frac{1.96 \sigma}{M} \right)^2 \]

Sometimes you won't have even a sample standard deviation. In that case, a rough estimate can be found by taking:

\[\begin{align} \sigma &\approx \frac{\text{largest sample value} - \text{smallest sample value} }{4} \\ &= \frac{\text{range}}{4} \end{align}\]

as long as the data isn't too skewed.

Let's look at an example where you need to use the estimated margin of error to find a sample size.

Suppose that someone is setting up a scholarship that will include the cost of college textbooks.

For the estimate of the cost of a semester of college plus books, the margin of error on the cost of textbooks should be less than \(\$ 30\). Going to the nearest college bookstore, the cost of textbooks ranges between \(\$ 40\) and \(\$ 385\). How many samples of the price of textbooks should the person setting up the scholarship take in order for the margin of error to be less than \(\$ 25\)?

Solution:

In this case:

\[\begin{align} \sigma &\approx \frac{\text{range}}{4} \\ &= \frac{385-40}{4} \\ &= 86.25 \end{align}\]

and the sample size would need to be:

\[ \begin{align} n &= \left( \frac{1.96 \sigma}{M} \right)^2 \\ &\approx \left( \frac{(1.96) (86.25)}{25} \right)^2\\ &= (6.762)^2 \\ &\approx 45.72 \end{align} \]

So the sample size would need to be at least \(n=46\) for the margin of error to be less than \(\$ 25\).

To construct a confidence interval for a population mean, you need \(n \ge 30\). That means the minimum sample size is \(n=46\) would be good enough to satisfy the condition to construct the interval for the average cost of a college textbook and for the margin of error to be less than \(\$ 25\).

Let's take a look at another example.

Since you love coffee, you want to build a coffee shop in your area. You live in a large metro area, and one of the things you need to find out is the average price of a large mocha at an independent coffee shop in your area. There are in fact \(590\) coffee shops in your city, but \(385\) of them are all owned by the Fancy Pants Corporation, so you plan to ignore their prices.

After choosing a random sample of \(10\) independent coffee shops, you find that the price of a large mocha ranges between \(\$ 6.75\) and \(\$ 9.95\). What sample size should you use to get a margin of error of less than \(\$ 1\)?

Solution:

Here you know that :

\[\begin{align} \sigma &\approx \frac{\text{range}}{4} \\ &= \frac{9.95-6.75}{4} \\ &= 0.8 \end{align}\]

so the sample size would need to be:

\[ \begin{align} n &= \left( \frac{1.96 \sigma}{M} \right)^2 \\ &\approx \left( \frac{(1.96) (0.8)}{1} \right)^2\\ &= (1.568)^2 \\ &\approx 2.46 \end{align} \]

So according to this, you would only need a sample size of \(3\) to ensure that the margin of error is less than \(\$ 1\).

That doesn't mean you should only do \(3\) samples! Remember that in order to do a confidence interval for the average price of a large mocha you need a sample size of at least \(30\).

Now let's construct the confidence interval for the price of coffee.

Out of the \(205\) independently owned coffee shops, you choose \(30\) as a random sample and call them to get the price of their large mocha. You find that the average price is \(\$ 8\) with a standard deviation of \(1.25\). Construct and interpret a \(95\%\) confidence interval for the price of a large mocha at an independently owned coffee shop.

Solution:

With a sample size of \(n=30\), the degree of freedom is:

\[ df = n- 1 = 29\]

With \(df = 29\) and a \(95\%\) confidence interval, the appropriate \(t\)-critical value is \(2.05\), which can be found using a table or calculator. Then the confidence interval for the population mean is:

\[\begin{align} \bar{x} \pm (t \text{ critical value})\left(\frac{s}{\sqrt{n}}\right) &= 8 \pm (2.05)\left( \frac{1.25}{\sqrt{30}}\right) \\ &\approx 8 \pm 0.47 \\ &= (7.53,8.47). \end{align}\]

Now you can say two things:

  • The method used to construct the confidence interval estimate will capture the actual population mean \(95\%\) of the time.

  • You are \(95\%\) confident that the actual mean price of a large mocha is between \(\$ 7.53 \) and \(\$ 8.47 \) at an independently owned coffee shop in your area.

Confidence Interval for Population Mean - Key takeaways

  • There are two conditions that need to be satisfied to construct a confidence interval for a population mean:
    • Either the sample size is large enough (\(n\ge 30\) ) or the population distribution is approximately normal.

    • The sample is random or it is reasonable to assume it is representative of the larger population.

  • If you know the population standard deviation, the confidence interval is given by

    \[ \bar{x} \pm (z \text{ critical value})\left(\frac{\sigma}{\sqrt{n}}\right)\]where \(\bar{x} \) is the sample mean, \(n\) is the sample size, and \(\sigma\) is the population standard deviation.

  • If you don't know the population standard deviation, the formula for the confidence interval is

    \[ \bar{x} \pm (t \text{ critical value})\left(\frac{s}{\sqrt{n}}\right),\]

    where \(\bar{x} \) is the sample mean, \(n\) is the sample size, and \(s\) is the sample standard deviation. The degrees of freedom formula is \(df = n-1\).

Frequently Asked Questions about Confidence Interval for Population Mean

The general form for a confidence interval estimate for a population mean is

sample mean plus or minus critical value times standard error of the statistic.

It is the interval where you can be confident (given your confidence level) that the true value of the population mean lies within the interval.

A confidence interval for the average wait time in a line at a bank would be one confidence interval for a population mean.

It depends on whether or not you know the population standard deviation.  If you do know it, then the formula involves the z-score.  If you don't know it, then the formula involves the t-distribution.

You find the confidence interval for a population mean.  However it involves knowing the sample mean.

Test your knowledge with multiple choice flashcards

If you are constructing a confidence interval for a population mean and you double the sample size, how does that change the size of the confidence interval if all other things stay the same?

If you are constructing a confidence interval for a population mean, and you increase the confidence level from \(95\%\) to \(99\%\), how does the size of the confidence interval change if everything else stays the same?

When constructing a confidence interval for a population mean, which of the following will result in a smaller confidence interval?

Next

If you are constructing a confidence interval for a population mean and you double the sample size, how does that change the size of the confidence interval if all other things stay the same?

Divides the interval size by \(\sqrt{2}\).

If you are constructing a confidence interval for a population mean, and you increase the confidence level from \(95\%\) to \(99\%\), how does the size of the confidence interval change if everything else stays the same?

The confidence interval gets larger.

When constructing a confidence interval for a population mean, which of the following will result in a smaller confidence interval?

A larger sample size.

When you are constructing a confidence interval for a population mean, why do you generally use the sample standard deviation instead of the population standard deviation?

In most cases you won't know the population standard deviation but you will know the sample standard deviation.

If you do know the population standard deviation, what is the formula for a confidence interval of the population mean?

\( \bar{x} \pm (z \text{ critical value})\left(\frac{\sigma}{\sqrt{n}}\right),\) where \(\bar{x}\) is the sample mean, \(\sigma\) is the population standard deviation, and \(n\) is the sample size.

When you don't know the population standard deviation, what is the formula for the confidence interval of the population mean?

\( \bar{x} \pm (t \text{ critical value})\left(\frac{s}{\sqrt{n}}\right),\) where \(\bar{x}\) is the sample mean, \(s \) is the sample standard deviation, and \(n\) is the sample size.

More about Confidence Interval for Population Mean

Join over 22 million students in learning with our StudySmarter App

The first learning app that truly has everything you need to ace your exams in one place

  • Flashcards & Quizzes
  • AI Study Assistant
  • Study Planner
  • Mock-Exams
  • Smart Note-Taking
Join over 22 million students in learning with our StudySmarter App Join over 22 million students in learning with our StudySmarter App

Sign up to highlight and take notes. It’s 100% free.

Entdecke Lernmaterial in der StudySmarter-App

Google Popup

Join over 22 million students in learning with our StudySmarter App

Join over 22 million students in learning with our StudySmarter App

The first learning app that truly has everything you need to ace your exams in one place

  • Flashcards & Quizzes
  • AI Study Assistant
  • Study Planner
  • Mock-Exams
  • Smart Note-Taking
Join over 22 million students in learning with our StudySmarter App