One estimate and one standard error answer two questions: how far the population coefficient could be from the estimate in hand, which the interval answers, and whether one particular value, such as zero, is compatible with the data, which the t-test answers. A regression of log wages on education for 526 US workers is the running example.
1. Why an estimate needs a margin
Regress the logarithm of the hourly wage on years of education for 526 US workers surveyed in 1976 (Wooldridge's WAGE1 data, the regression in section 7 of What is OLS?). The coefficient on education is 0.0827: in this sample, each extra year of education goes with about 8.3% higher pay, which is 100 times the coefficient. (The exact figure is 8.6%: a difference of 0.0827 in log pay multiplies pay by \(e^{0.0827} = 1.086\), and for a small coefficient \(b\), \(e^{b}\) is close to \(1 + b\).)
That coefficient describes these 526 workers. What we want to know is the coefficient in the population they were drawn from, which we write \(\beta\). The estimate, \(\hat\beta = 0.0827\), is our best single guess at it, but a different 526 workers would have given a different figure, perhaps 0.079 or 0.088. Unless we say how far \(\hat\beta\) is likely to be from \(\beta\), a reader cannot tell whether the data pin the population coefficient down closely or hardly at all.
The quantity that measures this is the standard error. What we are after is how far \(\hat\beta\) lies from \(\beta\) across repeated samples, and the measure is the variance of \(\hat\beta\) around \(\beta\): the average squared distance between them over repeated samples. Under random sampling, with \(\hat\beta\) centred on \(\beta\) (nothing left in the error moves with education) and errors that have the same variance at every level of education, this variance is the error variance divided by the sum of squared deviations of education from its mean. It falls as the sample grows, because each extra worker adds a term to that sum. The square root returns it from squared units to the units of the coefficient, log points per year here, so that it reads as a typical distance. The error variance is unknown and is estimated from the residuals, so the standard error, 0.0076, is itself an estimate from the one sample we have. Lesson 11 builds it step by step. The interval and the test are two ways of putting the estimate and its standard error together.
What students say
“Nicky is an excellent econometrics tutor. He explains complex concepts clearly and makes them much easier to understand.”
“I was completely lost in my economics class, and then I started working Nicky and he totally saved me. He was excellent at explaining the material and extremely accommodating to meet with me many times despite us being in different time zones! Highly recommend working with Nicky!”
“Nicky is a very good and thorough teacher. He has excellent knowledge of econometrics and takes the time to work through your questions. Highly recommended!”
“Really great tutor! Encouraging, knowledgeable, friendly”
“Very good lesson, Nicky is very helpful.”
“Very helpful and clear.”
“I gather it was very useful, thank you!”
“Fantastic!”
2. How do you calculate a confidence interval?
The interval rests on two facts. First, under random sampling, and provided the errors have a finite variance and nothing left in them moves with education, the coefficient is centred on the population coefficient and its distribution across samples is approximately normal in large samples (the central limit theorem); in a large sample the standard error is also close to the standard deviation it estimates. Second, a normal distribution has 95% of its probability within 1.96 standard deviations of its centre. Hence the estimate lies within about 1.96 standard errors of the population coefficient in about 95% of samples, and so the range 1.96 standard errors either side of the estimate contains the population coefficient in about 95% of samples:
$$ \hat\beta \;\pm\; c \times \text{se}(\hat\beta) . $$In words: confidence interval = estimate plus and minus a multiple of its standard error.
The multiple \(c\) is the critical value of a two-sided test at the matching level, 5% for a 95% interval. Because the standard error is itself estimated from the same 526 workers, the multiple comes from the t distribution with the regression's degrees of freedom, 526 - 2 = 524, and for 95% it is 1.9645, a little above 1.96:
$$ \begin{aligned} & 0.08274 \pm 1.9645 \times 0.007567 \\ &= 0.08274 \pm 0.01487 . \end{aligned} $$That is, 0.0679 to 0.0976.
| Variable | Coefficient | Std. error | t | p-value | 95% interval |
|---|---|---|---|---|---|
| educ | 0.0827 | 0.0076 | 10.94 | below 0.0001 | 0.0679 to 0.0976 |
| constant | 0.5838 | 0.0973 | 6.00 | below 0.0001 | 0.3926 to 0.7750 |
Regression of log wage on education: n = 526, R-squared = 0.186.
Stata: the code
* once: ssc install bcuse bcuse wage1, clear regress lwage educ
Stata: what it prints
. regress lwage educ
Source | SS df MS Number of obs = 526
-------------+---------------------------------- F(1, 524) = 119.58
Model | 27.5606288 1 27.5606288 Prob > F = 0.0000
Residual | 120.769123 524 .230475425 R-squared = 0.1858
-------------+---------------------------------- Adj R-squared = 0.1843
Total | 148.329751 525 .28253286 Root MSE = .48008
------------------------------------------------------------------------------
lwage | Coefficient Std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
educ | .0827444 .0075667 10.94 0.000 .0678796 .0976091
_cons | .5837727 .0973358 6.00 0.000 .3925563 .7749891
------------------------------------------------------------------------------
R: the code
library(wooldridge)
data("wage1")
fit <- lm(lwage ~ educ, data = wage1)
summary(fit)
confint(fit)
R: what it prints
> library(wooldridge)
> data("wage1")
> fit <- lm(lwage ~ educ, data = wage1)
> summary(fit)
Call:
lm(formula = lwage ~ educ, data = wage1)
Residuals:
Min 1Q Median 3Q Max
-2.21158 -0.36393 -0.07263 0.29712 1.52339
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.583773 0.097336 5.998 3.74e-09 ***
educ 0.082744 0.007567 10.935 < 2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.4801 on 524 degrees of freedom
Multiple R-squared: 0.1858, Adjusted R-squared: 0.1843
F-statistic: 119.6 on 1 and 524 DF, p-value: < 2.2e-16
> confint(fit)
2.5 % 97.5 %
(Intercept) 0.39255627 0.77498906
educ 0.06787958 0.09760915
Python: the code
import wooldridge
import statsmodels.formula.api as smf
wage1 = wooldridge.data("wage1")
fit = smf.ols("lwage ~ educ", data=wage1).fit()
print(fit.summary())
Python: what it prints
OLS Regression Results
==============================================================================
Dep. Variable: lwage R-squared: 0.186
Model: OLS Adj. R-squared: 0.184
Method: Least Squares F-statistic: 119.6
Date: Thu, 08 Oct 2026 Prob (F-statistic): 3.27e-25
Time: 14:49:40 Log-Likelihood: -359.38
No. Observations: 526 AIC: 722.8
Df Residuals: 524 BIC: 731.3
Df Model: 1
Covariance Type: nonrobust
==============================================================================
coef std err t P>|t| [0.025 0.975]
------------------------------------------------------------------------------
Intercept 0.5838 0.097 5.998 0.000 0.393 0.775
educ 0.0827 0.008 10.935 0.000 0.068 0.098
==============================================================================
Omnibus: 11.804 Durbin-Watson: 1.801
Prob(Omnibus): 0.003 Jarque-Bera (JB): 13.811
Skew: 0.268 Prob(JB): 0.00100
Kurtosis: 3.586 Cond. No. 60.2
==============================================================================
Notes:
[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.
Stata and Python print the interval in the coefficient table. In R, confint(fit) gives it.
In words: the data are compatible with a population coefficient anywhere from about 0.068 to 0.098, that is, with one more year of education going with roughly 6.8% to 9.8% higher pay. The interval gives the size of the relationship and the uncertainty about it together.
The method is the same for any estimate that has a standard error. For a sample mean, the standard error comes from the variance of the sample mean around the population mean, which under random sampling is the variance of one observation divided by the sample size, \(\sigma^2/n\): the larger the sample, the more closely it resembles the population it was drawn from, and so the less one sample can differ from another by chance. With the sample standard deviation \(s\) in place of \(\sigma\), taking the square root returns it to the units the data are measured in: \(s/\sqrt{n}\). The 1,388 babies in Wooldridge's BWGHT data have a mean birthweight of 118.70 ounces and a standard deviation of 20.35 ounces, so the standard error is \(20.35/\sqrt{1388} = 0.546\) ounces and the 95% interval is \(118.70 \pm 1.96 \times 0.546\), or 117.63 to 119.77 ounces. Lesson 5 shows where \(s/\sqrt{n}\) comes from, and lesson 6 builds this interval step by step.
3. What does a 95% confidence interval mean?
The 95% is a statement about the method. If we drew many samples and built an interval from each in the same way, 95% of those intervals would contain the population value: in samples of any size if the errors are normally distributed and the multiple comes from the t distribution, and approximately in large samples otherwise.
With real data that cannot be checked, since we have one sample and do not know the true value. A simulation can check it, because there we set the true value ourselves. We drew 10,000 samples of 25 exam grades from a population whose mean is 65, and built a 95% interval for the mean from each sample. Figure 1 shows the first 100.
Every sample gives a different interval, in a different place and of a different length. The true mean stays where it is. In this run 96 of the first 100 intervals contain it, and over all 10,000 samples 95.2% do. The same holds for regression coefficients: in lesson 11, 95.5% of 1,000 simulated intervals for a slope contain the true slope.
For the one interval we have, 0.0679 to 0.0976, the 95% describes the method that produced it. Before the sample is drawn, the interval is random and \(\beta\) is fixed, and the method has a 95% chance of producing an interval that contains \(\beta\). After the sample is drawn, nothing is random any more. This interval either contains \(\beta\) or does not, and we cannot tell which. So the statement "there is a 95% probability that \(\beta\) is between 0.0679 and 0.0976" is not correct, although it is the most natural thing to say. The accurate statement is about the procedure. In everyday use we say that values inside the interval are compatible with the data, and values far outside it are not.
4. Where does the multiple come from?
The multiple is chosen so that the method succeeds in 95% of samples. It depends on the distribution of the estimate, and on the fact that the standard error is itself estimated.
The distribution of the estimate. Under random sampling, the central limit theorem makes a sample mean, or a regression coefficient (the population coefficient plus a weighted sum of the errors), approximately normal in large samples, provided the variance is finite. The estimate is centred on the population value (for a coefficient, provided nothing left in the error moves with the regressor), and in a large sample its standard error is close to the standard deviation it estimates. Hence the estimate minus the population value, divided by its standard error, is approximately standard normal. A standard normal variable lies between -1.96 and 1.96 with probability 0.95, so 1.96 is the large-sample multiple for a 95% interval.
The fact that the standard error is estimated. The standard error is computed from the same sample, and in a small sample it can be well off in either direction: with five grades from a population whose standard deviation is 10, the sample standard deviation comes out anywhere between about 4 and 15 in 90% of samples (lesson 6). When it comes out too small, the interval is too short and misses more often than it should. When it comes out too large, the interval is too long and misses less often, but that gain is smaller than the loss. To keep the success rate at 95% the multiple has to be larger. If the errors are normally distributed, the right value comes from the t distribution; for other errors it is an approximation that improves as the sample grows. Its shape depends on the degrees of freedom: the number of observations minus the number of quantities estimated first (one for a mean, two for a regression with one explanatory variable). Each estimate puts one condition on the deviations or residuals the standard error is built from (deviations from a mean must add to zero), so only that many of them are free (what degrees of freedom mean).
| Degrees of freedom | 3 | 8 | 24 | 99 | 524 | Very large |
|---|---|---|---|---|---|---|
| Multiple for 95% | 3.182 | 2.306 | 2.064 | 1.984 | 1.9645 | 1.960 |
The table gives the 95% multiple for a range of degrees of freedom. The wage regression has 526 observations and two estimated coefficients, so 524 degrees of freedom and a multiple of 1.9645. A regression on five observations has 3 degrees of freedom and a multiple of 3.182.
Using 1.96 where the table gives a larger multiple makes the intervals too short. In a companion simulation (10,000 samples of each size), intervals built with 1.96 from samples of five normally distributed grades contain the true mean in 88.0% of samples, against 94.9% with the correct multiple, 2.776. Lesson 6 has the comparison for other sample sizes. The normal, t, chi-square and F distributions shows how the t distribution is built and why its tails are heavier.
The confidence level also changes the multiple. A method that succeeds more often needs wider intervals:
| Confidence level | Multiple (524 degrees of freedom) | Interval for the education coefficient |
|---|---|---|
| 90% | 1.648 | 0.0703 to 0.0952 |
| 95% | 1.9645 | 0.0679 to 0.0976 |
| 99% | 2.585 | 0.0632 to 0.1023 |
5. The t-statistic and the t-test
A test starts from a particular value and asks whether the data are compatible with it. The value is the null hypothesis, written \(H_0: \beta = \beta^*\), where \(\beta^*\) is the hypothesised value. The t-statistic measures how far the estimate is from that value, in standard errors:
$$ t = \frac{\hat\beta - \beta^*}{\text{se}(\hat\beta)} . $$In words: t = (estimate minus the hypothesised value) divided by the standard error.
If the null is true and the errors are normally distributed, the statistic as a random quantity, written \(T\), follows the t distribution with the regression's degrees of freedom, and the \(t\) from our sample is one draw from it; without normality this holds approximately in large samples. (A capital letter marks the quantity that varies from sample to sample, the lower-case letter the value our sample gives.) \(T\) lies beyond the critical value in either direction in only 5% of samples. So a two-sided test at the 5% level rejects \(H_0\) when \(t\) is above 1.9645 or below -1.9645.
The first value to test is zero, since a coefficient of zero would mean that pay does not differ with education at all. Then \(t = 0.0827/0.00757 = 10.9\), far beyond the critical value, and zero is rejected. (Software prints 10.94, from unrounded figures.) This is the t-statistic that regression output prints in every row. The p-value beside it is the probability, if the null were true, of a t-statistic at least that far from zero: here it is below 0.0001. Hypothesis testing explained builds p-values from first principles.
Any other value can be tested by subtracting it first. Is the coefficient compatible with 0.09, one more year of education going with about 9% higher pay? Then \(t = (0.08274 - 0.09)/0.007567 = -0.96\), well inside ±1.9645, so 0.09 is not rejected.
6. Why do a confidence interval and a two-sided test always agree?
The test rejects \(\beta^*\) when the estimate is more than \(c\) standard errors away from it. The interval contains every value that is within \(c\) standard errors of the estimate. These are the same condition read from two ends. Hence:
| Hypothesised value | t | p-value (two-sided) | In the 95% interval? | Rejected at 5%? |
|---|---|---|---|---|
| 0 | 10.94 | below 0.0001 | No | Yes |
| 0.05 | 4.33 | 0.00002 | No | Yes |
| 0.07 | 1.68 | 0.093 | Yes | No |
| 0.09 | -0.96 | 0.338 | Yes | No |
| 0.11 | -3.60 | 0.0003 | No | Yes |
Each row tests one hypothesised value of the education coefficient. The last two columns never disagree: a value is rejected at the 5% level if and only if it is outside the interval 0.0679 to 0.0976.
This gives a quick way to read a regression table. To see whether a coefficient is significantly different from zero at the 5% level, check whether zero is inside its 95% interval. And it shows why the interval is the more informative of the two. A test of zero gives a verdict on one value. The interval gives the verdict on every value at once, in the units of the problem.
7. How do you do a one-sided t-test?
Sometimes the question has a direction. Suppose we want to know whether one more year of education goes with more than 7% higher pay:
$$ H_0: \beta \le 0.07 \quad\text{against}\quad H_1: \beta > 0.07 . $$Only an estimate well above 0.07 counts against this null, so the whole 5% rejection region goes in the upper tail. The critical value is the point with 5% of the t distribution above it, 1.648 with 524 degrees of freedom (1.645 for the normal). The statistic is the same as before:
$$ t = \frac{0.08274 - 0.07}{0.007567} = 1.68 . $$Since 1.68 is above 1.648, the one-sided test rejects \(H_0\) at the 5% level, narrowly. Its p-value is 0.046, half the two-sided p-value of 0.093, because it counts the area in one tail only.
Now look back at the table in section 6. The value 0.07 is inside the 95% interval, and the two-sided test does not reject it. The one-sided test does. The two answers differ because the two tests ask different questions and place the 5% differently. The two-sided interval corresponds to the two-sided test only. It cannot be used to decide a one-sided test at the same level.
The interval that matches a one-sided 5% test is one-sided as well: a lower bound of \(0.08274 - 1.648 \times 0.007567 = 0.0703\). The data are compatible with any coefficient above 0.0703, and 0.07 lies below it, by 0.0003, which is the one-sided test's rejection seen from the other side.
The direction has to be chosen from the question, before the estimate is seen: choosing it afterwards doubles the true rate of false rejections. And the halving rule applies only when the estimate is on the alternative's side. Had the estimate been below 0.07, the one-sided p-value would be above 0.5.
8. Common mistakes
- "There is a 95% probability that the true value is in this interval." The 95% is the success rate of the method across samples. A computed interval either contains the true value or does not.
- Reading the interval as a range for individuals. The interval 0.0679 to 0.0976 is for one number, the population coefficient. It does not say that, for 95% of workers, one more year of education goes with between 6.8% and 9.8% higher pay.
- "Values outside the interval are impossible." They are the values a 5% test rejects. A 99% interval is wider and admits some of them.
- Using the two-sided interval to decide a one-sided test. 0.07 is inside the 95% interval and is rejected by the one-sided 5% test.
- Using 1.96 in a small sample. With 3 degrees of freedom the multiple is 3.182.
- "Zero is in the interval, so there is no relationship." The interval also contains values that are not zero, and it rules out the values beyond its ends. For home goals minus away goals in the Premier League's 2020/21 season, the 95% interval for the mean is -0.18 to 0.20 goals a match: it contains zero, and it rules out an advantage of 0.3 goals or more (lesson 6). Report the interval, and let the reader see how large the relationship could be.
9. Check your understanding
Five questions, marked on the page; every option has an explanation, including the wrong ones. (Without JavaScript the explanations are shown beneath each question.)
1. A regression reports a coefficient of 0.0827 with a standard error of 0.0076. Use the multiple 1.96. What is the 95% confidence interval?
This centres the interval on zero. A confidence interval is centred on the estimate: 0.0827 plus and minus 1.96 × 0.0076.
This is the estimate plus and minus one standard error. The 95% interval needs the multiple 1.96.
Correct. 1.96 × 0.0076 = 0.0149, and 0.0827 ± 0.0149 gives 0.0678 to 0.0976. (Software, working with unrounded figures, prints 0.0679 to 0.0976.)
This uses 2.576, the multiple for a 99% interval. For 95% the multiple is 1.96.
2. The coefficient on education is 0.092 with a standard error of 0.0073, and its 95% confidence interval runs from 0.078 to 0.106. Which hypothesised value of the coefficient is compatible with the data in a two-sided test at the 5% level?
Zero is far outside the interval: t = 0.092/0.0073 = 12.6, so it is rejected.
0.07 is below the lower limit, 0.078. The test agrees: t = (0.092 - 0.07)/0.0073 = 3.0, beyond 1.96, so it is rejected.
Correct. 0.10 lies inside the interval, so a two-sided 5% test does not reject it: t = (0.092 - 0.10)/0.0073 = -1.1, inside ±1.96.
0.11 is above the upper limit, 0.106. The test agrees: t = (0.092 - 0.11)/0.0073 = -2.5, beyond -1.96, so it is rejected.
3. The 95% confidence interval for a coefficient is 0.078 to 0.106. What happens to the interval if the confidence level is raised to 99%?
Correct. To contain the population coefficient in 99% of samples the interval has to reach further: here it becomes 0.073 to 0.111.
More confidence is bought with a wider interval, not a narrower one. The data are the same; only the multiple changes.
The estimate and the standard error are unchanged, but the interval is the estimate plus and minus a multiple of the standard error, and the multiple depends on the level.
4. A coefficient is 0.0827 with a standard error of 0.00757, and its two-sided 95% interval is 0.068 to 0.098. You test H0: coefficient ≤ 0.07 against H1: coefficient > 0.07 at the 5% level. The one-sided critical value is 1.648. What is the result?
Correct. t = (0.0827 - 0.07)/0.00757 = 1.68. A one-sided 5% test puts all 5% in the upper tail, so its critical value is 1.648 and the null is rejected, narrowly.
The two-sided interval matches a two-sided test, with 2.5% in each tail and a critical value of 1.965. It cannot be used to decide a one-sided test at the same level.
1.965 is the critical value for a two-sided 5% test. The alternative here is one-sided, so the 5% goes in one tail and the critical value is 1.648.
5. A 95% confidence interval for the coefficient on education in a wage regression is 0.078 to 0.106. Which statement follows?
The interval is centred on this sample's estimate, and new estimates scatter around the true value, not around 0.092. The 95% is about how often intervals contain the population coefficient.
Correct. The 95% is the long-run success rate of the procedure. For this one interval we cannot tell whether it is among the 95% that contain the true coefficient.
The interval is about one number, the population coefficient. It says nothing about how the link between education and pay differs from one worker to another.
10. Questions people ask
It means the interval was produced by a method whose intervals contain the population value in 95% of samples. It does not mean a 95% probability that the population value lies in this particular interval: that value is fixed, and a computed interval either contains it or does not. Read it as the range of values compatible with the data.
Take the coefficient and add and subtract the critical value times its standard error. In a large sample the 95% critical value is about 1.96; otherwise use the t distribution with n minus the number of coefficients as degrees of freedom. For a coefficient of 0.0827 with standard error 0.0076: 0.0827 ± 1.96 × 0.0076, or 0.068 to 0.098.
They use the same estimate and standard error. A t-test asks whether one stated value is compatible with the data. A confidence interval lists every value that is. A two-sided test at the 5% level rejects a value exactly when it falls outside the 95% interval, so the interval contains everything the test says and more.
Compute the same t-statistic: the estimate minus the hypothesised value, divided by the standard error. Compare it with the one-sided critical value, 1.645 in a large sample at the 5% level, in the direction of the alternative. The one-sided p-value is half the two-sided one when the estimate lies on the alternative's side.
It means the estimate is two standard errors from the hypothesised value, zero in regression output. If that were the population value, the t-statistic would be approximately standard normal in a large sample, beyond 1.96 either way in 5% of samples. Hence t beyond about 2 is called significant at the 5% level; in small samples the cut-off is larger.
11. Where next
- The course lesson that goes with this page: lesson 6, confidence intervals and what 95% means, with an interval built by hand and five more marked questions.
- Hypothesis testing explained: null and alternative, p-values, Type I and II errors and power.
- The normal, t, chi-square and F distributions: where the multiples come from.
- How to read regression output: the interval, the t-statistic and the p-value in every row of a regression table.
- The central limit theorem and the law of large numbers (lesson 4 of the course), the results behind the normal approximation, and lesson 5 on the standard error.
- Diagnostic tests for the linear model, for when the usual standard errors, and so the intervals, cannot be trusted.
Send me your question: module, output and deadline
I tutor statistics and econometrics one-to-one, from a first confidence interval through to regression, panel data and time series. Bring the question you are stuck on and we will work through it in the free 30-minute consultation.
Book a free 30-minute consultation Statistics tuition: how it works
Data and simulation. Wage regression and birthweights: Wooldridge, Introductory Econometrics: A Modern Approach, data sets WAGE1 (526 workers, 1976 Current Population Survey) and BWGHT (1,388 births, 1988 National Health Interview Survey), loaded with bcuse in Stata and with the wooldridge package in R and in Python; results quoted, data not republished. Figure 1: 10,000 samples of 25 grades, normal with mean 65 and standard deviation 10, numpy default_rng(2026) and rng.normal(65, 10, size=(10000, 25)), one row per sample; the comparison of multiples repeats this with a fresh generator for each sample size. Premier League: openfootball/england (CC0), season 2020/21.
