Tutorials › Regression Analysis (Undergraduate) › How Sample Size Affects Coefficient Interval Width

Standard Errors and Confidence Intervals · Tutorial 209 of 991

How Sample Size Affects Coefficient Interval Width

Learn how sample size enters the simple-regression slope standard error and how to compare coefficient interval widths across samples.

Beginner 9 min read

What You'll Learn

  • Calculate a simple-regression slope standard error from sample size, predictor spread, and residual standard deviation.
  • Explain why increasing sample size narrows a slope confidence interval when the other quantities are held fixed.
  • Compare interval widths while accounting for the degrees of freedom and t critical value.
  • Distinguish the sample-size effect from changes in predictor spread or residual variability.
  • Interpret a coefficient interval’s width in the predictor and response units.

Why Sample Size Matters for a Coefficient Interval

A regression coefficient is estimated from a sample, so it varies from sample to sample. A confidence interval expresses that sampling uncertainty: its width reflects both the estimated standard error and the critical value used to form the interval. When other relevant features of the data are kept comparable, a larger sample usually makes a slope estimate more precise and its interval narrower.

The phrase “when other features are kept comparable” matters. In simple linear regression, sample size affects slope precision through the amount of information in the predictor values, summarized by \(S_{xx}\), as well as through the degrees of freedom used to choose the critical value. To isolate the sample-size effect, this tutorial compares samples with the same predictor sample standard deviation and the same residual standard deviation. It does not claim that simply collecting more observations guarantees a narrower interval if those other quantities change substantially.

The Slope Standard Error and Interval Width

Consider the simple linear regression model \(Y_i=\beta_0+\beta_1x_i+\varepsilon_i\), for \(i=1,\ldots,n\). Here \(\beta_0\) and \(\beta_1\) are the population intercept and slope, and \(\varepsilon_i\) is the error for observation \(i\). For the conventional slope confidence interval, assume the errors are independent, have mean zero and a common variance, and are normally distributed conditional on the observed predictor values. The predictor values must have nonzero spread. These conditions support the usual \(t\)-based interval; the residual standard deviation \(s\) estimates the common error standard deviation.

Write \(b_1\) for the fitted slope, \(s_x\) for the sample standard deviation of the predictor, and \(S_{xx}=\sum_{i=1}^n(x_i-\bar{x})^2\) for its sum of squared deviations. Since \(S_{xx}=(n-1)s_x^2\), the estimated standard error of the simple-regression slope is \(SE(b_1)=s/\sqrt{S_{xx}}\). A two-sided confidence interval with confidence level \(1-\alpha\) has degrees of freedom \(n-2\): two parameters, the intercept and slope, are estimated.

Definition: The width of a coefficient interval is its upper endpoint minus its lower endpoint. For a two-sided \(t\) interval for the simple-regression slope, the width is \(2t^*SE(b_1)\), where \(t^*\) is the positive critical value for the chosen confidence level and \(df=n-2\). The interval is centered at \(b_1\); changing the width does not, by itself, determine where the interval is centered.
$$ SE(b_1)=\frac{s}{\sqrt{S_{xx}}} =\frac{s}{s_x\sqrt{n-1}}, \qquad b_1\pm t^*SE(b_1), \qquad \text{width}=2t^*\frac{s}{s_x\sqrt{n-1}}. $$

This expression separates three influences. A larger residual standard deviation \(s\) increases the standard error. A larger predictor spread \(s_x\) decreases it. Holding both fixed, increasing \(n\) increases \(S_{xx}\) and decreases the standard error. The critical value also depends on \(n\), because the degrees of freedom change. It generally decreases toward its large-sample limit as \(n\) increases, making the interval narrower still.

Why the Sample-Size Relationship Is Approximately a Square Root

If \(s\) and \(s_x\) are fixed across samples, the standard error has an exact dependence on sample size through \(1/\sqrt{n-1}\). The confidence-interval width has that factor too, but it also contains \(t^*\), which depends on \(n-2\). Thus the width is not exactly proportional to \(1/\sqrt{n}\) for every finite sample size.

The standard-error comparison can be derived directly. Suppose two samples have sizes \(n_1\) and \(n_2\), with the same \(s\) and \(s_x\). Dividing their standard errors cancels those shared quantities. The ratio of their interval widths has one additional factor: the ratio of their critical values. This derivation shows both the familiar square-root pattern and why a precise interval comparison must include the critical values.

$$ \frac{SE_2(b_1)}{SE_1(b_1)} = \frac{s/[s_x\sqrt{n_2-1}]}{s/[s_x\sqrt{n_1-1}]} = \sqrt{\frac{n_1-1}{n_2-1}}, $$
$$ \frac{\text{width}_2}{\text{width}_1} = \frac{t_2^*}{t_1^*} \sqrt{\frac{n_1-1}{n_2-1}}. $$

For example, doubling the sample size does not generally halve the standard error. If \(n_2\) is about twice \(n_1\), the standard-error ratio is approximately \(1/\sqrt{2}\), provided the predictor spread and residual standard deviation stay fixed. The interval-width ratio is usually a little smaller because the critical value also decreases. For small samples, however, the critical-value change can be noticeable, so it should not be ignored in a numerical comparison.

Worked Example: Constructing a Slope Interval at One Sample Size

Suppose a hypothetical sample of \(n=10\) observations is used to model quiz score in points as a linear function of study time in hours. The fitted slope is \(b_1=1.80\) points per hour, the predictor sample standard deviation is \(s_x=2.00\) hours, and the residual standard deviation is \(s=3.00\) points. Assume the simple-regression conditions stated above are reasonable for this hypothetical analysis. Find a 95% confidence interval for the slope and its width.

First calculate the predictor sum of squares: \(S_{xx}=(n-1)s_x^2=9(2.00^2)=36.0\) hours squared. Therefore, \(SE(b_1)=3.00/\sqrt{36.0)=0.500\) points per hour. For a 95% interval, \(df=n-2=8\), and \(t^*=2.306\) to three decimal places. The margin of error, calculated using the displayed values, is \(2.306(0.500)=1.153\) points per hour.

The interval is \(1.80\pm1.153\), giving endpoints \(0.647\) and \(2.953\) points per hour. Its width is \(2(1.153)=2.306\) points per hour. In context, the interval gives a range of plausible values for the population mean change in quiz score associated with one additional hour of study, under the model and its assumptions. It is not a statement that an individual student’s score will increase by that amount.

Comparing Samples While Holding Other Quantities Fixed

A fair comparison of the sample-size effect uses the same predictor spread and residual variability for each sample. For the next example, this is a controlled, hypothetical comparison—not a claim that two independently collected data sets will automatically have identical \(s_x\) and \(s\). The \(t\) critical values differ because the degrees of freedom differ.

Worked Example: Comparing Two Sample Sizes

Imagine two hypothetical simple-regression analyses of a response measured in points and a predictor measured in hours. In each, \(s_x=2.50\) hours and \(s=6.00\) points. The first has \(n=25\); the second has \(n=100\). Compare their 95% slope-interval widths. Assume the usual regression conditions are reasonable in each analysis and the stated summaries are held fixed for this comparison.

For \(n=25\), \(S_{xx}=(25-1)(2.50^2)=24(6.25)=150\) hours squared. Thus \(SE(b_1)=6.00/\sqrt{150}=0.48990\) points per hour. Here \(df=23\), and \(t^*=2.0687\). Using these displayed values, the interval width is \(2(2.0687)(0.48990)=2.0269\) points per hour.

For \(n=100\), \(S_{xx}=(100-1)(2.50^2)=99(6.25)=618.75\) hours squared. Thus \(SE(b_1)=6.00/\sqrt{618.75}=0.24121\) points per hour. Here \(df=98\), and \(t^*=1.9845\). The width is \(2(1.9845)(0.24121)=0.9573\) points per hour.

The larger sample has a narrower interval: about \(0.9573\) rather than \(2.0269\) points per hour. Its width is about \(0.9573/2.0269=0.4723\) times the smaller-sample width. The standard-error ratio alone is about \(0.24121/0.48990=0.4924\); the interval-width ratio is a little smaller because the critical value also falls. This comparison concerns precision, not the value of the slope: without specifying each fitted slope, the widths alone do not tell us whether either interval is centered higher or lower.

What Happens When the Sample Size Doubles?

The square-root relationship is useful for setting expectations, but it is not an exact rule for the full interval width. The next example doubles the sample size and calculates both widths rather than assuming that one must be a fixed fraction of the other.

Worked Example: Doubling the Sample Size

Consider two hypothetical analyses with the same predictor sample standard deviation, \(s_x=2.00\) hours, and the same residual standard deviation, \(s=5.00\) points. The first has \(n=20\), and the second has \(n=40\). Assume the regression conditions are reasonable for both samples. Compare their 95% slope-interval widths.

For \(n=20\), \(S_{xx}=19(2.00^2)=76.0\) hours squared, so \(SE(b_1)=5.00/\sqrt{76.0}=0.57354\) points per hour. With \(df=18\), \(t^*=2.1009\). The width is \(2(2.1009)(0.57354)=2.4099\) points per hour.

For \(n=40\), \(S_{xx}=39(2.00^2)=156\) hours squared, so \(SE(b_1)=5.00/\sqrt{156}=0.40032\) points per hour. With \(df=38\), \(t^*=2.0244\). The width is \(2(2.0244)(0.40032)=1.6208\) points per hour.

The sample size doubled, but the interval width became about \(1.6208/2.4099=0.6726\) of its former value, not one-half. The standard-error ratio is \(\sqrt{19/39}=0.6980\); the reduction in the critical value makes the width ratio smaller, at about \(0.6726\). This illustrates why “doubling the sample size cuts the interval width in half” is not a correct general rule.

Interpreting the Comparison in Practice

A narrower interval means greater precision for the coefficient under the model. It does not establish that the estimated association is important, that a causal effect exists, or that the model describes the data well. The interval remains tied to the response and predictor units: a slope interval for score in points per hour has width in points per hour. Widths from coefficients with different units should not be compared without care.

The fixed-spread comparison also has a practical qualification. In a real data set, adding observations can change the predictor spread and the estimated residual standard deviation. The formula uses both: \(SE(b_1)=s/[s_x\sqrt{n-1}]\). If new predictor values are concentrated near the existing mean, the overall \(s_x\) might differ from the comparison assumed here. If the added observations come from a population with more residual variability, \(s\) might increase. Those changes can offset some of the precision gain associated with a larger \(n\). The central lesson is therefore conditional: with comparable predictor spread and residual variability, larger samples tend to produce narrower slope intervals.

Sample size also does not repair violations of the regression assumptions. A large sample cannot make dependent errors independent or turn an inappropriate linear mean relationship into an appropriate one. The conventional interval should be interpreted in light of the model and data-collection process, not just the number of observations.

Common Mistake

A common mistake is to reason, “The sample size quadrupled, so the confidence interval must be exactly one-half as wide.” The standard error would be approximately halved under the fixed-spread, fixed-residual-variability comparison because its sample-size factor is \(1/\sqrt{n-1}\). But the interval width also multiplies the standard error by \(2t^*\), and \(t^*\) depends on \(df=n-2\). The exact comparison must use both critical values and both standard errors, as in the worked examples.

A related mistake is to attribute every narrower interval in a real analysis to sample size alone. The formula shows why that conclusion may fail: differences in \(s\) or \(s_x\) also change the standard error. State which quantities are being held fixed before attributing a width difference to \(n\).

Key takeaway: For a simple-regression slope, \(SE(b_1)=s/[s_x\sqrt{n-1}]\), and a two-sided interval has width \(2t^*SE(b_1)\) with \(df=n-2\). When predictor spread and residual variability are comparable, increasing sample size generally narrows the interval through both a smaller standard error and a smaller critical value.

Check Your Understanding

Answer each question using the simple-regression slope interval and its assumptions.

  1. If \(s\) and \(s_x\) are unchanged while \(n\) increases, what happens to \(S_{xx}\) and the slope standard error?
  2. For a simple-regression slope interval based on \(n=30\) observations, what are the degrees of freedom?
  3. Why is the ratio of two interval widths not generally equal to the ratio of their standard errors?
  4. Suppose the sample size increases but the added observations have much greater residual variability. Why might the interval not narrow as expected under a fixed-\(s\) comparison?
  5. A slope interval is reported in points per hour. What units does its width have, and what does a narrower width indicate?