# 4.2 - Introduction to Confidence Intervals

In Lesson 4.1 we learned how to construct sampling distributions when population values were known. In real life, we don't typically have access to the whole population. In these cases we can use the sample data that we do have to construct a confidence interval to estimate the population parameter with a stated level of confidence. This is one type of statistical inference.

Confidence Interval
A range computed using sample statistics to estimate an unknown population parameter with a stated level of confidence

## Example: Statistical Anxiety Section

The statistics professors at a university want to estimate the average statistics anxiety score for all of their undergraduate students. It would be too time consuming and costly to give every undergraduate student at the university their statistics anxiety survey. Instead, they take a random sample of 50 undergraduate students at the university and administer their survey.

Using the data collected from the sample, they construct a 95% confidence interval for the mean statistics anxiety score in the population of all university undergraduate students. They are using $$\bar{x}$$ to estimate $$\mu$$. If the 95% confidence interval for $$\mu$$ is 26 to 32, then we could say, “we are 95% confident that the mean statistics anxiety score of all undergraduate students at this university is between 26 and 32.” In other words, we are 95% confident that $$26 \leq \mu \leq 32$$. This may also be written as $$\left [ 26,32 \right ]$$.

At the center of a confidence interval is the sample statistic, such as a sample mean or sample proportion. This is known as the point estimate. The width of the confidence interval is determined by the margin of error. The margin of error is the amount that is subtracted from and added to the point estimate to construct the confidence interval.

Point Estimate
Sample statistic that serves as the best estimate for a population parameter
Margin of Error
Half of the width of a confidence interval; equal to the multiplier times the standard error
General Form of Confidence Interval
$$sample\ statistic \pm margin\ of\ error$$
$$margin\ of\ error=multiplier(standard\ error)$$

The margin of error will depend on two factors:

1. The level of confidence which determines the multiplier
2. The value of the standard error

In Lesson 2 you first learned about the Empirical Rule which states that approximately 95% of observations on a normal distribution fall within two standard deviations of the mean.  Thus, when constructing a 95% confidence interval your textbook uses a multiplier of 2.

General Form of 95% Confidence Interval
$$sample\ statistic\pm2\ (standard\ error)$$

## Example: Proportion of Dog Owners Section

At the beginning of the Spring 2017 semester a representative sample of 501 STAT 200 students were surveyed and asked if they owned a dog. The sample proportion was 0.559. Bootstrapping methods, which we will learn later in this lesson, were used to compute a standard error of 0.022. We can use this information to construct a 95% confidence interval for the proportion of all STAT 200 students who own a dog.

0.559 ± 2(0.022)
0.559 ± 0.044
[0.515, 0.603]

I am 95% confident that the population proportion is between 0.515 and 0.603.

## Example: Mean Height Section

In a random sample of 525 Penn State World Campus students the mean height was 67.009 inches with a standard deviation of 4.462 inches. The standard error was computed to be 0.195. Construct a 95% confidence interval for the mean height of all Penn State World Campus students.

95% confidence interval:

67.009 ± 2(0.195)
67.009 ± 0.390
[66.619, 67.399]

I am 95% confident that the mean height of all Penn State World Campus students is between 66.619 inches and 67.399 inches.