Confidence Interval Notes Calculating Confidence Intervals Calculating One-Population Mean Confidence Intervals for Quantitative Data It is always best to use a computer program to make these calculations, but this will explain what the computer is doing. General Confidence Interval Formula: Sample Value ± Margin of Error Sample Value ± (Critical Value x Standard Error x = sample mean s = standard deviation n = sample size (frequency T = critical value T-score for a 90%,95% or 99% confidence level ss nn = Standard Error estimate T ss = Margin of Error estimate nn Formula: x ± (T ss nn
Example 1: Create a 95% confidence interval estimate of the population mean average for women s height in inches. Statistics calculated from the Health Data. (Round answer to the hundredths place. x = 63.195 inches s = 2.741 inches n = 40 women T = ±2.0236 (Critical Value T-score from chart with df = 39 Confidence Interval Calculation Formula: x ± (T ss nn 63.195 ± (2.0236 2.741 40 63.195 ± (2.0236 x 0.43339 63.195 ± 0.877 ( 63.195 0.877, 63.195 + 0.877 ( 62.318, 64.072 ( 62.32 inches, 64.07 inches OR 62.32 inches µ 64.07 inches Standard Error = 0.433 inches Margin of Error = 0.877 inches Sentence to Explain: We are 95% confident that the population mean average height of women is between 62.32 inches and 64.07 inches. (Note: The accuracy of this confidence interval is improved by using a T-score instead of the Z-score.
Example 1 with Technology: No one working in the field of data science or statistics would calculate that confidence interval the way we just did. They would use a computer program. Statcato: To calculate 1 population mean confidence interval for quantitative data with Statcato, go to the Statistics menu and click on Confidence Intervals. Then click on 1-Population Mean. You then have a choice to calculate the confidence interval from raw data or from summary data (sample mean, sample standard deviation, sample size. If you have the raw data in column C1 for example, click on Samples in Column and type in C1. Type in your confidence level at the bottom of the page and push OK. If you have summarized data given to you (mean, standard deviation and sample size, click on Summarized Sample Data and enter the sample mean, sample standard deviation and sample size in the appropriate boxes. Then type in your confidence level at the bottom of the page and push OK. For the women s height example, it would look like this.
Here is the printout from Statcato. Notice the numbers are about the same as what we calculated. Statcato used a T-score instead of a Z-score, since the T-score is more accurate for confidence intervals estimating the mean when you have a sample data.
Calculating One-Population Proportion (% Confidence Interval for Categorical Data It is always best to use a computer program to make these calculations, but this will explain what the computer is doing. General Confidence Interval Formula: Sample Value ± Margin of Error Sample Value ± (Critical Value x Standard Error p = sample proportion = xx nn x = number of successes n = sample size (frequency Z = critical value z-score for a 90%,95% or 99% confidence level p (1 p nn = Standard Error estimate z p (1 p = Margin of Error estimate nn Formula: p ± ( z p (1 p nn
Example 2: Create a 99% confidence interval estimate of the population proportion (% of children s cereals. Statistics calculated from the Cereal Data. (Round proportion answer to the thousandths place and the % answer to the tenths place. p = sample proportion = xx = 8 = 0.333 nn 24 x = 8 children s cereals n = 24 total cereals Z = ±2.576 Confidence Interval Calculation Formula: p ± ( z p (1 p nn 0.333 ± (2.576 0.333(1 0.333 24 0.333 ± (2.576 0.333(0.667 24 0.333 ± (2.576 x 0.0962 0.333 ± (0.2478 ( 0.333 0.2478, 0.333 + 0.2478 (0.0852, 0.5808 (0.085, 0.581 or ( 8.5%, 58.1% or 0.085 p 0.581 or 8.5% p 58.1% Standard Error = 0.096 or 9.6% Margin of Error = 0.248 or 24.8% Sentence to Explain: We are 99% confident that the population percentage (proportion of cereals that target children is between 8.5% and 58.1%. (Note: This confidence interval is not very accurate because there is a sampling bias in this data set. We will see later that this data set was too small to estimate the population value with this method of calculation.
Example 2 with Technology: No one working in the field of data science or statistics would calculate that confidence interval the way we just did. They would use a computer program. Statcato: To calculate 1 population proportion (% confidence interval for categorical data with Statcato, go to the Statistics menu and click on Confidence Intervals. Then click on 1-Population Proportion. You then have a choice to calculate the confidence interval from raw data or from summary data (number of events (successes, number of trials (sample size. If you have the raw data in column C1 for example, click on Samples in Column and type in C1. Type in your confidence level at the bottom of the page and push OK. If you have summarized data given to you (number of events and total number of trials, click on Summarized Sample Data and enter the number of events and number of trials in the appropriate boxes. Then type in your confidence level at the bottom of the page and push OK. For the proportion of children s cereal example, it would look like this.
Here is the printout from Statcato. Notice the numbers are the same as our calculation by hand. Computer programs tend to use Z-scores for proportion (% problems.