Mathematical definition and calculation formula of a confidence interval

Introduction

A confidence interval (CI) is a range of values that is likely to contain the true population parameter with a specified level of confidence. It is a fundamental concept in inferential statistics, providing a measure of precision and uncertainty associated with sample data. The CI is constructed using the sample mean, standard error, and a critical value derived from the desired confidence level. This article delves into the mathematical foundations of confidence intervals, focusing on their definition, calculation formulas, and practical applications.

Mathematical Definition of a Confidence Interval

A confidence interval is defined as a statistical interval that estimates the range within which a population parameter lies, based on sample data. The interval is calculated using the formula:
$$ \text{CI} = \bar{x} \pm z^* \cdot \frac{\sigma}{\sqrt{n}} \quad \text{or} \quad \text{CI} = \bar{x} \pm t^* \cdot \frac{s}{\sqrt{n}} $$
where:

  • $\bar{x}$ is the sample mean,
  • $z^$ or $t^$ is the critical value corresponding to the desired confidence level,
  • $\sigma$ is the population standard deviation (if known),
  • $s$ is the sample standard deviation,
  • $n$ is the sample size.

The critical value $z^$ or $t^$ is determined based on the confidence level and the distribution of the data. For example, a 95% confidence level corresponds to a critical value of $z^* = 1.96$ for a normal distribution, while a 99% confidence level uses $z^* = 2.576$. For small sample sizes or unknown population standard deviations, the t-distribution is used instead of the z-distribution.

Confidence Level and Its Relation to the Interval

The confidence level represents the probability that the interval will contain the true population parameter. For instance, a 95% confidence level implies that if the sampling process were repeated many times, 95% of the constructed intervals would contain the true parameter. The confidence level is directly related to the critical value, as it dictates the width of the interval. A higher confidence level results in a wider interval, while a lower confidence level produces a narrower interval.

The relationship between the confidence level and the critical value is governed by the standard normal distribution (for z-intervals) or the t-distribution (for t-intervals). The critical value is derived from the inverse of the cumulative distribution function (CDF) of the respective distribution. For example, for a 95% confidence level, the critical value $z^$ is the value such that $P(Z < z^) = 0.975$ for a standard normal distribution. This value is then used to calculate the margin of error.

Calculation Process of a Confidence Interval

The process of calculating a confidence interval involves several steps:

  1. Collect Sample Data: Gather a random sample from the population.
  2. Compute the Sample Mean ($\bar{x}$): Calculate the average of the sample data.
  3. Determine the Standard Error:
    • If the population standard deviation ($\sigma$) is known, the standard error (SE) is $\frac{\sigma}{\sqrt{n}}$.
    • If the population standard deviation is unknown, the sample standard deviation ($s$) is used, and the standard error is $\frac{s}{\sqrt{n}}$.
  4. Identify the Critical Value: Select the appropriate critical value ($z^$ or $t^$) based on the desired confidence level and the distribution of the data.
  5. Calculate the Margin of Error: The margin of error (ME) is given by $ME = z^* \cdot \frac{\sigma}{\sqrt{n}}$ or $ME = t^* \cdot \frac{s}{\sqrt{n}}$.
  6. Construct the Confidence Interval: The confidence interval is then computed as $\text{CI} = \bar{x} \pm ME$.

For example, consider a sample mean of 50 with a standard deviation of 10 and a sample size of 25. Using a 95% confidence level, the critical value $z^* = 1.96$. The standard error is $\frac{10}{\sqrt{25}} = 2$. The margin of error is $1.96 \cdot 2 = 3.92$, and the confidence interval is $50 \pm 3.92$, or [46.08, 53.92].

Applications and Real-World Examples

Confidence intervals are widely used in various fields, including economics, biology, and engineering, to estimate population parameters based on sample data. In economics, they are used to estimate the average income of a population, while in biology, they help determine the effectiveness of a new drug.

A practical example involves