A fitted line is an estimate, so it has a margin of error like any other. The regression primer drew the line and measured how much of the scatter it explains. This lesson asks how far the slope could be from the truth, whether it is distinguishable from zero, and the difference between an interval for the average household and an interval for one household you have not yet met. Everything rests on one formula, the standard error of the slope.
Ashanagar is an invented district. The statistics lessons use it for every worked example, so you meet the same households again as the ideas build: first as a list of numbers, then as a spread, then as a population to sample from.
It has 60 households, each with a monthly income in rupees. Unless a page says otherwise, those 60 are the whole population, and a “sample” means a few of them drawn at random. Where a page needs two variables, it uses a smaller set of 12 households with the head’s years of schooling beside income.
The figures are illustrative, made up once and fixed. They are not official statistics.
The regression primer fitted a line to twelve households: years of schooling of the head, x, and monthly income, y. Its fitted line is ŷ = 2.47 + 1.97x, in thousands of rupees. To ask how reliable that is, we need a model of how the data came about. Suppose that in the whole district, income really is a straight-line function of schooling plus noise:
A different sample of households would have different errors, so a different fitted line. The estimates a and b are random variables with sampling distributions, just like the sample mean in Lesson 2. Everything in this lesson is the answer to one question: what are the centre and the spread of the distribution of b?
The answer is short and worth memorising. The slope is unbiased, and its standard error is the typical noise divided by the root of how spread out the x values are:
From the regression primer, b = Σ(x − x̄)(y − ȳ) ÷ Sxx. Because Σ(x − x̄) = 0, the ȳ term drops out of the numerator, leaving
The weights depend only on the x values, which we treat as fixed. All the randomness is in the y’s.
Σw = Σ(x − x̄) ÷ Sxx = 0. Σwx = Σ(x − x̄)x ÷ Sxx = Sxx ÷ Sxx = 1. And Σw² = Σ(x − x̄)² ÷ Sxx² = 1 ÷ Sxx. For the twelve Ashanagar households Sxx = 132.92, and the weights sum to 0, with Σwx = 1 and Σw² = 0.00752 = 1 ÷ 132.92.
Take the expectation of Σw y with E(yi) = α + βxi:
Only the assumption that the errors average to zero and are unrelated to x was used. Nothing about their variance, which is why unbiasedness survives heteroskedasticity (DSE 2009).
The y’s are independent, each with variance σ², so the variance of a weighted sum is the sum of weights squared times σ², the same rule as in the two-sample lesson:
σ is unknown, so it is replaced by s, where s² = SSE ÷ (n − 2) (the divisor n − 2 because two parameters, α and β, were estimated; the lab shows s² averaging σ² while SSE ÷ n comes up short). Here s = 4.093 and SE(b) = 4.093 ÷ √132.92 = 0.3551.
Three levers, all visible in σ ÷ √Sxx: less noise (smaller σ), more spread in x (a larger Sxx), and more observations (Sxx grows with n). Squeezing the x values together, as in a survey of households that all have similar schooling, ruins the estimate of the slope however many there are. Move the three sliders and compare the fan of lines with the formula.
With normal errors, (b − β) ÷ SE(b) follows a t distribution with n − 2 degrees of freedom. Setting β = 0 gives the test of whether x has any effect, and rearranging gives an interval for β.
If the errors are normal, b is normal with mean β and variance σ² ÷ Sxx, so (b − β) ÷ (σ ÷ √Sxx) is standard normal. We do not know σ and use s instead. For normal errors, (n − 2)s² ÷ σ² follows a chi-square with n − 2 degrees of freedom and is independent of b. A standard normal divided by the square root of an independent chi-square over its degrees of freedom is a t, by definition (the t derivation):
For H₀: β = 0, t = 1.971 ÷ 0.3551 = 5.55, on 10 degrees of freedom. The 5% two-sided critical value is 2.228, so the slope is significant (p = 0.00024). The 95% interval for β is b ± t × SE = 1.971 ± 2.228 × 0.3551, which is 1.18 to 2.76 thousand rupees per extra year of schooling, and it excludes zero, as it must when the test rejects.
Let Syy be the total sum of squares. Then b² Sxx = Sxy² ÷ Sxx = r² Syy, since r² = Sxy² ÷ (SxxSyy). And SSE = (1 − r²) Syy. So
Take the root: t = r√(n − 2) ÷ √(1 − r²), the statistic used in the test for a correlation. With r = 0.869 and n = 12 it is 5.55, the same 5.55. Testing the slope and testing the correlation are one test.
The regression splits the total variation into SSR (explained) and SSE (residual), exactly as in the ANOVA decomposition. With one slope, SSR has 1 degree of freedom and SSE has n − 2:
Here SSR = 516.4, SSE = 167.6, so F = 516.4 ÷ (167.6 ÷ 10) = 30.82 = 5.55². For a single regressor the F test of the whole regression and the t test of the slope are the same test, and R² = SSR ÷ SST = 0.755.
Regression packages print the same test a second way. The total variation in income splits into the part the line explains, SSR, and the part it leaves, SSE, in exactly the proportions of the primer. Each is divided by its degrees of freedom, and their ratio is an F.
| Source | Sum of squares | df | Mean square | F |
|---|---|---|---|---|
| Regression | 516.4 | 1 | 516.4 | 30.82 |
| Residual | 167.6 | 10 | 16.76 | |
| Total | 684 | 11 |
R² = SSR ÷ SST = 0.755: schooling accounts for about three-quarters of the variation in these twelve incomes. F = 30.82 on (1, 10) degrees of freedom is exactly t² = 5.55², and its p-value is the same 0.0002. For a single regressor, a significant slope and a significant F are the same event. With more regressors the F tests all slopes together (UGC NET 2023, UGC NET 2026) and the t tests one at a time, so they stop being the same thing.
Two facts about R² are asked often. If R² = 0, every slope estimate is zero, the fitted line is flat, and the variables explain none of the variation about the mean, but the intercept equals ȳ and is not zero (JNU 2020 and 2021). And a high R² does not make the slope significant, nor a significant slope a high R²: with a huge sample, a tiny R² can come with a very significant slope, the same lesson as Cramér’s V in Lesson 10.
Two different questions hide behind “predict the income at 12 years of schooling”. What is the average income of households with that schooling? Or what will this one new household earn? Both use ŷ₀ = 2.47 + 1.97 × 12 = 26.1, but their uncertainty differs.
At 12 years of schooling the line predicts ₹26.1 thousand. The average income of all households with that schooling is pinned down to 23.2 to 29, but a single new household can land anywhere from 16.5 to 35.7, because it carries its own noise on top of our uncertainty about the line. Slide away from the mean schooling of 10.4 years and both bands flare out, the narrow one fastest. Beyond the data, at 3 or 19 years, the line is an extrapolation and the bands say so.
The fitted line passes through (x̄, ȳ), so the fitted value at x₀ is ŷ₀ = ȳ + b(x₀ − x̄). It combines two estimates: the mean level ȳ and the slope b, each with its own error.
Cov(ȳ, b) = Σ(1/n) wi σ² = (σ² ÷ n) Σwi = 0, because the weights sum to zero. So the variances simply add, with the slope’s error scaled by the distance (x₀ − x̄):
It is smallest at x₀ = x̄ and grows with the square of the distance, which is why the band is narrowest in the middle of the data. At x₀ = 10.4 the standard error is 1.182; at x₀ = 12 it is 1.309.
A household that was not in the sample has y₀ = α + βx₀ + ε₀, where ε₀ is a fresh draw, independent of the fit. The error in predicting it is y₀ − ŷ₀, and the two pieces are independent, so
The extra 1 is the household’s own noise, and no amount of data removes it. At x₀ = 12 the standard error of prediction is 4.297 against 1.309 for the average, and the intervals are 23.2 to 29 and 16.5 to 35.7.
With a huge sample, 1/n and (x₀ − x̄)²/Sxx both vanish, the interval for the average collapses to a point, and the prediction interval stays at about ± t × s. Knowing the line perfectly still leaves each household free to differ from it by its own noise. That floor here is ±9.12 thousand rupees.
Different results need different assumptions, and exams like asking which. Take the four of DSE 2009: (1) the errors average zero, (2) they are uncorrelated with x, (3) they have constant variance, (4) they are uncorrelated with each other.
Two features hold by construction, whatever the data: the residuals sum to zero (when there is an intercept) and are uncorrelated with x. Rescaling changes the slope in the obvious way: regressing 5Y on 10X multiplies the slope by 5 ÷ 10 = 0.5 (UGC NET 2023).
The econometrics modules take each assumption in turn: what breaks when it fails, how to detect it, and how to repair it. Heteroskedasticity, autocorrelation, omitted variables and multicollinearity are all violations of (1) to (4) with their own tests.
Definitions and one-step calculations. Most CUET and Hyderabad questions sit here.
Joint tables, standard errors and statement questions, up to JNU and IIT JAM level.
This topic’s hardest questions, from the DSE entrance, are worked through in Lesson 13: Regression: what an assumption buys.
These are questions from the TestStop bank. A free account answers 10 a day, each with its worked solution; All-Access opens every set with no daily limit.