Centred simple linear regression 2026-10-14
In simple linear regression written as , the constant and centred predictor columns are orthogonal. Differentiating the sum of squared residuals gives the displayed ordinary least squares estimators, provided . For independent mean-zero errors of common variance , both estimators are unbiased, their variances are and , and their covariance is zero. The uncentred intercept is .
Past exam of the mathematics course of the University of Cambridge 2003 ib Paper 1 3H Solution Created 2026-09-24 Updated 2026-10-14
Put , so . The ordinary least squares criterion is . Setting both partial derivatives to zero gives and . Therefore, provided , the centred simple linear regression estimators areThe Hessian of is , which is positive definite, so this stationary point is the unique minimum. From the mean-zero errors, both estimators are unbiased; independence and common error variance give , , and zero covariance. Normality is not needed for this derivation. If all coincide, the slope is not identifiable and only the intercept is determined.
Using the PDF data gives , , and . In particular, the fourth cost is 37 in the PDF; the TeX's 75 is a transcription error and would contradict the supplied covariance sum. The fitted simple linear regression isHere the centred intercept estimate is 42.4; an intercept at would instead be . For eight units the predicted unit cost is
Past exam of the mathematics course of the University of Cambridge 2006 iii Paper 44 1 b Solution Created 2026-10-03 Updated 2026-10-14
The association is strongly statistically significant under the reported regression assumptions, but age alone has only moderate predictive ability. The reported confidence interval for the age regression coefficient excludes zero by a wide margin. If it is the usual two-sided 95% interval from a normal linear model with an intercept and one predictor, there are degrees of freedom. Taking givesThus the two-sided p-value against zero slope is far below . This conclusion concerns a statistical association in the sampled population; it does not establish an individual growth rate. Clustering by practitioner, nonconstant variance or nonindependent observations would require an appropriate standard error rather than blind reliance on this calculation.
The scatter plot has substantial vertical spread at each age. A narrow slope confidence interval describes uncertainty about the average trend, whereas a prediction interval for a new person's ear length must also include the residual variance. The reported interval even permits an approximate numerical assessment: write and let . In simple linear regression, , while the fitted and residual sums of squares are and . Hence the coefficient of determination isUnder these assumptions, age explains only about 27% of the sample variation; roughly 73% remains unexplained. The calculation is approximate because the printed slope and interval are rounded. For a new individual aged , the usual prediction interval is based onThe leading one represents individual residual variation. The provided summaries do not determine and separately, so they do not supply a numerical prediction interval.
Record sex, height or another measure of body size, ancestry, family characteristics and practitioner or measurement method. Use these covariates in a multiple linear regression, allowing scientifically justified nonlinear age effects or interactions, and assess prediction error on held-out observations. A guessed overall sex proportion cannot replace individual sex measurements or identify sex-adjusted effects.
There is a source inconsistency: the PDF's numerical ear-length summary is ten times the scale of its plotted measurements and fitted line. Indeed, the fitted line at the reported mean age gives about mm, whereas the printed mean is about ten times larger. Missing decimal points in the summary are a plausible explanation. The significance and approximate above use the mutually consistent slope, interval and graph; they do not treat the inconsistent summary as valid data.
Past exam of the mathematics course of the University of Cambridge 2008 ib Paper 4 19H ii Solution Created 2026-09-24 Updated 2026-10-14
Set . The maximum likelihood estimation formulas for simple linear regression giveUsing the supplied rounded summaries gives metres and metres. Recomputing directly from the printed table gives approximately and metres, respectively, so the small summary rounding differences do not affect the conclusion.
I would not accept the model merely because the Student t-test fails to reject a zero regression intercept. That hypothesis test tests one parameter restriction within the assumed model, not the adequacy of its error assumptions or its functional form. In particular, complementary elevations and have exactly the same and hence the same fitted mean, but their observed low-angle minus high-angle ranges arefor the four corresponding pairs. All four are positive, suggesting an elevation-dependent effect omitted by the mean model, such as air resistance, rather than random scatter determined only by . This is a regression diagnostics concern, not a claim that these finite data logically rule out the normal-error model. The correct conclusion is nonrejection of the intercept restriction does not validate the regression model; further checks of the residual pattern and error assumptions are needed.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 30 1 e Solution Created 2026-10-03 Updated 2026-10-07
The simple linear regression assumes a straight conditional mean, , so that errors are centred at zero throughout the predictor range. The displayed regression residuals are predominantly positive at both ends and negative in the middle. This is a residual curvature diagnostic: the fitted straight line misses a curved conditional mean. The main concern is the shape of the mean function. The plot alone does not establish failure of the normal distribution assumption or a particular error variance model.
Past exam of the mathematics course of the University of Cambridge 2015 iii Paper 33 1 Solution Created 2026-10-03 Updated 2026-10-06
The ordinary least squares objective has gradient . The normal equation therefore givesThe Gram matrix is a positive-definite matrix because has full column rank. More explicitly, for any ,since . This proves that the displayed solution is the unique global minimum.
The fitted values are , where the hat matrix isThe inverse of the symmetric matrix is symmetric, so . Multiplication gives . Thus is the orthogonal projection onto the column space of the design matrix.
The regression residual vector is with . Consequently , , and the residual sum of squares isBy fitted-residual orthogonality, . Using , the cross-covariance matrix isBoth vectors are jointly normal, so they are also independent by independence of uncorrelated jointly normal variables. The zero covariance calculation itself only needs the common error variance and lack of error correlations.
For the first wind fit, let be wind velocity and electrical output. The simple linear regression is , with independent . It has two fitted mean parameters and residual degrees of freedom. The missing analysis of variance entries are therefore velocity degrees of freedom , velocity mean square , and residual degrees of freedom . The residual mean square is , and , consistent with the printed value after rounding.
Because the model includes a regression intercept, the coefficient of determination is the explained sum of squares divided by the total centered sum of squares:A large coefficient of determination does not rule out a wrong mean function. In the PDF's first residual-versus-fitted plot, residuals are negative at both ends and positive in the middle. This curved pattern agrees with the visibly flattening output-versus-velocity relationship and motivates a polynomial regression with a quadratic term.
The second wind model is , again with independent common-variance normal errors. Its fitted mean is . The line marked (A) is a two-sided Student t-test of against , conditional on retaining the intercept and linear term. Under the null hypothesis,Its two-sided p-value is . This is far below , so reject a purely linear mean in favour of the quadratic fit. Equivalently, the extra-term nested-model F-test has and null law .
The third fit is a reciprocal-predictor regression, , with estimated mean . It has two mean parameters rather than the quadratic model's three. Its residual standard error is smaller, versus , and its coefficient of determination is larger, versus . The corresponding residual sums of squares are approximately and . The reciprocal fit is preferable on both these fit measures and parsimony. The two models are not nested, so an ordinary extra-term F-test between them is inappropriate. On the common normal-error likelihood, the difference also favours the third model.
Neither lower residual sum of squares nor a higher coefficient of determination establishes adequate assumptions. The quadratic residual-versus-fitted plot removes the original pronounced curvature; the reciprocal plot also has no comparably obvious mean trend. The low-output residuals appear somewhat more spread out, so check scale-location plots and residuals against velocity for heteroscedasticity. Q-Q plots assess normality; residuals against observation order assess serial dependence; regression leverage and Cook's distance identify influential observations. Further cross-validation, replicate observations at comparable velocities, and prediction errors would help choose between their extrapolation behaviours. Both fitted shapes should be judged principally over the observed positive-velocity range.
Past exam of the mathematics course of the University of Cambridge 2015 ii Paper 3 4J Solution Created 2026-09-24 Updated 2026-10-06
The command fits the simple linear regressionusing ordinary least squares. The fitted conditional mean is a straight line in time. The regression residuals are mainly positive at the beginning and end and negative in the middle, so the mean function needs curvature.
A direct improvement is polynomial regression of degree two:The nested-model F-test tests against a nonzero quadratic coefficient. If measurements were used, its statistic isA small reported -value supports the quadratic term. The new regression residuals should then be checked for remaining systematic structure, changing variance and temporal dependence, because the F-test assumes independent errors of common variance. Radioactive decay also motivates an exponential mean, but the displayed curvature already justifies this simple nested comparison.
fit2 <- lm(Counts ~ Time + I(Time^2), data = geiger)
anova(fit1, fit2) Past exam of the mathematics course of the University of Cambridge 2025 iii Paper 218 5 a Solution Created 2026-09-24 Updated 2026-09-25
Model1 is the simple linear regressionModel2 is a random-intercept linear mixed modelwith the random intercepts and errors mutually independent.
Predictor centering 2026-10-07
Replacing a numerical predictor by preserves the fitted mean space and slope in a linear regression containing an intercept. The intercept becomes the fitted mean at . In simple linear regression, centering at the sample mean makes intercept and slope estimates uncorrelated under a normal linear model. This changes coefficient interpretation, not predictions.