Confidence Intervals

Site: Saylor Academy
Course: CS250: Python for Data Science
Book: Confidence Intervals
Printed by: Guest user
Date: Saturday, May 18, 2024, 7:15 AM

Description

Calculating confidence intervals is fundamental to statistical analyses and statistical inference. This is because statistical calculations such as a mean or a probability are a function of the sample size with respect to the (possibly unknown) size of a larger population. Therefore, you must also include techniques for estimating your confidence in a given value along with the value. As you go deeper into the upcoming units, you will need to understand confidence intervals developed for the normal distribution and the student's t-distribution.

A Single Population Mean Using the Normal Distribution

A confidence interval for a population mean with a known standard deviation is based on the fact that the sample means follow an approximately normal distribution. Suppose that our sample has a mean of \overline x = 10 and we have constructed the 90 percent confidence interval (5, 15), where the margin of error = 5.


Calculating the Confidence Interval

To construct a confidence interval for a single unknown population mean, μ, where the population standard deviation is known, we need \overline x as an estimate for μ, and we need the margin of error. The margin of error for the population mean is called the error bound for a population mean (EBM). The sample mean, \overline x, is the point estimate of the unknown population mean, μ.

The confidence interval (CI) estimate will have the form:

(point estimate – error bound, point estimate + error bound) or, in symbols, (\overline x – EBM, \overline x +EBM).

The margin of error (EBM) depends on the confidence level (CL). The confidence level is often considered the probability that the calculated confidence interval estimate will contain the true population parameter. However, it is more accurate to state that the confidence level is the percentage of confidence intervals that contain the true population parameter when repeated samples are taken. Most often, the person constructing the confidence interval will choose a confidence level of 90 percent or higher, because that person wants to be reasonably certain of his or her conclusions.

Another probability, which is called alpha (α) is related to the confidence level, CL. Alpha is the probability that the confidence interval does not contain the unknown population parameter. Mathematically, alpha can be computed as α=1−CL.


Example 8.1

  • Suppose we have collected data from a sample. We know the sample mean, but we do not know the mean for the entire population.
  • The sample mean is seven, and the error bound for the mean is 2.5.

    \overline x \text{ and EBM }= 2.5.
The confidence interval is (7 – 2.5, 7 + 2.5), and calculating the values gives (4.5, 9.5).


If the confidence level is 95 percent, then we say, "We estimate with 95 percent confidence that the true value of the population mean is between 4.5 and 9.5".


Try It 8.1

Suppose we have data from a sample. The sample mean is 15, and the error bound for the mean is 3.2.

What is the confidence interval estimate for the population mean?

A confidence interval for a population mean with a known standard deviation is based on the fact that the sample means follow an approximately normal distribution. Suppose that our sample has a mean of \overline x= 10, and we have constructed the 90 percent confidence interval (5, 15) where EBM = 5.

To get a 90 percent confidence interval, we must include the central 90 percent of the probability of the normal distribution. If we include the central 90 percent, we leave out a total of α = 10 percent in both tails, or 5 percent in each tail, of the normal distribution.

This is a normal distribution curve. The peak of the curve coincides with the point 10 on the horizontal axis. The points 5 a

Figure 8.2

The critical value 1.645 is the z-score in a standard normal probability distribution that puts an area of 0.90 in the center, an area of 0.05 in the far left tail, and an area of 0.05 in the far right tail. To capture the central 90 percent, we must go out 1.645 standard deviations on either side of the calculated sample mean. The critical value will change depending on the confidence level of the interval.

It is important that the standard deviation used be appropriate for the parameter we are estimating, so in this section, we need to use the standard deviation that applies to sample means, which is \dfrac{σ}{\sqrt{n}}. The fraction \dfrac{σ}{\sqrt{n}} is commonly called the standard error of the mean in order to distinguish clearly the standard deviation for a mean from the population standard deviation, σ.


In summary, as a result of the central limit theorem, the following statements apply:

  • \overline X is normally distributed, that is, \overline X ~ N(μX,\dfrac{σ}{\sqrt{n}}).
  • When the population standard deviation σ is known, we use a normal distribution to calculate the error bound.


Calculating the Confidence Interval

To construct a confidence interval estimate for an unknown population mean, we need data from a random sample. The steps to construct and interpret the confidence interval are as follows:

  • Calculate the sample mean, \overline x, from the sample data. Remember, in this section, we already know the population standard deviation, σ.
  • Find the z-score that corresponds to the confidence level.
  • Calculate the error bound EBM.
  • Construct the confidence interval.
  • If we denote the critical z-score by z\dfrac{a}{2}, and the sample size by n, then the formula for the confidence interval with confidence level Cl=1−α, is given by (\overline x−z\dfrac{a}{2} × \dfrac{σ}{\sqrt{n}}, \overline x+z\dfrac{a}{2}×\dfrac{σ}{\sqrt{n}}).
  • Write a sentence that interprets the estimate in the context of the situation in the problem. (Explain what the confidence interval means, in the words of the problem).

We will first examine each step in more detail and then illustrate the process with some examples.


Finding the z-Score for the Stated Confidence Level

When we know the population standard deviation, σ, we use a standard normal distribution to calculate the error bound EBM and construct the confidence interval. We need to find the value of z that puts an area equal to the confidence level (in decimal form) in the middle of the standard normal distribution Z ~ N(0, 1).

The confidence level, CL, is the area in the middle of the standard normal distribution. CL = 1 – α, so α is the area that is split equally between the two tails. Each of the tails contains an area equal to \dfrac{α}{2}.

The z-score that has an area to the right of \dfrac{α}{2} is denoted by z\dfrac{α}{2}.

For example, when CL = 0.95, α = 0.05, and \dfrac{α}{2} = 0.025, we write z\dfrac{α}{2} = z_{0.025}.

The area to the right of z0.025 is 0.025 and the area to the left of z0.02 is 1 – 0.025 = 0.975.

z\dfrac{α}{2} = z_{0.025 = 1.96}, using a calculator, computer, or standard normal probability table.

Normal table (see appendices) shows that the probability for 0 to 1.96 is 0.47500, and so the probability to the right tail of the critical value 1.96 is 0.5 – 0.475 = 0.025


Using the TI-83, 83+, 84, 84+ Calculator

invNorm (0.975, 0, 1) = 1.96. In this command, the value 0.975 is the total area to the left of the critical value that we are looking to calculate. The parameters 0 and 1 are the mean value and the standard deviation of the standard normal distribution Z.


Note

Remember to use the area to the LEFT of z\dfrac{α}{2}. In this chapter, the last two inputs in the invNorm command are 0, 1, because you are using a standard normal distribution Z with mean 0 and standard deviation 1.


Calculating the Margin of Error EBM

The error bound formula for an unknown population mean, μ, when the population standard deviation, σ, is known is

Margin of error
= (z\dfrac{α}{2})(\dfrac{σ}{\sqrt{n}}).

Constructing the Confidence Interval

The confidence interval estimate has the format sample mean plus or minus the margin of error.

The graph gives a picture of the entire situation

CL +\dfrac{α}{2} +\dfrac{α}{2} = CL + α = 1.

This is a normal distribution curve. The peak of the curve coincides with the point x-bar on the horizontal axis. The points

Figure 8.3


Writing the Interpretation

The interpretation should clearly state the confidence level (CL), explain which population parameter is being estimated (here, a population mean), and state the confidence interval (both endpoints): "We estimate with ___percent confidence that the true population mean (include the context of the problem) is between ___ and ___ (include appropriate units)".


Example 8.2

Suppose scores on exams in statistics are normally distributed with an unknown population mean and a population standard deviation of three points. A random sample of 36 scores is taken and gives a sample mean (sample mean score) of 68. Find a confidence interval estimate for the population mean exam score (the mean score on all exams).

Find a 90 percent confidence interval for the true (population) mean of statistics exam scores.

Solution 1
  • You can use technology to calculate the confidence interval directly.
  • The first solution is shown step-by-step (Solution A).
  • The second solution uses the TI-83, 83+, and 84+ calculators (Solution B).


Solution A

To find the confidence interval, you need the sample mean, \overline x, and the EBM.

\overline x = 68

EBM = (z\dfrac{α}{2})(\dfrac{σ}{\sqrt{n}})

σ= 3; n =36;

The confidence level is 90 percent (CL = 0.90).

CL = 0.90, so α = 1 – CL = 1 – 0.90 = 0.10.
\dfrac{α}{2}= 0.05, z\dfrac{α}{2}=z_{0.05}

The area to the right of z0.05 is 0.05 and the area to the left of z0.05 is 1 – 0.05 = 0.95.

z\dfrac{α}{2} = z_{0.05} = 1.645

using invNorm(0.95, 0, 1) on the TI-83,83+, and 84+ calculators. This can also be found using appropriate commands on other calculators, using a computer, or using a probability table for the standard normal distribution.

EBM = (1.645)(\dfrac{3}{\sqrt{36}}) = 0.8225

\overline x – EBM = 68 – 0.8225 = 67.1775

\overline x+ EBM = 68 + 0.8225 = 68.8225

The 90 percent confidence interval is (67.1775, 68.8225).

Solution 2

Solution B

Using the TI-83, 83+, 84, 84+ Calculator

Press STAT and arrow over to TESTS .
Arrow down to 7:ZInterval .
Press ENTER .
Arrow to Stats and press ENTER .
Arrow down and enter 3 for σ, 68 for \overline x, 36 for n, and .90 for C-level .
Arrow down to Calculate and press ENTER .
The confidence interval is (to three decimal places)(67.178, 68.822).

Interpretation

We estimate with 90 percent confidence that the true population mean exam score for all statistics students is between 67.18 and 68.82.

Explanation of 90 percent Confidence Level

Ninety percent of all confidence intervals constructed in this way contain the true mean statistics exam score. For example, if we constructed 100 of these confidence intervals, we would expect 90 of them to contain the true population mean exam score.


Try It 8.2

Suppose average pizza delivery times are normally distributed with an unknown population mean and a population standard deviation of 6 minutes. A random sample of 28 pizza delivery restaurants is taken and has a sample mean delivery time of 36 min.

Find a 90 percent confidence interval estimate for the population mean delivery time.


Example 8.3

The specific absorption rate (SAR) for a cell phone measures the amount of radio frequency (RF) energy absorbed by the user’s body when using the handset. Every cell phone emits RF energy. Different phone models have different SAR measures. For certification from the Federal Communications Commission for sale in the United States, the SAR level for a cell phone must be no more than 1.6 watts per kilogram. Table 8.1 shows the highest SAR level for a random selection of cell phone models of a random cell phone company.

Phone Model # SAR Phone Model # SAR Phone Model # SAR
800 1.11 1800 1.36 2800 0.74
900 1.48 1900 1.34 2900 0.5
1000 1.43 2000 1.18 3000 0.4
1100 1.3 2100 1.3 3100 0.867
1200 1.09 2200 1.26 3200 0.68
1300 0.455 2300 1.29 3300 0.51
1400 1.41 2400 0.36 3400 1.13
1500 0.82 2500 0.52 3500 0.3
1600 0.78 2600 1.6 3600 1.48
1700 1.25 2700 1.39 3700 1.38

Table 8.1

Find a 98 percent confidence interval for the true (population) mean of the SARs for cell phones. Assume that the population standard deviation is σ = 0.337.

Solution 1
Solution A
To find the confidence interval, start by finding the point estimate: the sample mean,

\overline x=1.024.

This is calculated by adding the specific absorption rate for the 30 cell phones in the sample, and dividing the result by 30.

Next, find the EBM. Because you are creating a 98 percent confidence interval, CL = 0.98.

This is a normal distribution curve. The point z0.01 is labeled at the right edge of the curve and the region to the right of
Figure 8.4

You need to find z0.01, having the property that the area under the normal density curve to the right of z0.01 is 0.01 and the area to the left is 0.99. Use your calculator, a computer, or a probability table for the standard normal distribution to find z0.01 = 2.326.

EBM=(z_{0.01})\dfrac{σ}{\sqrt{n}}=(2.326)\dfrac{0.337}{\sqrt{30}}=0.1431

To find the 98 percent confidence interval, find \overline x ±EBM.

\overline x - EBM = 1.024 – 0.1431 = 0.8809
\overline x + EBM=  1.024 + 0.1431 = 1.1671

We estimate with 98 percent confidence that the true SAR mean for the population of cell phones in the United States is between 0.8809 and 1.1671 watts per kilogram.

Solution 2
Solution B
Using the TI-83, 83+, 84, 84+ Calculator

  • Press STAT and arrow over to TESTS.
  • Arrow down to 7:ZInterval.
  • Press ENTER.
  • Arrow to Stats and press ENTER.
  • Arrow down and enter the following values:
    • σ: 0.337
    • \overline x:1.024
    • n: 30
    • C-level: 0.98
  • Arrow down to Calculate and press ENTER.
  • The confidence interval is (to three decimal places) (0.881, 1.167).

Try It 8.3
Table 8.2 shows a different random sampling of 20 cell phone models. Use these data to calculate a 93 percent confidence interval for the true mean SAR for cell phones certified for use in the United States. As previously, assume that the population standard deviation is σ = 0.337.

Phone Model SAR Phone Model SAR
450 1.48 1450 1.53
550 0.8 1550 0.68
650 1.15 1650 1.4
750 1.36 1750 1.24
850 0.77 1850 0.57
950 0.462 1950 0.2
1050 1.36 2050 0.51
1150 1.39 2150 0.3
1250 1.3 2250 0.73
1350 0.7 2350 0.869

Table 8.2

Notice the difference in the confidence intervals calculated in Example 8.3 and the following Try It exercise. These intervals are different for several reasons: they are calculated from different samples, the samples are different sizes, and the intervals are calculated for different levels of confidence. Even though the intervals are different, they do not yield conflicting information. The effects of these kinds of changes are the subject of the next section in this chapter.


Changing the Confidence Level or Sample Size

Example 8.4
Suppose we change the original problem in Example 8.2 by using a 95 percent confidence level. Find a 95 percent confidence interval for the true (population) mean statistics exam score.

Solution 1
To find the confidence interval, you need the sample mean, \overline x, and the EBM.

\overline x = 68

EBM = (z\dfrac{α}{2})(\dfrac{σ}{\sqrt{n}})

σ= 3; n= 36

The confidence level is 95 percent (CL = 0.95).

CL = 0.95, so α = 1 – CL = 1 – 0.95 = 0.05.

\dfrac{α}{2}=0.025   z\dfrac{α}{2}=z_{0.025}

The area to the right of z_{0.025} is 0.025, and the area to the left of z_{0.025} is 1 – 0.025 = 0.975.

z\dfrac{α}{2}=z_{0.025}=1.96,

when using invnorm(0.975,0,1) on the TI-83, 83+, or 84+ calculators. (This can also be found using appropriate commands on other calculators, using a computer, or using a probability table for the standard normal distribution).

EBM = (1.96)(\dfrac{3}{\sqrt{36}}) = 0.98
\overline x – EBM = 68 – 0.98 = 67.02
\overline x + EBM = 68 + 0.98 = 68.98

Notice that the EBM is larger for a 95 percent confidence level in the original problem.

Interpretation

We estimate with 95 percent confidence that the true population mean for all statistics exam scores is between 67.02 and 68.98.

Explanation of 95 percent Confidence Level

95 percent of all confidence intervals constructed in this way contain the true value of the population mean statistics exam score.

Comparing the Results

The 90 percent confidence interval is (67.18, 68.82). The 95 percent confidence interval is (67.02, 68.98). The 95 percent confidence interval is wider. If you look at the graphs, because the area 0.95 is larger than the area 0.90, it makes sense that the 95 percent confidence interval is wider. For more certainty that the confidence interval actually does contain the true value of the population mean for all statistics exam scores, the confidence interval necessarily needs to be wider.

Part (a) shows a normal distribution curve. A central region with area equal to 0.90 is shaded. Each unshaded tail of the cur
Figure 8.5

Summary: Effect of Changing the Confidence Level
  • Increasing the confidence level increases the error bound, making the confidence interval wider.
  • Decreasing the confidence level decreases the error bound, making the confidence interval narrower.

Try It 8.4
Refer back to the pizza-delivery Try It exercise. The population standard deviation is six minutes and the sample mean deliver time is 36 minutes. Use a sample size of 20. Find a 95 percent confidence interval estimate for the true mean pizza-delivery time.


Example 8.5
Suppose we change the original problem in Example 8.2 to see what happens to the error bound if the sample size is changed.

Leave everything the same except the sample size. Use the original 90 percent confidence level. What happens to the error bound and the confidence interval if we increase the sample size and use n = 100 instead of n = 36? What happens if we decrease the sample size to n = 25 instead of n = 36?

  • \overline x = 68
  • EBM = (z\dfrac{α}{2})(\dfrac{σ}{\sqrt{n}})
  • σ = 3, the confidence level is 90 percent (CL = 0.90), z\dfrac{α}{2} = z_{0.05} = 1.645.

Solution 1
Solution A
If we increase the sample size n to 100, we decrease the margin of error.

When n = 100, EBM = (z\dfrac{α}{2})(\dfrac{σ}{\sqrt{n}})= (1.645)(\dfrac{3}{\sqrt{100}}) = 0.4935.

Solution 2
Solution B
If we decrease the sample size n to 25, we increase the error bound.

When n = 25, EBM = (z\dfrac{α}{2})(\dfrac{σ}{\sqrt{n}})= (1.645)(\dfrac{3}{\sqrt{25}})= 0.987.

Summary: Effect of Changing the Sample Size
  • Increasing the sample size causes the error bound to decrease, making the confidence interval narrower.
  • Decreasing the sample size causes the error bound to increase, making the confidence interval wider.

Try It 8.5
Refer back to the pizza-delivery Try It exercise. The mean delivery time is 36 minutes and the population standard deviation is six minutes. Assume the sample size is changed to 50 restaurants with the same sample mean. Find a 90 percent confidence interval estimate for the population mean delivery time.


Working Backward to Find the Error Bound or Sample Mean

When we calculate a confidence interval, we find the sample mean, calculate the error bound, and use them to calculate the confidence interval. However, sometimes when we read statistical studies, the study may state the confidence interval only. If we know the confidence interval, we can work backward to find both the error bound and the sample mean.

Finding the Error Bound
  • From the upper value for the interval, subtract the sample mean,
  • Or, from the upper value for the interval, subtract the lower value. Then divide the difference by 2.

Finding the Sample Mean
  • Subtract the error bound from the upper value of the confidence interval,
  • Or, average the upper and lower endpoints of the confidence interval.
Notice that there are two methods to perform each calculation. You can choose the method that is easier to use with the information you know.


Example 8.6
Suppose we know that a confidence interval is (67.18, 68.82) and we want to find the error bound. We may know that the sample mean is 68, or perhaps our source only gives the confidence interval and does not tell us the value of the sample mean.
Calculate the error bound:

  • If we know that the sample mean is 68, EBM = 68.82 – 68 = 0.82.
  • If we do not know the sample mean, EBM = \dfrac{(68.82−67.18)}{2}  = 0.82. The margin of error is the quantity that we add and subtract from the sample mean to obtain the confidence interval. Therefore, the margin of error is half of the length of the interval.

Calculate the sample mean:

  • If we know the error bound, \overline x= 68.82 – 0.82 = 68.
  • If we do not know the error bound, \overline x= \dfrac{(67.18+68.82)}{2}= 68.


Try It 8.6
Suppose we know that a confidence interval is (42.12, 47.88). Find the error bound and the sample mean.


Calculating the Sample Size n

If researchers desire a specific margin of error, then they can use the error bound formula to calculate the required sample size. In this situation, we are given the desired margin of error, EBM, and we need to compute the sample size n.

The formula for sample size is n =\dfrac{z^2σ^2}{EBM^2}, found by solving the error bound formula for n. Always round up the value of n to the closest integer.

In this formula, z is the critical value z\dfrac{α}{2}, corresponding to the desired confidence level. A researcher planning a study who wants a specified confidence level and error bound can use this formula to calculate the size of the sample needed for the study.


Example 8.7
The population standard deviation for the age of Foothill College students is 15 years. If we want to be 95 percent confident that the sample mean age is within two years of the true population mean age of Foothill College students, how many randomly selected Foothill College students must be surveyed?

  • From the problem, we know that σ = 15 and EBM = 2.
  • z = z0.025 = 1.96, because the confidence level is 95 percent.
  • n = \dfrac{z^2σ^2}{EBM^2} = \dfrac{(1.96)^2}{(15)^2}{2^2}    = 216.09 using the sample size equation.
  • Use n = 217. Always round the answer up to the next higher integer to ensure that the sample size is large enough.
Therefore, 217 Foothill College students should be surveyed in order to be 95 percent confident that we are within two years of the true population mean age of Foothill College students.


Try It 8.7

The population standard deviation for the height of high school basketball players is three inches. If we want to be 95 percent confident that the sample mean height is within one inch of the true population mean height, how many randomly selected students must be surveyed?


Source: OpenStax, https://openstax.org/books/statistics/pages/8-introduction
Creative Commons License This work is licensed under a Creative Commons Attribution 4.0 License.

A Single Population Mean Using the Student's t-Distribution

In practice, we rarely know the population standard deviation. In the past, when the sample size was large, this unknown number did not present a problem to statisticians. They used the sample standard deviation s as an estimate for σ and proceeded as before to calculate a confidence interval with close-enough results. However, statisticians ran into problems when the sample size was small. A small sample size caused inaccuracies in the confidence interval.

William S. Gosset (1876–1937) of the Guinness brewery in Dublin, Ireland, ran into this problem. His experiments with hops and barley produced very few samples. Just replacing σ with s did not produce accurate results when he tried to calculate a confidence interval. He realized that he could not use a normal distribution for the calculation; he found that the actual distribution depends on the sample size. This problem led him to discover what is called the Student's t-distribution. The name comes from the fact that Gosset wrote under the pen name Student.

Up until the mid-1970s, some statisticians used the normal distribution approximation for large sample sizes and used the Student's t-distribution only for sample sizes of at most 30. With graphing calculators and computers, the practice now is to use the Student's t-distribution whenever s is used as an estimate for σ.

If you draw a simple random sample of size n from a population that has an approximately normal distribution with mean μ and unknown population standard deviation σ and calculate the t-score t=\dfrac{\overline x–μ}{(\dfrac{s}{\sqrt{n}})}, then the t-scores follow a Student's t-distribution with n – 1 degrees of freedom. The t-score has the same interpretation as the z-score: It measures how far \overline x is from its mean μ. For each sample size n, there is a different Student's t-distribution.

The degrees of freedom (df), n -– 1, are the sample size minus 1.

Properties of the Student's t-distribution
  • The graph for the Student's t-distribution is similar to the standard normal curve.
  • The mean for the Student's t-distribution is zero, and the distribution is symmetric about zero.
  • The Student's t-distribution has more probability in its tails than the standard normal distribution. Figure 8.6 shows the graphs of the student t-distribution for 1, 2 and 5 degrees of freedom: (v), compare to the standard normal distribution (in black).

        A graph showing a bell shaped curve of normal distribution with two vertical lines to the left and right of center. The v
    Figure 8.6
  • The exact shape of the Student's t-distribution depends on the degrees of freedom. As the degrees of freedom increase, the graph of the Student's t-distribution becomes more like the graph of the standard normal distribution.
  • The underlying population of individual observations is assumed to be normally distributed with unknown population mean μ and unknown population standard deviation σ. The size of the underlying population is generally not relevant unless it is very small. If it is bell-shaped (normal), then the assumption is met and does not need discussion. Random sampling is assumed, but that is a completely separate assumption from normality.

Calculators and computers can easily calculate any Student's t-probabilities. The TI-83, 83+, and 84+ have a tcdf function to find the probability for given values of t. The grammar for the tcdf command is tcdf(lower bound, upper bound, degrees of freedom). However, for confidence intervals, we need to use inverse probability to find the value of t when we know the probability.

For the TI-84+, you can use the invT command on the DISTRibution menu. The invT command works similarly to the invnorm. The invT command requires two inputs: invT(area to the left, degrees of freedom). The output is the t-score that corresponds to the area we specified.

The TI-83 and 83+ do not have the invT command. (The TI-89 has an inverse T command.)

A probability table for the Student's t-distribution can also be used. The table gives critical t-values that correspond to the confidence level (column) and degrees of freedom (row). (The TI-86 does not have an invT program or command, so if you are using that calculator, you need to use a probability table for the Student's t-distribution.) When using a t-table, note that some tables are formatted to show the confidence level in the column headings, while the column headings in some tables may show only corresponding area in one or both tails.

A Student's t-table (see Appendix H Tables) gives t-scores given the degrees of freedom and the right-tailed probability. The table is very limited. Calculators and computers can easily calculate any Student's t-probabilities.

If the population standard deviation is not known, the error bound for a population mean is

  • EBM=(t\dfrac{α}{2})(\dfrac{s}{\sqrt{n}}),
  • t\dfrac{σ}{2} is the t-score with area to the right equal to \dfrac{α}{2},
  • use df = n – 1 degrees of freedom, and
  • s = sample standard deviation.

The format for the confidence interval is

(\overline x−EBM, \overline x+EBM).


Using the TI-83, 83+, 84, 84+ Calculator

To calculate the confidence interval directly, do the following:
Press STAT .
Arrow over to TESTS .
Arrow down to 8:TInterval and press ENTER (or just press 8).


Example 8.8

Suppose you do a study of acupuncture to determine how effective it is in relieving pain. You measure sensory rates for 15 subjects with the results given. Use the sample data to construct a 95 percent confidence interval for the mean sensory rate for the population (assumed normal) from which you took the data.
The solution is shown step-by-step and by using the TI-83, 83+, or 84+ calculators.
8.6; 9.4; 7.9; 6.8; 8.3; 7.3; 9.2; 9.6; 8.7; 11.4; 10.3; 5.4; 8.1; 5.5; 6.9

Solution 1
  • The first solution is step-by-step (Solution A).
  • The second solution uses the TI-83+ and TI-84 calculators (Solution B).

To find the confidence interval, you need the sample mean, \overline x, and the EBM.

\overline x =\dfrac{8.6 + 9.4 + 7.9 + 6.8 + 8.3 + 7.3 + 9.2 + 9.6 + 8.7 + 11.4 + 10.3 + 5.4 + 8.1+ 5.5+ 6.9}{15}=8.2267;

s=\sqrt{\dfrac{(8.6−\overline x)^2+ (9.4 − \overline x)^2+⋯+(5.5 − \overline x)^2+ (6.9 − \overline x)^2}{14}} =1.6722;

n=15

df = 15 – 1 = 14 CL, so α = 1 – CL = 1 – 0.95 = 0.05

\dfrac{α}{2}= 0.025; t\dfrac{α}{2}=t_{0.025}

The area to the right of t0.025 is 0.025, and the area to the left of t0.025 is 1 – 0.025 = 0.975.

t\dfrac{α}{2}=t_{0.025}=2.14 using invT(.975,14) on the TI-84+ calculator.

EBM=(t\dfrac{α}{2})(\dfrac{s}{\sqrt{n}})
EBM=(2.14)(\dfrac{1.6722}{\sqrt{15}})=0.924
\overline x – EBM = 8.2267 – 0.9240 = 7.3
\overline x +EBM= 8.2267 + 0.9240 = 9.15

The 95 percent confidence interval is (7.30, 9.15).

We estimate with 95 percent confidence that the true population mean sensory rate is between 7.30 and 9.15.


Solution 2

Using the TI-83, 83+, 84, 84+ Calculator

Press STAT and arrow over to TESTS .
Arrow down to 8:TInterval and press ENTER (or you can just press 8 ).
Arrow to Data and press ENTER .
Arrow down to List and enter the list name where you put the data.
There should be a 1 after Freq .
Arrow down to C-level and enter 0.95.
Arrow down to Calculate and press ENTER .
The 95 percent confidence interval is (7.3006, 9.1527).

Note

When calculating the error bound, you can also use a probability table for the Student's t-distribution to find the value of t. The table gives t-scores that correspond to the confidence level (column) and degrees of freedom (row); the t-score is found where the row and column intersect in the table.


Try It 8.8

You do a study of hypnotherapy to determine how effective it is in increasing the number of hours of sleep subjects get each night. You measure hours of sleep for 12 subjects with the following results. Construct a 95 percent confidence interval for the mean number of hours slept for the population (assumed normal) from which you took the data.

8.2, 9.1, 7.7, 8.6, 6.9, 11.2, 10.1, 9.9, 8.9, 9.2, 7.5, 10.5


Example 8.9

A group of researchers is working to understand the scope of industrial pollution in the human body. Industrial chemicals may enter the body through pollution or as ingredients in consumer products. In October 2008, the scientists tested cord-blood samples for 20 newborn infants in the United States. The cord blood of the in utero/newborn group was tested for 430 industrial compounds, pollutants, and other chemicals, including chemicals linked to brain and nervous-system toxicity, immune-system toxicity, reproductive toxicity, and fertility problems. There are health concerns about the effects of some chemicals on the brain and nervous system. Table 8.3 shows how many of the targeted chemicals were found in each infant's cord blood.

79 145 147 160 116 100 159 151 156 126
137 83 156 94 121 144 123 114 139 99

Table 8.3

Use this sample data to construct a 90 percent confidence interval for the mean number of targeted industrial chemicals to be found in an infant's blood.

Solution 1
Solution A
From the sample data, you can calculate

\overline x=79 + 145 + ⋯+ 139+ 9920=127.45
s=\sqrt{\dfrac{(79−\overline x)^2+ (145 − \overline x)^2+⋯+(139 −\overline x)^2+ (99 − \overline x)^2}{19}}=25.965.

There are 20 infants in the sample, so n = 20, and df = 20 – 1 = 19.

You are asked to calculate a 90 percent confidence interval: CL = 0.90, so α = 1 – CL = 1 – 0.90 = 0.10. \dfrac{α}{2}=0.05,t\dfrac{α}{2}=t_{0.05}

By definition, the area to the right of t0.05 is 0.05, and so the area to the left of t0.05 is 1 – 0.05 = 0.95.

Use a table, calculator, or computer to find that t0.05 = 1.729.

EBM=t\dfrac{α}{2}(\dfrac{s}{\sqrt{n}})=1.729(\dfrac{25.965}{\sqrt{20}}) ≈ 10.038
\overline x – EBM = 127.45 – 10.038 = 117.412
\overline x + EBM = 127.45 + 10.038 = 137.488

We estimate with 90 percent confidence that the mean number of all targeted industrial chemicals found in cord blood in the United States is between 117.412 and 137.488.

Solution 2
Solution B
Using the TI-83, 83+, 84, 84+ Calculator

Enter the data as a list.
Press STAT and arrow over to TESTS .
Arrow down to 8:TInterval and press ENTER (or you can just press 8 ). Arrow to Data and press ENTER .
Arrow down to List and enter the list name where you put the data.
Arrow down to Freq and enter 1.
Arrow down to C-level and enter 0.90.
Arrow down to Calculate and press ENTER .
The 90 percent confidence interval is (117.41, 137.49).


Try It 8.9
A random sample of statistics students was asked to estimate the total number of hours they spend watching television in an average week. The responses are recorded in Table 8.4. Use the following sample data to construct a 98 percent confidence interval for the mean number of hours statistics students will spend watching television in one week.

0 3 1 20 9
5 10 1 10 4
14 2 4 4 5

Table 8.4