Lesson 3.8 · 12 min read · about 1 h to master at a very slow pace

Standard Errors, Confidence Intervals and p-values

How uncertain is each coefficient? Standard errors, t-statistics, p-values and confidence intervals, with a full worked example, a real regression output to read, and what a p-value is not.

Not startedJump to quiz

Coefficients are estimates

Collect a new sample and you'd get different s. Their sampling uncertainty, under uncorrelated errors with equal variance , is

Coefficient uncertainty

are the residual degrees of freedom: observations minus estimated coefficients.

For simple regression this reduces to . The SE is smaller with less noise, more data, more spread in , and less collinearity.

The t-test

Is the true really non-zero? Test against with

The p-value is the probability, assuming is true and the model assumptions hold, of a at least as large as the one observed. If we call the coefficient statistically significant at 5%.

Confidence intervals

With : about 95% of intervals built this way (over repeated samples) contain the true . If the interval excludes 0, the two-sided test rejects at 5%. For large , , so "estimate ± 2 SE" is a good shortcut.

Worked example: dataset B ()

RSS , df , so .

.

. The critical value . Since we fail to reject ().

95% CI: . It includes 0, consistent with the test.

Moral: a positive slope from 5 points is not reliable evidence of a positive true slope.

Size is not significance

Predictor 1: , SE , so . Predictor 2: , SE , so . Predictor 2 has the smaller coefficient but stronger evidence of being non-zero, because it's estimated more precisely. A large coefficient can come with large uncertainty.

What a p-value is not

  • Not the probability that is true.
  • Not a measure of effect size: with huge , trivial effects become "significant".
  • A large p-value isn't proof of no effect: small or collinear predictors can hide a real one.

Reading a real output

Predicting carbon monoxide (mg/m³) from 11 standardised sensor and weather readings in a public air-quality dataset (, 80/20 split). Coefficients are the change in CO per one-SD change in each predictor.

-0.200.20.40.6coefficient with 95% CI (per 1 SD)S1(CO)C6H6S2(NMHC)NOxS3(NOx)NO2S4(NO2)S5(O3)TempRHAH
Two intervals (coral) cross zero: those coefficients are not significant at 5%. Training R² = 0.888; test R² = 0.885.
PredictorcoefSEtpVIF
C6H6 (benzene)0.5860.04014.80.00039.9
S2(NMHC) sensor−0.0510.049−1.040.29861.1
NOx0.5540.01439.70.0005.0
S4(NO2) sensor0.4460.02220.00.00012.7
Temperature−0.2230.024−9.50.00014.2
  1. Overall fit: in and out of sample, so little overfitting ( is large relative to ).
  2. Significance: nine of eleven predictors have tiny p-values; S2(NMHC) and S3(NOx) don't.
  3. Why is S2(NMHC) insignificant? Its VIF is 61 and it correlates 0.98 with benzene. It's nearly a duplicate, so its SE is inflated. That's not evidence the sensor is physically irrelevant: given benzene is in the model, it adds little.
  4. Association ≠ causation: the negative temperature coefficient doesn't mean cooling the air raises CO; it reflects correlated seasonal and traffic patterns.

Cheatsheet

Standard errors

, . Simple: .

t-test & CI

, df . CI: (≈ ±2 SE).

p-value sentence

"If the true coefficient were zero (and assumptions hold), a t-statistic at least this extreme would occur with probability p."

p-value misreadings

Not P( true). Not effect size. Large p ≠ no effect.

See every cheatsheet by category →

Check your understanding

Score 75% or more to master this lesson and earn XP. Answer first, then check.

Q1calculateA coefficient is with SE . What are the t-statistic and an approximate 95% CI (use )?
Q2calculateFor and : , RSS = 1.8 and . What is ?
Q3interpretWhat does a p-value of 0.03 for a coefficient mean?
Q4interpretA coefficient has with a 95% CI of . What can you conclude?
Q5calculateA regression has observations and predictors plus an intercept. How many degrees of freedom do the coefficient t-tests use?