Confidence Intervals for Mean

Fei Ye

January 2024

1. Learning Goals


2. Point Estimation


3. Example: Estimating Population Proportion

From a box of 20 pencils of two colors, black and blue, 10 pencils were randomly drawn. 6 out of the 10 pencils are black. What proportion of black pencils are in the box.

Solution: Since the sample proportion is 0.6, one may make a point estimation that 60% of the box, or 12 are black pencils. However, we don’t know how close the sample proportion is to the population proportion.


4. Interval Estimation


5. Example: Interval Estimate of Average GPA

Recall that the standard error of a statistic, denoted by SE, is the standard deviation of the sampling distribution.

A randomly selected 100 students at a college have an average GPA 3.0. How likely does the interval \([3.0-2\cdot\text{SE}, 3.0+2\cdot\text{SE}]\) contain the average GPA \(\mu\) of that college?

Solution: The probability that the interval \([3.0-2\cdot\text{SE}, 3.0+2\cdot\text{SE}]\) contains the population mean \(\mu\) equals the probability that the sample statistic 3.0 lies in the interval \([\mu-2\cdot\text{SE}, \mu+2\cdot\text{SE}]\). Since, \([\mu-2\cdot\text{SE}, \mu+2\cdot\text{SE}]\) contains 95.5% of data of the population.

That means, we can be 95.5% confidence that the average GPA \(\mu\) of that college is in the interval \([3.0-2\cdot\text{SE}, 3.0+2\cdot\text{SE}]\).


6. Confidence Interval (1 of 2)


7. Confidence interval (2 of 2)


8. Distribution of Confidence Intervals


9. Confidence Interval with Known Population SD

The critical value \(z_{\alpha/2}\) satisfies that \(P(Z<z_{\alpha/2})=1-\alpha/2=(1+\text{confidence level})/2=0.5 + \text{confidence level}/2\) for the standard normal variable \(Z\).


10. Example: Find Critical Values

A sample of size 15 drawn from a normally distributed population with the standard deviation 6. Find the critical value \(z_{\alpha/2}\) needed in construction of a confidence interval:

  1. when the level of confidence is 90%;
  2. when the level of confidence is 98%.

Solution: To find the critical value \(z_{\alpha/2}\) with a given confidence level, the Excel function =NORM.S.INV(0.5+confidence level/2) can be used.

  1. At the 90% level of confidence the critical value is

    \(z_{\alpha/2}=\) =NORM.S.INV(0.5+0.9/2) \(=1.6449\).

  2. At the 98% level of confidence the critical value is

    \(z_{\alpha/2}=\) =NORM.S.INV(0.5+0.9/2) \(=2.3263\).

Checkout this normal distribution interactive app


11. Example: Mean GPA (1 of 2)

A random sample of 50 students from a college gives a mean GPA 2.51. Suppose the standard deviation of GPA of all students at the college is 0.43. Construct a 99% confidence interval for the mean GPA of all students at the college.

Solution: We first gather information from the question:


12. Example: Mean GPA (2 of 2)

Now let’s find the critical value, the standard error, the margin of error, and bounds of the confidence interval.

Conclusion: With 99% confidence, we can assure that the average GPA of all students is between \(2.35\) and \(2.67\). Conclusion: With 99% confidence, we may conclude that the mean GPA of all students at the college is between 2.35 and 2.67.

}

13. Student’s \(t\)-Distribution

t-curves


14. Remarks


15. Properties of Student’s \(t\)-Distribution


16. Visualization: \(t\)-distributions

Source: https://rpsychologist.com/d3/tdist/


17. Confidence Intervals with Unknown Population SD


18. Example: Critical Values for \(t\)-Distributions

A sample of size 15 drawn from a normally distributed population. Find the critical value \(t_{\alpha/2}\) needed in construction of a confidence interval:

  1. when the level of confidence is 99%;
  2. when the level of confidence is 95%.

Solution: To find the critical value \(t_{\alpha/2}\), we may use the Excel function T.INV(left tail area, df) or T.INV.2T(tail areas, df).

  1. Since the confidence level is \(1-\alpha=0.99\), the critical value is \(t_{\alpha/2}\) ==T.INV(0.5+0.99/2, 15-1)=2.9768.

  2. Since the confidence level is \(1-\alpha=0.95\), the critical value is \(t_{\alpha/2}\) ==T.INV(0.5+0.95/2, 15-1)=2.1448.

Checkout this t-distribution interactive app


19. Example: Confidence Interval with Unknown \(\sigma\)

A sample of size 16 is randomly drawn from a normally distributed population. The sample has a mean 79 and standard deviation 7. Construct a confidence interval for that population mean at the 90% level of confidence.

Solution: Since the population is normally distributed, and the population standard deviation is unknown, we apply the formula \(\text{E}=t_{\alpha/2}\cdot\dfrac{s}{\sqrt{n}}\) for marginal error.

At 90% confidence level, the critical value is \(t_{\alpha/2}=\) T.INV(0.5+0.9/2, 16-1) \(\approx 1.753\).

Then the marginal error is \(\text{E}=1.753\cdot 7/\sqrt{16}\approx 3\). Thus \(\bar{x}-\text{E}=79-3=76\) and \(\bar{x}+\text{E}=79+3=82\).

With 90% confidence, we may conclude that the population mean is in the interval \([76, 82]\).

}

20. Example: Average Working Hours

The data blow shows numbers of hours worked from 40 randomly selected employees from several grocery stores in the county.

30 26 33 26 26 33 31 31 21 37 27 20 34 35 30 24 38 34 39 31
22 30 23 23 31 44 31 33 33 26 27 28 25 35 23 32 29 31 25 27

Construct 99% confidence interval for the mean worked time.

Solution: Since the sample size is 40 (>30), by the central limit theorem, the sample mean is approximately normally distributed. Applying the Excel functions AVERAGE() and STDEV.S() to the data, we find that the sample mean \(\bar{x}\approx 29.6\) and the sample standard deviation \(s\approx 5.3\).

Since the population standard deviation is unknown, we use the \(t\)-distribution to find the critical value \(t_{\alpha/2}=\) T.INV(0.5+0.99/2, 40-1) \(\approx 2.7\). The marginal error is \(\text{E}=t_{\alpha/2}\cdot\dfrac{s}{\sqrt{n}}=\) =T.INV(0.5+0.99/2, 40-1)*STDEV.S(5.3)/SQRT(40) \(\approx 2.3\). Thus, \(\bar{x}-\text{E}=29.6-2.3=27.3\) and \(\bar{x}+\text{E}=29.6+2.3=31.9\)

With a 99% confidence, one may conclude that the average worked hours of employees in all grocery stores is between 27.3 and 31.9 hours.


21. Choose Normal Distribution or \(t\)-Distribution


Practice: Conceptual Questions on Confidence Intervals

Decide whether the following statements are true or false. Explain your reasoning.

Source: Conceptual Questions on Confidence Intervals


Practice: Find the Critical \(z\)-Value


Practice: Find the Marginal Error with known \(\sigma\)


Practice: Confidence Interval for SAT Scores with Known \(\sigma\)


Practice: Find the Critical \(t\)-Value


Practice: Find the Marginal Error with Unknown \(\sigma\)


Practice: Confidence Interval from a Data Set


Lab Instructions in Excel


22. Excel Functions for \(t\)-Distributions

Suppose a Student’s \(t\)-distribution has the degree of freedom \(\text{df}=n-1\).


23. Excel Functions for Marginal Errors


Lab Practice: Confidence Interval Without \(\sigma\)

Four hundred randomly selected working adults in a certain state, including those who worked at home, were asked the distance from their home to their workplace. The average distance was 8.84 miles with standard deviation 2.70 miles.

Construct a 98% confidence interval for the mean distance from home to work for all residents of this state.

Source: Exercise 8 in Section 7.1 in Introductory Statistics