Confidence Intervals

In this section students will:

  1. Determine the best point estimates for population parameters
  2. Find the critical value corresponding to a given confidence level for a z-intervals
  3. Calculate margins of error for confidence intervals
  4. Construct confidence intervals
  5. Interpret the results of confidence intervals

Real-world Sampling

In practice, it may be known that the sampling distribution of a point estimator centers about the parameter being estimated but all that is available is the estimate computed from the \(n\) measurements contained in the sample. How far from the true value of the parameter will the estimate lie?

The distance between the estimate and the true value of the parameter is called the error of estimation and provides a measure of the goodness of the point estimator.

Error of estimation

The goodness of an interval estimator is analyzed in much the same way as that of a point estimator. Samples of the same size are repeatedly drawn from the same population, and the interval estimate is calculated on each occasion. This process will generate a large number of intervals rather than points. A good interval estimator would successfully enclose the true value of the parameter a large fraction of the time. The “success rate” is referred to as the confidence coefficient and provides a measure of goodness for the interval estimator.

The probability that an interval (called a confidence interval) will enclose the estimated parameter is called the confidence coefficient

Large-sample Estimation

Given an unbiased estimator whose sampling distribution is normal or can be approximated by a normal distribution, it is known that 95% of the values of this estimator will fall within 1.96 standard deviations of its mean, the parameter of interest. Why not 2 standard deviations as taught by the Empirical Rule (ER)? When the ER is used, is is approximate standard deviations, not exact, while 1.96 is exact. How?

The central 95% (in this case) of the curve is needed for the interval calculation. To find the \(z-score\)s, we have to find \(P(z_0<Z<z_0)=0.95\). That means that the “left over” area is split between the two tails, in this case \(1-0.95=0.05 \Rightarrow 0.05/2=0.025\), which is the probability used to find the \(z-score\) needed.

\(z_0=1.96\) (yes it could be negative but the thought is about the number of standard deviations from the mean in terms of magnitude)

Confidence interval

Therefore the error of estimation, defined as the difference between a particular point estimate and its parameter it estimates, should be less than 1.96 standard deviations of the estimator with probability approximately equal to 0.95. This quantity provides a bound on the error of estimation, often called the margin of error (moe) in estimation. Although there is a 5% chance that the error of estimation will exceed this bound (moe), it is very unlikely that such will be the case.

Point Estimator: a statistic calculated using sample measurements
Bound(also called moe): critical value\(\times\) standard error of the estimator

Interval Estimation

In constructing an interval estimate for an unknown parameter, two points are calculated and within that interval it is expected that the unknown parameter will be in that interval. Interval estimates are constructed so that in repeated sampling a large proportion (close to 1; percent close to 100%) of the intervals will enclose the parameter of interest. This proportion is called the confidence coefficient and the resulting interval is called a confidence interval (CI).

For example, in estimating a population mean with a confidence interval, the language used is “the probability that the interval contains \(\mu\)”, not “the probability that \(\mu\) falls in the interval” because the value of \(\mu\) is fixed but the interval consists of random endpoints.

The confidence coefficient can be changed by changing the confidence level, and thus the \(z-score\) associated with the new level of confidence. Let the confidence coefficient be equal to \(1-\alpha\) where \(\alpha\) is the “leftover” tail area (from \(1-CL\)). When the sample size is large and an estimator is normally or approximately normally distributed, a \((1-\alpha)100\%\) confidence interval estimate for an unknown population parameter is given by:

\[\text{Point Estimate }\pm \text{Margin of Error (bound)}\]
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. Thus, if \(\bar{x}=7\) and \(bound=2.5\), the CI is \((7-2.5,7+2.5)=(4.5,9.5)\).

If the CL is 95%, then it is stated that “with 95% confidence, the true mean is between 4.5 and 9.5 units”.

Generic Interpretation of CI

To interpret the CI, the statement we use discusses the level of confidence, the parameter we are trying to estimate, and the values of the interval.

“With (CL)% confidence, the true (mean, proportion, etc.) of (insert context) is between (lower number) and (upper number) (units of measurement).”

OR

“We are (CL)% confident the true (mean, proportion, etc.) of (insert context) is between (lower number) and (upper number) (units of measurement).”

Formula for \((1-\alpha)100\%\) Confidence Interval

\[\text{Point Estimate }\pm \text{Margin of Error (bound)}\]

and \(moe=z^{\star}(se)\) and \(z^{\star}\) is the \(z-score\) associated with \(\alpha\)

\(\alpha\) is called the significance level and is also referred to as the Type I error (type one) with \(0\le\alpha\le 1\) (meaning alpha is between 0 and 1 inclusive; it is a probability)

How to find \(z^{\star}\)

Using the standard normal distribution table (z-table):

  1. Subtract the confidence level (CL) from \(1\): \(1-CL=\alpha\), where \(\alpha\) is the leftover area
  2. Divide \(\alpha\) in half: \(\alpha/2\)
  3. Find the probability on the inside of the table
  4. Find the z-score that corresponds to \(\alpha/2\)

\(z^{\star}\) for 90% CI

90%: \(z_{90\%}\) \(\alpha=1-0.9=0.1\), find \(0.1\) inside the table and the \(z\)-score for 90% CI is: \(1.645\) (it is between two numbers and we usually use the average of those two. If you choose \(1.64\) or \(1.65\), those are acceptable as well)

Z for 90% CL

\(z^{\star}\) for 95% CI

95%: \(z_{95\%}\) \(\alpha=1-0.95=0.05 \Rightarrow z=1.96\)

z for 95% CL

\(z^{\star}\) for 99% CI

99%: \(z_{99\%}\) \(1-0.99=0.01\Rightarrow z=2.575\) (it is between two numbers and we usually use the average of those two. If you choose \(2.5\) or \(2.6\), those are acceptable as well)

z for 99% CL

Large-Sample Estimation of a Population Mean

Form for CI on \(\mu\) when \(\sigma\) is known

\[\overline{X}\pm z^{\star}(se)\text{ with }se=\frac{\sigma}{\sqrt{n}}\]
Form for CI on \(\mu\) when \(\sigma\) is unknown and \(n\) is large

\[\overline{X}\pm z^{\star}(se)\text{ with }se=\frac{s}{\sqrt{n}}\]

Assumptions

Assumptions: conditions that we need to be true in order for the data to properly fit the model we are using for estimations

  1. Randomization: proper randomization was used
    • Takes care of independence issue if there is one
  2. Independence: observations are independent from one another (met if sampe is random)
  3. Normality
    1. Means need an approximate normal distribution
      • \(n \geq 30\)
      • Distribution is normal
      • Assess normality with graph
    2. Proportions need \(n \geq60\) (via CLT)

If assumptions are violated, the results from the analyses are not valid nor reliable

Estimating \(\mu\) when \(\sigma\) is known

A consumer testing agency wants to evaluate the claim made by a manufacturer of discount tires; the claim is that its tires can be driven at least 35,000 miles before wearing out. Assume that these tires have a normal distribution and its standard deviation is 5,000 miles.

To determine the average number of miles that can be obtained from the tires, the agency randomly selects 60 tires from the manufacturer’s warehouse and places the tires on 15 similar cars driven by test drivers on a 2-mile oval track, with sample mean of 31,470 miles

\[\overline{X}=31470,~\sigma=5000,~n=60\]

\[se=\frac{5000}{\sqrt{60}}=645.4972244\approx 645.5\]

Estimate \(\mu\), the true mean mileage of the discount tires, with 90% confidence

\[31470 \pm (1.645)(645.5)=31470 \pm 1061.8=(30408.2,32531.8)\]
Interpretation: We are 90% confident the true average lifetime of these tires is between 30,408 and 32,532 miles.

Estimate \(\mu\), the true mean mileage of the discount tires, with 95% confidence

\[31470 \pm (1.96)(645.5)=31470 \pm 1265.2=(30204.8,32735.2)\]
Interpretation: We are 95% confident the true average lifetime of these tires is between 30,205 and 32,735 miles.

Estimate \(\mu\), the true mean mileage of the discount tires, with 99% confidence

\[31470 \pm (2.576)(645.5)=31470 \pm 1662.8=(29807.2,33132.8)\]
Interpretation: We are 99% confident the true average lifetime of these tires is between 29,807 and 33,133 miles.

Cost of Increasing Confidence

Note that every time the confidence level increased, the z-score increased thus increasing the margin of error (bound), which in turn increased the width of the interval. With increased width of intervals, the precision decreases (because the interval is wide). The one thing that can decrease the width is the sample size; larger sample sizes yield smaller bounds (moe)

Garfield morning weather
Garfield morning weather

CI for \(p\), proportion

\[\hat p \pm bound=\hat p \pm z^{\star}(se)\]

Where \(bound=z^{\star}(se)\) and \(se=\sqrt{\frac{\hat p\hat q}{n}}\), \(z^{\star}\) comes from the table the same way as previous example with \(\mu\) CI

Estimating \(p\) with 90% confidence

In a given town, a random sample of 892 voters contained 500 people who favored a particular bond issue. Find the true proportion of voters who favor the particular bond with 90% confidence

\(\hat p=\frac{X}{n}\) where \(X\) is the count of successes and \(n\) is the sample size. \(\frac{500}{892}=0.561\)

\(se=\sqrt{\hat p\hat q/n}=\sqrt{(0.56)(1-0.56)/892}=0.0166\)

\[0.56 \pm (1.645)(0.0166)=0.56 \pm 0.0273=(0.5327,0.5873)\]

Interpretation: We are 90% confident the true proportion of voters who favor the particular bond issue is between 53.27% and 58.73%.

Small-Sample Estimation of a Population Mean

In this section students will:

  1. Learn about degrees of freedom and Student’s \(t\)-Distribution
  2. Find the critical values using degrees of freedom corresponding to a given confidence level for a \(t\)-interval
  3. Construct confidence intervals for \(\mu\) when \(\sigma\) is unknown
  4. Interpret the results of confidence intervals for \(\mu\) when \(\sigma\) is unknown
  5. Learn about one-sided CIs

Student’s \(t\) Distribution

What happens when we do not know the standard deviation and/or the sample size is small (\(n<30\))? Sometimes the \(z\) distribution may not be conservative enough. There is a distribution that is similar to the \(z\) distribution but made more for distributions with heavier tails (more area in the tails than \(z\)).

It is called Student’s \(t\) distribution. It was created by a quality control manager at Guinness Beer named W. S. Gosset in 1908. He worked in quality control and worked with small samples. He couldn’t publish the results of his study under his true name because of his work contract – no company secrets to be given out.

The variability in the \(t\) distribution is contributed by two random quantities, \(\bar{x}\) and \(s\), which are independent of each other; thus when \(\bar{x}\) is very large, \(s\) may be very small, and vice versa. Because of this, \(t\) will be more variable than \(z\) in repeated sampling. The variability in \(t\) decreases and \(n\) increases because \(s\) (the estimate of \(\sigma\)) will be based on more and more information. When \(n\) is infinitely large, the \(t\) and \(z\) distributions will be identical. In fact \[\lim_{n\to\infty} t\rightarrow z\]

\(t\) logistics

\(t\) needs two things:

  1. \(df\), degrees of freedom (\(df=n-1\))
  2. \(CL\) or \(\alpha\)

The divisor of the sum of squared deviations, (\(n-1\)), that appears int he formula for \(s^2\) is called the number of degrees of freedom (\(df\)) associated with \(s^2\) and with the statistic \(t\). The term degrees of freedom is linked to the statistical theory underlying the probability distribution of \(s^2\) and deals with the number of independent squared deviations available for estimating \(\sigma^2\)

\[t\sim N(0,1,df)\]

Student’s \(t\) graphs

Z vs. t with varying df

\(z\) and \(t\) with varying \(df\)

Z vs. t with varying df

How to find \(t^{\star}\)

Using t-table:

  1. Subtract the confidence level (CL) from 1: \(1-CL=\alpha\), where \(\alpha\) is the left over area
  2. Find \(\alpha\) on the row at the top of the table labeled ‘two tails’
  3. Find \(df\) on the row along the side
  4. The t value is where the row (\(df\)) and column (\(\alpha\) and two-tailed) meet

\(t^{\star}\) for 90% CI

90%: \(t_{90\%,df}\) \(1-0.9=0.1\), \(df=19\), 2T. \(t^{\star}=t_{90\%,19}=1.729\)

t for 90% CL with df=19

\(t^{\star}\) for 95% CI

95%: \(t_{95\%,df}\) \(1-0.95=0.05\), \(df=19\), 2T. \(t^{\star}=t_{95\%,19}=2.093\)

t for 95% CL with df=19

\(t^{\star}\) for 99% CI

99%: \(t_{99\%,df}\) \(1-0.99=0.01\), \(df=19\), 2T. \(t^{\star}=t_{99\%,19}=2.861\)

t for 99% CL with df=19

Form for CI on \(\mu\) with \(t\)

\[\overline{X}\pm t^{\star}(se)\]

Where \(df=n-1\), and \(se=\frac{s}{\sqrt{n}}\)

Estimating \(\mu\) with \(t\)

A product comes in cans labeled “38 oz”, and a random sample of 10 cans had the following weights:
{34.6,39.65,34.75,40,39.5,38.9,34.25,36.8,39,37.2}, with sample mean 37.465 and standard deviation 2.2653244. Estimate \(\mu\), the true average weight of the product, with 98% confidence, interpret

       mean       sd
[1,] 37.465 2.265324

Boxplot of product weightsBoxplot of product weights

95% CI for \(\mu\) with \(t\)

\(t^{\star}=t_{98\%,df}\) where \(df=n-1=10-1=9\) so \(t_{98\%,9}=t_{0.02,df=9,2T}=2.821\), \(se=\frac{s}{\sqrt{n}}=\frac{2.265}{\sqrt{10}}=0.716\)

\[37.465 \pm (2.821)(0.716)=37.465 \pm 2.0198=(35.45,39.48)\]
Interpretation: We are 98% confident the true average weight of product is between 35.45 and 39.48 ounces.

One-Sided CIs (Confidence Bounds)

The CIs discussed thus far give both a lower bound and an upper bound for the CI about the parameter being estimated. In some circumstances, an investigator may want to only one of these two types of bounds. As an example, a psychologist may wish to calculate a 95% upper confidence bound for true average reaction time to a particular stimulus, or a reliability engineer may want only a lower confidence bound for a true average lifetime of components of a certain type.

Upper confidence bound for \(\mu\)
\[\bar{x}+z^{\star}(se)=(-\infty,upper~bound)\]

Lower confidence bound for \(\mu\)
\[\bar{x}-z^{\star}(se)=(lower~bound,\infty)\]
Example: The slant shear test is the most widely accepted procedure for assessing the quality of a bond between a repair material and its concrete substrate. In a random sample of 48 shear strength observations gave a sample mean strength of 17.17 \(N/mm^2\) and a standard deviation of 3.28 \(N/mm^2\). A lower confidence bound for true average shear strength \(\mu\) with a confidence level 95% is \[17.17-(1.645)(3.28/\sqrt{48})=17.17-0.78=16.39~N/mm^2\]
That is, with 95% confidence, the true mean strength is more than 16.39 \(N/mm^2\)