Confidence Intervals

A confidence interval (CI) is a range of values used to estimate an unknown population parameter, such as the true proportion of people who support a government initiative. Instead of measuring the entire population, researchers collect a sample and use statistical methods to infer information about the larger group.

Key components of confidence intervals include:

  • Sample Mean (x̄): The average value from the sample, used as the center of the confidence interval
  • Margin of Error (ME): The possible difference between the sample result and the true population value
  • Confidence Level (1 − α): The probability that the confidence interval includes the true population value (i.e. 95% means we are 95% sure the interval contains the true value)

Formulas

Probability of Success

The probability of success in a given sample is represented as:

\(p = \hat{p}\)

Where:

  • \(p\) is the probability of success on a single trial
  • \(\hat{p}\) is the sample proportion

Probability of Failure

The probability of failure is given by:

\(q = 1 - p\)

Where:

  • \(q\) is the probability of failure on a single trial
  • \(p\) is the probability of success on a single trial

Confidence Interval for Mean

For a normal distribution, the confidence interval for a Population Mean (\(\mu\)) is calculated as:

\(P\left(\bar{x} - z_{\alpha/2} \left(\cfrac{\sigma}{\sqrt{n}}\right) < \mu < \bar{x} + z_{\alpha/2} \left(\cfrac{\sigma}{\sqrt{n}}\right)\right) = 1 - \alpha\)

A simplified form for the P% confidence interval is:

\(\bar{x} \pm z_{\alpha/2} \left(\cfrac{\sigma}{\sqrt{n}}\right)\)

Where:

  • \(\bar{x}\) is the sample mean
  • \(z_{\alpha/2}\) is the critical value from the standard normal distribution
  • \(\sigma\) is the population standard deviation (or estimated from the sample)
  • \(n\) is the sample size
  • \(\mu\) is the population mean
  • \(\alpha\) is the significance level, and \(\alpha = (100 - P)\%\)

Confidence Interval for Proportion

For a Population Proportion based on binomial data, the confidence interval is given by:

\(\hat{p} \pm z_{\alpha/2} \left(\cfrac{\sqrt{pq}}{\sqrt{n}}\right)\)

Where:

  • \(\hat{p}\) is the sample proportion
  • \(z_{\alpha/2}\) is the critical value from the standard normal distribution
  • \(p\) is the probability of success
  • \(q\) is the probability of failure
  • \(n\) is the sample size

Sample Size & Margin of Error

For a specified Margin of Error \((w)\) the required sample size is calculated as:

\(n = \left(\cfrac{z_{\alpha/2} \cdot \sigma}{w}\right)^2\)

Where:

  • \(n\) is the sample size
  • \(z_{\alpha/2}\) is the critical value from the standard normal distribution
  • \(\sigma\) is the population standard deviation
  • \(w\) is the margin of error

These formulas help determine confidence intervals and required sample sizes when estimating population parameters based on sample data. They account for sampling variability and ensure that estimates remain within a specified level of accuracy.


Example

A sample of 100 students has an average test score of 75 with a standard deviation of 10. Find the 95% confidence interval.

First, we can identify the given values:

  • Sample Mean: \(\bar{x} = 75\)
  • Standard Deviation: \(\sigma = 10\)
  • Sample Size: \(n = 100\)
  • Critical Value: \(z_{0.025} = 1.96\)

Next, we can calculate the Standard Error. This measures the variability of the sample mean:

\(\sigma_x = \cfrac{\sigma}{\sqrt{n}} \)

\(\sigma_x = \cfrac{10}{\sqrt{100}}\)

\(\sigma_x = \cfrac{10}{10}\)

\(\sigma_x = 1\)

Then, we can find the Margin of Error:

\(w = z_{0.025} \times \sigma_x\)

\(w = 1.96 \times 1\)

\(w = 1.96\)

Finally, we can construct the interval by adding or subtracting the margin of error to the sample mean. We can do so using the following formula:

\(CI = \bar{x} \pm w\)

We can determine the lower interval value by subtracting the Margin of Error to the average test score:

\(CI_1 = 75 - 1.96\)

\(CI_1 = 73.04\)

We can determine the higher interval value by adding the Margin or Error to the average test score:

\(CI_2 = 75 + 1.96\)

\(CI_2 = 76.96\)

Therefore, we can determine the Confidence Interval is (73.04, 76.96). This means we are 95% confident that the true average test score lies between 73.04 and 76.96.


In a survey of 500 voters, 320 support a new policy. Find the 99% confidence interval for the proportion of supporters.

First, we can determine probabilities. We can start by calculating the sample proportion:

\(p = \hat{p}\)

\(p = \cfrac{320}{500} = 0.64\)

Next, we can calculate the Probability of Failure:

\(q = 1 - p\)

\(q = 1 - 0.64\)

\(q = 0.36\)

Then, we can identify the Critical Value:

\(z_{0.005} = 2.576 \)

For 99% confidence, this reflects the higher certainty level.

After, we can calculate the Standard Error:

\(\sigma_x = \sqrt{\cfrac{(0.64)(0.36)}{500}}\)

\(\sigma_x = \sqrt{\cfrac{0.2304}{500}}\)

\(\sigma_x = \sqrt{0.0004608} \)

\(\sigma_x = 0.02147\)

Furthermore, we can find the Margin of Error:

\(w = z_{0.025} \times \sigma_x\)

\(w = 2.576 \times 0.02147\)

\(w = 0.0553\)

Finally, we can construct the interval by adding or subtracting the margin or error to the sample proportion:

\(CI = \bar{x} \pm w\)

We can determine the lower interval value by subtracting the Margin of Error to the average test score:

\(CI_1 = 0.64 - 0.0553\)

\(CI_1 = 0.5847\)

We can determine the higher interval value by adding the Margin of Error to the average test score:

\(CI_2 = 0.64 + 0.0553\)

\(CI_2 = 0.6953 \)

Therefore, we can determine the Confidence Interval is (58.47%, 69.53%). We are 99% confident that the true proportion of supporters is between 58.47% and 69.53%.


A researcher wants to estimate the average weight of fish with a margin of error of 2 kg and 95% confidence. The estimated standard deviation is 12 kg. Find the required sample size.

We can use the following Sample Size formula:

\[ n = \left(\cfrac{z_{\alpha/2} \cdot \sigma}{w}\right)^2 \]

This ensures the margin of error is met.

First, we can identify the given values:

  • Margin of Error: \(w = 2\)
  • Population Standard Deviation: \(\sigma = 12\)
  • Critical Value: \(z_{0.025} = 1.96\)

Next, can calculate the numerator:

\(z_{\alpha/2} \cdot \sigma = 1.96 \times 12\)

\(z_{\alpha/2} \cdot \sigma = 23.52\)

Then, we can divide the numerator by the margin of error:

\(n = \cfrac{23.52}{2}\)

\(n = 11.76 \)

Finally, we can square the value and then round the result to the closest whole number:

\(n = (11.76)^2\)

\(n \approx 138 \)

Therefore, we can determine the required Sample Size is 138. The researcher needs to sample at least 138 fish to achieve the desired accuracy.