The Central Idea

Suppose a sample gives a point estimate

\[ \hat{\theta}. \]

Because a different random sample would usually produce a different estimate, we should not treat \(\hat{\theta}\) as exact.

A confidence interval gives a range of parameter values constructed from the sample by a procedure designed to capture the true parameter at a specified long-run rate.

A common structure is

\[ \boxed{ \text{estimate} \pm \text{critical value}\times \text{standard error} }. \]

Point Estimate plus Margin of Error

A confidence interval is often written

\[ \boxed{ \hat{\theta}\pm E }, \]

where

\[ E \]

is the margin of error.

If the interval is

\[ 42\pm 3, \]

then its endpoints are

\[ 39 \]

and

\[ 45. \]

Confidence Level

The confidence level describes the long-run success rate of the interval-producing procedure.

Common choices include:

\[ 90\%,\qquad 95\%,\qquad 99\%. \]

A \(95\%\) confidence procedure is designed so that, under its assumptions, approximately \(95\%\) of intervals produced over repeated samples contain the true parameter.

Confidence Is a Property of the Procedure

In classical frequentist inference, the population parameter is treated as fixed.

The interval endpoints vary from sample to sample.

Before the sample is drawn, the procedure has a specified probability of producing an interval that contains the parameter.

After the interval is calculated, that particular interval either contains the fixed parameter or it does not.

Correct Interpretation of a 95% Confidence Interval

Suppose a \(95\%\) confidence interval for a population mean is

\[ (18.2,\;21.6). \]

A proper frequentist interpretation is:

The interval was produced by a method that, under the stated assumptions, captures the true population mean in approximately \(95\%\) of repeated samples.

A Common Misinterpretation

It is generally incorrect in the classical frequentist framework to say:

“There is a \(95\%\) probability that the fixed parameter lies between \(18.2\) and \(21.6\).”

The \(95\%\) probability statement applies to the random interval procedure before sampling, not to the already fixed parameter after the interval has been observed.

Critical Values

A critical value determines how many standard errors extend from the point estimate.

For a standard normal reference distribution, a two-sided confidence interval often uses

\[ z^\ast. \]

Common values are approximately

\[ 1.645 \]

for \(90\%\),

\[ 1.960 \]

for \(95\%\), and

\[ 2.576 \]

for \(99\%\).

Why 1.96 Appears in a 95% Normal Interval

For a standard normal random variable \(Z\),

\[ P(-1.96\le Z\le 1.96) \approx 0.95. \]

Thus about \(95\%\) of the standard normal distribution lies between \(-1.96\) and \(1.96\).

This central probability becomes the basis for a two-sided \(95\%\) normal-theory interval.

Margin of Error

The margin of error usually has the form

\[ \boxed{ E= \text{critical value}\times \text{standard error} }. \]

A larger critical value produces a wider interval.

A larger standard error also produces a wider interval.

Confidence and Width

Holding the data and standard error fixed, increasing the confidence level increases the critical value.

Therefore,

\[ 99\%\text{ interval} \]

is wider than

\[ 95\%\text{ interval}, \]

which is wider than

\[ 90\%\text{ interval}. \]

Greater confidence requires a wider net.

Sample Size and Width

Standard errors often decrease at a rate proportional to

\[ \frac{1}{\sqrt{n}}. \]

Therefore, larger samples generally produce narrower confidence intervals, other things equal.

This improves precision without changing the nominal confidence level.

Confidence Interval for a Mean with Known \(\sigma\)

Suppose a population has mean \(\mu\), known standard deviation \(\sigma\), and the sampling distribution of the mean is normal or approximately normal.

A two-sided confidence interval is

\[ \boxed{ \bar{x} \pm z^\ast\frac{\sigma}{\sqrt{n}} }. \]

Example: Mean with Known Standard Deviation

Suppose

\[ \bar{x}=80,\qquad \sigma=12,\qquad n=36. \]

For a \(95\%\) confidence interval,

\[ z^\ast=1.96. \]

The standard error is

\[ \frac{12}{\sqrt{36}} = 2. \]

The margin of error is

\[ 1.96(2)=3.92. \]

Therefore,

\[ \boxed{ 80\pm3.92 } \]

or approximately

\[ \boxed{ (76.08,\;83.92) }. \]

Unknown Population Standard Deviation

In practice, the population standard deviation \(\sigma\) is usually unknown.

We estimate it with the sample standard deviation \(s\).

Replacing \(\sigma\) with \(s\) adds uncertainty, so the appropriate reference distribution for a normal population is Student's \(t\) distribution rather than the standard normal distribution.

One-Sample t Interval for a Mean

A standard one-sample \(t\) confidence interval is

\[ \boxed{ \bar{x} \pm t^\ast_{n-1} \frac{s}{\sqrt{n}} }. \]

The degrees of freedom are

\[ n-1. \]

Why the t Critical Value Is Larger

The \(t\) distribution has heavier tails than the standard normal distribution.

This reflects the additional uncertainty created by estimating \(\sigma\) with \(s\).

As the degrees of freedom increase, the \(t\) distribution approaches the standard normal distribution.

Example: One-Sample t Interval

Suppose

\[ \bar{x}=52,\qquad s=10,\qquad n=25. \]

For a \(95\%\) interval with \(24\) degrees of freedom,

\[ t^\ast\approx2.064. \]

The estimated standard error is

\[ \frac{10}{\sqrt{25}} = 2. \]

The margin of error is

\[ 2.064(2)=4.128. \]

Therefore,

\[ \boxed{ (47.872,\;56.128) }. \]

Conditions for a t Interval

A one-sample \(t\) interval for a mean is most directly justified when:

Confidence Interval for a Population Proportion

A common large-sample interval for a population proportion is

\[ \boxed{ \hat{p} \pm z^\ast \sqrt{ \frac{\hat{p}(1-\hat{p})}{n} } }. \]

This is often called the Wald interval.

Example: Proportion Confidence Interval

Suppose

\[ \hat{p}=0.60,\qquad n=600. \]

The estimated standard error is

\[ \sqrt{ \frac{0.60(0.40)}{600} } = 0.02. \]

For \(95\%\) confidence,

\[ E=1.96(0.02)=0.0392. \]

Thus

\[ \boxed{ 0.60\pm0.0392 } \]

or

\[ \boxed{ (0.5608,\;0.6392) }. \]

Success-Failure Condition

A common practical check for the normal approximation used in a proportion interval is that the expected or estimated counts of successes and failures are sufficiently large.

A common classroom rule for the Wald interval is

\[ n\hat{p}\ge10 \]

and

\[ n(1-\hat{p})\ge10. \]

These are approximation guidelines rather than exact mathematical boundaries.

Limitations of the Wald Proportion Interval

The simple Wald interval can perform poorly when:

Improved procedures such as Wilson intervals are often preferred in those settings.

Wilson Score Interval

The Wilson score interval is a widely used alternative to the Wald interval for a binomial proportion.

It has better coverage behavior in many moderate and small samples.

Its algebra is more involved, but modern software makes its computation routine.

Confidence Interval for a Difference in Means

To estimate

\[ \mu_1-\mu_2, \]

we begin with

\[ \bar{x}_1-\bar{x}_2. \]

For independent samples, a common estimated standard error is

\[ \boxed{ \sqrt{ \frac{s_1^2}{n_1} + \frac{s_2^2}{n_2} } }. \]

Welch Two-Sample t Interval

A common interval for two independent means is the Welch interval:

\[ \boxed{ (\bar{x}_1-\bar{x}_2) \pm t^\ast \sqrt{ \frac{s_1^2}{n_1} + \frac{s_2^2}{n_2} } }. \]

The degrees of freedom are estimated using the Welch-Satterthwaite approximation.

This method does not require equal population variances.

Equal-Variance Pooled Interval

If equal population variances are defensible, a pooled estimate can be used.

The pooled variance is

\[ s_p^2 = \frac{ (n_1-1)s_1^2+(n_2-1)s_2^2 }{ n_1+n_2-2 }. \]

The pooled standard error is

\[ s_p \sqrt{ \frac{1}{n_1}+\frac{1}{n_2} }. \]

Without a strong equal-variance justification, Welch's method is generally safer.

Paired Data

When observations naturally occur in pairs, the analysis should usually preserve that pairing.

Examples include:

We define differences

\[ D_i=X_i-Y_i \]

and construct a one-sample \(t\) interval for the mean difference.

Paired t Interval

If

\[ \bar{d} \]

is the sample mean of the paired differences and \(s_d\) is their sample standard deviation, then

\[ \boxed{ \bar{d} \pm t^\ast_{n-1} \frac{s_d}{\sqrt{n}} }. \]

The inferential unit is the pairwise difference, not the two raw samples treated independently.

Confidence Interval for a Difference in Proportions

For independent samples, a large-sample confidence interval for

\[ p_1-p_2 \]

is

\[ \boxed{ (\hat{p}_1-\hat{p}_2) \pm z^\ast \sqrt{ \frac{\hat{p}_1(1-\hat{p}_1)}{n_1} + \frac{\hat{p}_2(1-\hat{p}_2)}{n_2} } }. \]

Example: Difference in Proportions

Suppose

\[ \hat{p}_1=0.64,\qquad n_1=400, \]

and

\[ \hat{p}_2=0.56,\qquad n_2=500. \]

The point estimate is

\[ 0.64-0.56=0.08. \]

The estimated standard error is

\[ \sqrt{ \frac{0.64(0.36)}{400} + \frac{0.56(0.44)}{500} } \approx 0.0327. \]

For \(95\%\) confidence,

\[ E\approx1.96(0.0327)\approx0.0641. \]

The interval is approximately

\[ \boxed{ (0.0159,\;0.1441) }. \]

Finite Population Correction

When sampling without replacement from a finite population and the sampling fraction is substantial, standard errors can be reduced by

\[ \boxed{ \sqrt{ \frac{N-n}{N-1} } }. \]

For a population mean, the standard error becomes

\[ \frac{\sigma}{\sqrt{n}} \sqrt{ \frac{N-n}{N-1} }. \]

Confidence Intervals and Sampling Design

Confidence-interval formulas must match the sampling design.

Cluster sampling, stratification, unequal weights, repeated measurements, and other complex designs can alter standard errors.

A simple-random-sample formula should not be applied mechanically to a complex design.

Weighted Confidence Intervals

Weighted estimates can account for unequal selection probabilities or calibration adjustments.

The confidence interval must use a standard error that also reflects the weighting and design.

Treating a weighted estimate as though it came from an unweighted simple random sample can misstate uncertainty.

Design Effect and Interval Width

If a sampling design has design effect

\[ \operatorname{DEFF}>1, \]

then the estimator has greater variance than the simple-random-sample benchmark.

Since confidence interval width depends on standard error, larger design effects generally produce wider intervals.

Confidence Interval Width

For a symmetric interval,

\[ \text{width}=2E. \]

Therefore, reducing the margin of error by half reduces the total interval width by half.

Planning Sample Size for a Mean

Suppose we want margin of error \(E\) for a mean and use a normal critical value \(z^\ast\).

Starting from

\[ E = z^\ast\frac{\sigma}{\sqrt{n}}, \]

solve for \(n\):

\[ \boxed{ n= \left( \frac{z^\ast\sigma}{E} \right)^2 }. \]

Round upward to ensure the target margin of error is met.

Example: Sample Size for a Mean

Suppose a \(95\%\) confidence interval should have margin of error at most \(2\), and prior information suggests

\[ \sigma\approx10. \]

Then

\[ n = \left( \frac{1.96(10)}{2} \right)^2 = 96.04. \]

Round upward:

\[ \boxed{n=97}. \]

Planning Sample Size for a Proportion

For a proportion,

\[ E= z^\ast \sqrt{ \frac{p(1-p)}{n} }. \]

Solving for \(n\) gives

\[ \boxed{ n = \frac{ (z^\ast)^2p(1-p) }{ E^2 } }. \]

When the Proportion Is Unknown

Before sampling, the population proportion \(p\) may be unknown.

Since

\[ p(1-p) \]

is maximized at

\[ p=0.5, \]

using \(p=0.5\) gives a conservative sample-size requirement.

Example: Sample Size for a Proportion

Suppose a \(95\%\) confidence interval should have margin of error at most \(0.03\), with no prior estimate of \(p\).

Use

\[ p=0.5. \]

Then

\[ n = \frac{ (1.96)^2(0.5)(0.5) }{ (0.03)^2 } \approx1067.11. \]

Round upward:

\[ \boxed{n=1068}. \]

Confidence Intervals Do Not Guarantee Truth

A \(95\%\) confidence procedure misses the true parameter in about \(5\%\) of repeated samples under ideal conditions.

An individual interval can therefore fail even when the procedure is correctly constructed.

Confidence Intervals Do Not Repair Bias

A narrow confidence interval around a biased estimator can be precisely wrong.

Standard confidence intervals mainly quantify uncertainty arising from the modeled sampling variation.

They do not automatically correct:

Confidence Interval versus Prediction Interval

A confidence interval estimates an unknown population parameter.

A prediction interval aims to capture a future observation or outcome.

Prediction intervals are usually wider because they must account for both uncertainty in the estimated center and variability of individual future observations.

Confidence Interval versus Tolerance Interval

A tolerance interval is designed to contain a specified proportion of a population with a stated confidence level.

This is different from estimating a parameter such as the population mean.

Confidence, prediction, and tolerance intervals answer different questions.

One-Sided Confidence Bounds

Sometimes only an upper or lower bound is needed.

A lower confidence bound can have the form

\[ \hat{\theta} - c^\ast\operatorname{SE}(\hat{\theta}), \]

while an upper bound can have the form

\[ \hat{\theta} + c^\ast\operatorname{SE}(\hat{\theta}). \]

The critical value differs from that of a two-sided interval at the same confidence level.

Bootstrap Confidence Intervals

When analytic sampling distributions are difficult to derive, bootstrap resampling can approximate the distribution of an estimator.

Repeated samples are drawn with replacement from the observed data, the statistic is recomputed, and the resulting bootstrap distribution is used to construct an interval.

Percentile Bootstrap Interval

A simple bootstrap method uses empirical quantiles of the bootstrap distribution.

For a \(95\%\) interval, one might use approximately the

\[ 2.5\% \]

and

\[ 97.5\% \]

bootstrap percentiles.

More advanced bootstrap intervals adjust for bias or skewness.

Bootstrap Conditions Matter

Bootstrap methods are not automatic solutions.

They can perform poorly when:

Bayesian Credible Intervals

Bayesian inference produces a posterior distribution for the unknown parameter.

A credible interval contains a specified posterior probability.

For example, a \(95\%\) credible interval can legitimately be interpreted as containing \(95\%\) of the posterior probability for the parameter, given the model and prior.

This differs conceptually from a frequentist confidence interval.

Confidence Intervals and Hypothesis Tests

Confidence intervals and two-sided hypothesis tests are closely related.

In many standard procedures, a parameter value lying outside a \(100(1-\alpha)\%\) confidence interval would be rejected by the corresponding two-sided test at significance level \(\alpha\).

The exact relationship depends on using compatible methods.

Example: Confidence Interval and Null Value

Suppose a \(95\%\) confidence interval for a difference in means is

\[ (1.4,\;5.8). \]

The null value

\[ 0 \]

is not in the interval.

Under the corresponding two-sided procedure, this would align with rejecting equality of the population means at the \(5\%\) significance level.

Statistical Significance and Interval Width

A confidence interval shows both the direction and the range of effect sizes compatible with the procedure.

This is often more informative than a binary declaration of statistical significance.

An interval can reveal whether an effect is:

Practical Significance

A narrow confidence interval entirely above zero may indicate statistical evidence for a positive effect.

But the effect may still be too small to matter operationally, clinically, economically, or scientifically.

Confidence intervals should therefore be compared with meaningful effect thresholds, not only with zero.

Common Error: Saying the Parameter Varies from Sample to Sample

In frequentist inference, the population parameter is fixed.

The sample statistic and confidence interval vary from sample to sample.

The repeated-sampling coverage statement refers to the changing intervals, not to a changing parameter.

Common Error: Saying 95% of the Data Lie in the Confidence Interval

A confidence interval for a mean or proportion is an interval for a parameter.

It is not generally an interval containing \(95\%\) of individual observed values.

That would be a different statistical question.

Common Error: Assuming Higher Confidence Means More Precision

Higher confidence requires a larger critical value.

Therefore, with the same data,

\[ 99\% \]

confidence produces a wider interval than

\[ 95\% \]

confidence.

Higher confidence means less precision in the sense of a wider range.

Common Error: Ignoring Sample Size

Two studies can have the same point estimate but very different interval widths.

Smaller samples generally have larger standard errors and wider confidence intervals, other things equal.

Common Error: Ignoring Design Effects

A confidence interval based on a simple-random-sample standard error can be too narrow if the actual data come from a clustered or otherwise complex design.

The standard error must reflect the actual sampling structure.

Common Error: Treating the Margin of Error as Total Error

A margin of error typically reflects modeled sampling uncertainty.

It does not automatically include:

Common Error: Using z When t Is Appropriate

When estimating a population mean with unknown \(\sigma\), replacing \(\sigma\) with \(s\) introduces additional uncertainty.

For normal-theory inference, the one-sample \(t\) procedure accounts for that uncertainty.

Common Error: Ignoring Pairing

Treating paired observations as independent can produce an incorrect standard error.

The paired design should usually be analyzed through within-pair differences.

Common Error: Overreporting Decimal Places

A confidence interval such as

\[ (12.473819,\;17.926181) \]

may imply more numerical precision than the measurement process and sampling uncertainty justify.

Report a sensible number of digits consistent with the data and purpose.

A Reliable Procedure for Constructing a Confidence Interval

  1. Identify the population parameter.
  2. Identify the point estimator.
  3. Check the sampling design and dependence structure.
  4. Choose the appropriate reference distribution.
  5. Verify approximation or model conditions.
  6. Compute the point estimate.
  7. Compute or estimate the standard error.
  8. Choose the confidence level.
  9. Find the appropriate critical value.
  10. Compute the margin of error.
  11. Construct the interval.
  12. Interpret the interval in the context of the procedure and population.
  13. Report limitations not captured by the interval.

Example: Full Mean Confidence-Interval Workflow

A random sample gives

\[ \bar{x}=68,\qquad s=12,\qquad n=36. \]

The estimated standard error is

\[ \frac{12}{\sqrt{36}}=2. \]

For a \(95\%\) \(t\) interval with \(35\) degrees of freedom,

\[ t^\ast\approx2.030. \]

The margin of error is

\[ 2.030(2)=4.06. \]

Therefore,

\[ \boxed{ 68\pm4.06 } \]

or

\[ \boxed{ (63.94,\;72.06) }. \]

Example: Full Proportion Confidence-Interval Workflow

A random sample of \(800\) people includes \(520\) successes.

The point estimate is

\[ \hat{p} = \frac{520}{800} = 0.65. \]

The estimated standard error is

\[ \sqrt{ \frac{0.65(0.35)}{800} } \approx0.01687. \]

For \(95\%\) confidence,

\[ E = 1.96(0.01687) \approx0.0331. \]

The interval is approximately

\[ \boxed{ (0.6169,\;0.6831) }. \]

Practice 1: Margin of Error

A confidence interval is reported as

\[ 24\pm3.5. \]

What is the margin of error?

Practice 2: Interval Endpoints

Write

\[ 50\pm4 \]

in interval form.

Practice 3: Known-\(\sigma\) Mean Interval

Suppose

\[ \bar{x}=100,\qquad \sigma=20,\qquad n=100. \]

Construct a \(95\%\) confidence interval using \(z^\ast=1.96\).

Practice 4: Proportion Interval

Suppose

\[ \hat{p}=0.50,\qquad n=400. \]

Construct a \(95\%\) Wald confidence interval.

Practice 5: Confidence Level and Width

Using the same data and method, which is wider: a \(90\%\) confidence interval or a \(99\%\) confidence interval?

Practice 6: Sample Size and Width

If the sample size is multiplied by \(4\), approximately what happens to a standard error proportional to \(1/\sqrt{n}\)?

Practice 7: Sample Size for a Mean

Suppose

\[ z^\ast=1.96,\qquad \sigma=15,\qquad E=3. \]

Find the required sample size.

Practice 8: Sample Size for a Proportion

For \(95\%\) confidence with margin of error at most \(0.05\), use

\[ p=0.5 \]

and find the required sample size.

Practice 9: Interpret the Procedure

Explain what a \(95\%\) confidence level means in repeated sampling.

Practice 10: Identify the Error

A student says, “A \(99\%\) confidence interval is always better because it is both more confident and more precise than a \(95\%\) interval.”

Explain the error.

Practice Answers

Practice 1

The margin of error is

\[ \boxed{3.5}. \]

Practice 2

\[ 50-4=46, \] \[ 50+4=54. \]

Therefore,

\[ \boxed{(46,\;54)}. \]

Practice 3

The standard error is

\[ \frac{20}{\sqrt{100}}=2. \]

The margin of error is

\[ 1.96(2)=3.92. \]

Therefore,

\[ \boxed{ (96.08,\;103.92) }. \]

Practice 4

The estimated standard error is

\[ \sqrt{ \frac{0.5(0.5)}{400} } = 0.025. \]

The margin of error is

\[ 1.96(0.025)=0.049. \]

Therefore,

\[ \boxed{ (0.451,\;0.549) }. \]

Practice 5

The

\[ \boxed{99\%} \]

interval is wider because it uses a larger critical value.

Practice 6

Multiplying \(n\) by \(4\) divides the standard error by

\[ \sqrt{4}=2. \]

The standard error is therefore cut approximately in half.

Practice 7

\[ n = \left( \frac{1.96(15)}{3} \right)^2 = (9.8)^2 = 96.04. \]

Round upward:

\[ \boxed{97}. \]

Practice 8

\[ n = \frac{ (1.96)^2(0.5)(0.5) }{ (0.05)^2 } = 384.16. \]

Round upward:

\[ \boxed{385}. \]

Practice 9

Under the stated assumptions, if the same sampling and interval procedure were repeated many times, approximately \(95\%\) of the resulting intervals would contain the true parameter.

Practice 10

A \(99\%\) interval has a higher confidence level, but it also uses a larger critical value and is therefore wider than the corresponding \(95\%\) interval.

Higher confidence comes at the cost of lower precision in the sense of a wider interval.

What to Remember

Confidence intervals combine point estimation with sampling uncertainty.

The most important habit is: interpret the confidence level as a property of the repeated-sampling procedure, not as a probability assigned to a fixed parameter after the interval has been observed.

Where We Go Next

Confidence intervals ask which parameter values are compatible with the observed estimate and its sampling uncertainty.

The next lesson, Hypothesis Tests, approaches inference from a complementary direction by starting with a proposed population claim and measuring how unusual the observed data would be if that claim were true.