Sequential Confidence Interval

Fixed Size Confidence Interval

The confidence interval usually has the following format:

\[ \text{Estimate} \pm \text{Margin of Error} \]

For example, to get the \(1-\alpha\) confidence interval of the normal population mean, we can start with an i.i.d random sample. Suppose \(X_1, X_2, ..., X_n \sim N(\mu, \sigma^2)\) , the sample mean has the following distribution:

\[ \bar{X}_n \sim N(\mu, \frac{\sigma^2}{n}) \]

Assume \(\sigma^2=1\), we can create a \(Z\) statistic from it:

\[ Z=\frac{\sqrt{n}(\bar{X}_n-\mu)}{1} \sim N(0,1) \]

In a standard normal distribution, we can find two critical values such that

\[ P(-z_{\alpha/2} \leq Z \leq z_{\alpha/2})=1-\alpha \]

For example, to find the critical value for a 95% confidence interval (\(1-\alpha = 0.95\)), use the qnorm() function which returns the quantile(i.e., percentile or critical value) of a standard normal distribution.

Code
qnorm(0.975)
[1] 1.959964

So \(z_{0.025}\approx 1.96\). We have

\[ P(-1.96 \leq \frac{\sqrt{n}(\bar{X}_n-\mu)}{1} \leq 1.96) = 0.95 \]

With a calculated sample mean \(\bar{X}\) , the confidence interval for \(\mu\) is

\[ \bar{X}_n \pm 1.96 \frac{1}{\sqrt{n}} \]

  • Q1: What does “margin of error” mean in this context?

  • Q2: As the sample size \(n\) increases, how does the margin of error change?

  • Q3: If we require the interval width to be at most 0.2, what is the minimum sample size \(n\) needed?


In general, suppose \(X_1, ..., X_n\) is a random sample from \(N(\mu, \sigma^2)\) . Assume \(\sigma\) is known, the \(1-\alpha\) confidence interval for \(\mu\) is

\[ \bar{X}_n \pm z_{\alpha/2} \frac{\sigma}{\sqrt{n}} \]


Q3: Given the margin of error to be **no more than** \(2d\) , we have

\[ z_{\alpha/2} \frac{\sigma}{\sqrt{n}}\leq d \]

The required sample size must satisfy

\[ n\geq (\frac{z_{\alpha/2} \sigma}{d})^2 = n^* \]

where \(n^*\) is the optimal fixed sample size.

What if \(\sigma\) is unknown?


In general, suppose \(X_1, ..., X_n\) is a random sample from \(N(\mu, \sigma^2)\) . Assume \(\sigma\) is unknown, the \(1-\alpha\) confidence interval for \(\mu\) is

\[ \bar{X}_n \pm t_{n-1, \alpha/2} \frac{S_n}{\sqrt{n}} \]

Can you find the optimal smallest sample size for a pre-defined margin of error?

Why Sequential?

Fixed-sample confidence intervals for a population mean have widths that depend on the sample size obtained. However, when the population variance is unknown, no fixed-sample methodology can guarantee a pre-specified estimation error.

Two-Stage Sampling

Stein (1945, Annals of Mathematical Statistics) introduced the first systematic two-stage sampling procedure for confidence intervals of a normal mean when the variance is unknown. Suppose the margin of error is \(d\) (confidence interval half-width).

Stage 1:

Draw an initial pilot sample of size \(n_0\) ​ (often small, e.g. 20–30). Use this sample to compute an estimate of the variance:

\[ S^2 = \frac{1}{n_0-1} \sum_{i=1}^{n_0} (X_i - \bar{X})^2 \]

Stage 2:

Based on \(S^2\) determine the required total sample size

\[ N=max\left\{ n_0, \left \lceil\frac{z_{\alpha_2}^2 S^2}{d^2} \right \rceil \right\} \]

The \(\lceil x \rceil\) function is called “ceiling function” which returns to the smallest integer greater than or equal to \(x\). For example, \(\lceil 3.1 \rceil=4\).

Key property: With probability 1, the resulting CI half-width will not exceed \(d\). This procedure is widely used in practice because it’s simple, and only requires one variance re-estimation step.

Stopping Rule

\[ N=max\left\{ n_0, \left \lceil\frac{z_{\alpha_2}^2 S^2}{d^2} \right \rceil \right\} \]

Simulation Study:

Pure Sequential Sampling (Fully Sequential)

Chow and Robbins (1965, Annals of Mathematical Statistics): Introduced one of the first fully sequential confidence interval procedures. Their method updates the variance estimate at every step and stops as soon as the desired precision is achieved. This was a milestone because it showed that sequential methods could guarantee fixed-width intervals without relying on two stages.

  1. Start with a small number of observations (say, \(n_0=5\) ).

  2. After each new observation, update the new sample variance \(S_n^2\) .

  3. Check whether the half-width exceed the pre-defined margin of error \(d\). Or equivalently,

    \[ n\geq \frac{t_{n-1, \alpha/2}^2 S_n^2}{d^2} \]

  4. If not, collect another observation and repeat.

  5. Stop as soon as the inequality holds. Then report the final confidence interval based on all collected data.

Key property: This method is more efficient on average because it adapts observation by observation. But it’s less convenient operationally (continuous monitoring, stopping at random sample size).

Stopping Rule

\[ N= \text{inf} \left\{n\geq n_0: \frac{t_{n-1, \alpha/2} S_n}{\sqrt{n} } \leq d\right\} \]

Or

\[ N= \text{inf} \left\{n\geq n_0: \frac{z_{\alpha/2} S_n}{\sqrt{n} } \leq d\right\} \]

Asymptotic Property

Asymptotic comes from Greek for “not meeting.”

  • In math/statistics, it means: we’re looking at the behavior of something as the sample size (or some parameter) goes to \(\infty\) infinity.

  • It’s about the long-run trend, not the exact finite case.

For example,

  • The Law of Large Numbers is an asymptotic result: as \(n\rightarrow \infty\), the sample mean converges to the true mean.

  • The Central Limit Theorem is an asymptotic result: as \(n\rightarrow \infty\), the distribution of the standardized sample mean approaches Normal, no matter the original distribution.

When \(N \to \infty\) in expectation (i.e., as the design parameter grows large, as the margin of error goes zero), we can talk about asymptotic properties of the procedure.

Stops almost surely

\[ P(N<\infty)=1 \]

Can you prove it?

Asymptotic Normality

The sequential estimator \(\bar{X}_N\) (not \(\bar{X}_n\) ) is still asymptotically normal

\[ \frac{\sqrt{N}(\bar{X}_N-\mu)}{\sigma} \sim N(0,1) \]

Coverage Validity

For fixed sample size confidence interval, we have

\[ P(\mu \in CI_n) \approx 1-\alpha \]

In sequential settings, because the stopping time \(N\) is random, we ask instead:

\[ P(\mu \in CI_N) \geq 1-\alpha \]

Asymptotically, this means the CI procedure still protects against inflated error even if you stop “whenever you like.”

Efficiency

Wald and later results show: sequential confidence intervals can be constructed that are asymptotically efficient

\[ \frac{N}{n^*} \to 1, \ \ E(N-n^*)<0 \]

They reach the same width and coverage as fixed-sample CIs but often with smaller expected sample size.

Simulation:

Let’s take a pilot sample of size 5 from \(N(10,9)\). The pre-specified margin of error is $d = 1$

Data Sample Size Sample Mean Interval Width Stop?
5

Applications: How many deer at Denison?