Extra sum of squares 2026-10-06
For nested normal linear models, the decrease in residual sum of squares obtained by adding coefficients is their extra sum of squares. Dividing by the number of added coefficients and by the full-model residual mean square gives the partial F-test. A sequential analysis of variance attributes this decrease according to the specified order of entry; it need not equal the partial comparison when other terms are retained.
One-way normal linear model Created 2026-09-24 Updated 2026-10-14
Past exam of the mathematics course of the University of Cambridge 2003 iii Paper 42 4 Solution Created 2026-10-03 Updated 2026-10-14
Write the binary incidence matrix of a set system as to avoid confusing it with a sample size. Thencounts the number of blocks containing treatment , and for , counts blocks containing both treatments. The displayed structure therefore makes every treatment replication equal to and every pair concurrence equal to .
Assume the usual nonempty block design, with and . If , any block containing one treatment contains every other treatment: otherwise that treatment's replication would exceed its concurrence with the omitted one. Every block is consequently complete, so and . With random allocation within blocks this is a randomized complete block design. If , the design is a balanced incomplete block design. Counting partners of a fixed treatment in its blocks givesFor , gives , hence . Moreover has eigenvalue on the -dimensional zero-sum subspace and eigenvalue on the constant direction. Thus , while . This proves , the Fisher's inequality for block designs. The case allows singleton blocks; their lack of connectedness prevents general treatment comparison after block adjustment, but does not invalidate the rank inequality.
First ignore the day information and use a one-way normal linear model with five group means and independent errors of common variance. There are observations. The analysis of variance has treatment, residual and corrected-total statistical degrees of freedom , respectively. The mean squares in ANOVA giveUnder equal treatment means this has the F-distribution with degrees. It exceeds the given upper critical value , so the unblocked analysis rejects equality at .
The actual day allocation omits a different treatment on each of the five days. Hence it is a balanced incomplete block design withEvery pair occurs on exactly the three days omitting neither member. In the additive two-way analysis of variance, use an intercept, four independent treatment contrasts and four day contrasts. The design is connected, so the model rank is and its residual has statistical degrees of freedom. Day effects and treatment effects are not orthogonal, because a different treatment is absent each day; the unadjusted treatment sum of squares cannot be used for the adjusted test.
Enter days first and then treatments. The supplied sequential sums of squares giveThe day, treatment-after-day, residual and corrected-total statistical degrees of freedom are . Under the additive normal linear model and the null of equal treatment effects, the adjusted numerator and residual squared lengths are independent chi-squared quantities, so the ratio has the F-distribution with degrees. It is below even the given critical value . After accounting for days there is no significant treatment difference at either or . This inference assumes independent homoscedastic normal errors and an additive day effect; with one observation per observed treatment–day cell, unrestricted interactions cannot also be fitted.
Past exam of the mathematics course of the University of Cambridge 2003 iii Paper 42 5 Solution Created 2026-10-03 Updated 2026-10-14
Code each two-level factor as a sign . A factorial contrast indexed by a factor subset has sign column , with the empty subset giving the intercept. Construct a regular fractional factorial design by choosing independent words and retaining the settings satisfying , where each . In binary exponent notation these are independent linear equations over , leaving freely chosen coordinates and exactly settings. Dependence of the chosen words would fail to give the stated fraction size.
The words generated by multiplying the form the defining contrast subgroup , of order . Multiplication cancels a repeated factor, so word multiplication is symmetric difference of subsets. On the fraction, is constant for every , and henceTo see that these are all the aliases, average over the fraction. If , this is a nonconstant character of its freely varying binary coordinates; pairing settings that reverse that character makes the average zero. If , the product is constant. Thus the aliasing in a fractional factorial design classes are exactly the cosets of . For a half fraction, with , and every contrast column is aliased with exactly the other word , with a plus or minus sign according to the chosen fraction. This includes the defining word paired with the intercept.
For the six-factor experiment, take the 32-run half fractionIts resolution of a fractional factorial design is VI. Every main effect is aliased with a five-factor interaction, and every two-factor interaction with a four-factor interaction. In particular, no two required low-order effects are aliased with one another. Under the stated negligible-higher-interaction assumption, all six main effects and the fourteen required two-factor interactions are estimable before introducing blocks.
To form four equal days, classify runs by the two signsTheir product is . The three nonconstant block contrasts therefore coincide with the treatment-column alias classesOnly among the main effects and two-factor interactions is lost to block confounding in a factorial design; the other two block directions involve only negligible three-factor interactions.
Here is an explicit construction of every run without an ambiguous generator convention. For each day sign pair , choose freely and setThere are eight distinct settings per day and 32 in total. Direct multiplication gives , and . Conversely those three equations solve uniquely from , so there are no missing or repeated settings. Assign the four sign pairs randomly to the four days, and randomize the eight runs within each day.
Distinct nonaliased factorial contrasts are orthogonal over the fraction. None of the 20 required low-order contrast columns belongs to a block class, so all are also orthogonal to the three block-effect columns. Their joint design matrix, including an intercept, therefore has rank . The analysis of variance partition isThe eight residual directions are the remaining unconfounded three-factor alias classes. They estimate error only under the negligible-higher-interaction assumption; they are not a separate replicated pure error stratum. This provides the requested comparisons within exactly four days of eight runs.
Past exam of the mathematics course of the University of Cambridge 2004 iii Paper 37 4 Solution Created 2026-10-03 Updated 2026-10-14
The commands read the 52 cell values into a vector and build the matching two-factor layout. In
expand.grid(country, goods) the first factor varies fastest, so the four countries are listed successively within each goods category. This matches row-by-row reading of the displayed table. Converting Goods to a factor is essential: its labels identify 13 categories and are not a quantitative trend. Country supplies the other categorical factor. The summaries suppress coefficient correlations, not coefficient standard errors.The first fit is the additive two-factor normal linear modelThere are free coefficients and residual statistical degrees of freedom. This is two-way analysis of variance without an interaction term. For this complete balanced layout, ordinary least squares givesThese formulas follow from the row- and column-sum normal equations: fitted row and column totals equal their observed totals. The balanced-design coefficient standard errors are for a goods contrast, for a country contrast, and for the reference-cell intercept. These yield the common contrast standard errors and the different intercept standard error in each summary. In particular the intercept is the fitted Software–UK value, not the grand mean or the observed Software–UK entry.
Thus the first intercept predicts million euros for Software in the UK. The Books coefficient adds million euros to the fitted value in any country, relative to Software; every other goods coefficient has this same arithmetic-difference interpretation. The country coefficients subtract , and million euros from the UK prediction for France, Germany and the rest of Europe respectively, regardless of goods. The model therefore assumes common absolute country differences across goods categories. For Software–France its prediction iswhich is impossible for positive spending and indicates a limitation of this additive original-scale specification.
The residual standard error is million euros, obtained from ; direct calculation gives . Each coefficient's printed statistic is , with a reference distribution under this normal linear model. The two-sided p-values compare each goods category with Software, or each other country with the UK, after adjustment for the other factor. For example France and the rest of Europe differ significantly from the UK at 5%, but Germany does not. The raw-scale significant goods differences are Books, Clothing, Electronic Goods, Groceries and Leisure Travel; these are individual reference-level comparisons, not an overall test of the goods factor.
The coefficient of determination is . The omnibus F-test compares all 15 nonintercept coefficients with zero:with reference and . This says at least one factor contrast is nonzero under the assumed error model. There is one observation per cell, so an unrestricted goods-country interaction would saturate the model, leaving zero residual degrees of freedom. Without replication or a specified interaction structure, the residual variation cannot be separated into interaction and independent error.
The second fit applies a logarithmic transformation and fits the same factor design to . The Gaussian log-response model isIts intercept exponentiates to a fitted Software–UK conditional median of million euros. Goods coefficients now give multiplicative ratios to Software, and country coefficients give multiplicative ratios to the UK. The estimated country ratios areFor example the Books ratio is and the Sports Equipment ratio is , consistently across countries. The model assumes common relative, rather than common absolute, country effects. It also guarantees positive retransformed fitted values. Under normal log errors, the original-scale conditional mean is , whereas is the conditional median and geometric mean. Correcting the retransformation bias here multiplies the naive predictions by approximately .
The log-scale residual standard error is , with the same 36 residual degrees of freedom, corresponding to a typical multiplicative error multiplier . France and the rest remain significant reference-country contrasts; Germany remains nonsignificant at 5%. The log-scale significant reference-goods contrasts are Books, Music, Videos/DVDs, Clothing, Sports Equipment, Electronic Goods, Groceries and Leisure Travel. Event Tickets, Toys, Video Games and Housewares do not individually differ significantly from Software at that level. These p-values remain subject to the usual multiple testing qualification.
The log-scale is computed using variation in the logarithms, so it cannot by itself establish better fit on the original response scale. The change is plausible because spending varies widely in magnitude and relative discrepancies are more meaningful than constant absolute discrepancies, but it should be assessed with regression diagnostics, especially a residual-versus-fitted plot and a normal Q-Q plot. The minimum residual near merits inspection; the command summaries alone do not verify independent normal errors. Moreover these responses are forecasts, so the inferential p-values have a literal sampling interpretation only if an appropriate stochastic model for their uncertainty is justified.
The log-scale analysis of variance adds Goods and then Country. In this balanced design their effect spaces are orthogonal after removing the intercept, so the sequential sums of squares equal the corresponding adjusted factor sums and are unchanged by reversing the two factors:The residual sum of squares is , giving . ThusTheir tiny upper-tail p-values show strong overall goods and country effects under the log-error model; a globally significant country factor is compatible with the nonsignificant individual Germany contrast. The omnibus fit statistic is on degrees of freedom, whose p-value is approximately . The printed zero reflects numerical formatting, not an exactly zero probability.
If two cell entries were missing, retain their correct factor labels and mark those responses unavailable, rather than shifting the remaining scan values into different cells. Fit the additive models to the 50 observed cells, assuming the missingness mechanism permits those observations to be analyzed without selection bias. All factor levels remain represented, and the row-column incidence graph remains connected: any two goods rows still share an observed country, since only two edges of the complete layout have been removed, and every country still has many observed goods. By identifiability of an incomplete two-factor additive design, the design therefore still has rank . HenceThe coefficients and their covariance must be recomputed by the observed-cell ordinary least squares equations. The balanced row-mean-plus-column-mean formulas and common within-factor standard errors no longer apply. Goods and Country effects are generally no longer orthogonal, so sequential ANOVA sums can depend on order; factor tests adjusted for the other factor should use nested model comparisons. Missing cells do not restore replication or make an unrestricted interaction test possible: that larger model still fits every observed cell exactly. If missingness depends on the unavailable spending values, additional modelling of that mechanism would be needed.
Past exam of the mathematics course of the University of Cambridge 2005 iii Paper 46 4 i Solution Created 2026-10-03 Updated 2026-10-14
Multivariate analysis of variance extends analysis of variance to vector responses. For example, a treatment may affect several correlated physiological measurements jointly. Separate univariate tests do not use the correlation geometry and require adjustment if they are interpreted as one multiple-testing procedure. A joint test asks whether group mean vectors differ in any direction.
In a one-way model, take independent , , , with a common positive-definite covariance. Put , and let and be group and overall sample means. The within-group and between-group scatter matrices areExpanding around each group mean makes the cross terms vanish, giving total scatter . To test , use the Wilks lambda statisticwhere solve the generalized eigenvalue problem and is nonsingular. Under the alternative, maximize the normal likelihood at the group means and covariance ; under the null, use the overall mean and covariance . Their likelihood ratio is , so small rejects equal means. Under the null, orthogonal projections of the Gaussian data give independent and , supplying its null calibration. Here is nonsingular almost surely when . Merely having more total observations than responses is not enough if group fitting consumes too many statistical degrees of freedom.
The test is invariant under a nonsingular linear change of response coordinates: both determinants acquire the same factor . The directions associated with large identify mean separation relative to residual variability. With one response it becomes the ordinary ANOVA F-test. With two groups, writing and , the version using Hotelling's T-squared statistic iswith . This formula demonstrates explicitly how the covariance weights a group difference.
The sketch shows hypothetical groups with strongly positively correlated responses and mean separation along their low-variance contrast. Marginal comparisons can look weak even when the joint comparison is informative. The ellipses represent individual-response covariance, not confidence regions for the means. Independence of observations, approximate multivariate normality and common covariance are substantive assumptions; outliers and unequal covariance can invalidate the usual calibration. Follow-up contrasts can identify the affected responses or groups, with appropriate multiplicity control. MANOVA uses shared covariance to test a multivariate mean difference, rather than testing unrelated coordinates in isolation.
Past exam of the mathematics course of the University of Cambridge 2007 iii Paper 43 1 Solution Created 2026-10-03 Updated 2026-10-14
This is an analysis of covariance: achievement is the response, aptitude is a quantitative covariate, and teaching method is a categorical explanatory variable. The usual normal linear model assumes independent errors with common variance .
read.table reads the data with a header row; attach makes its columns directly accessible, and the two printed vectors confirm their ordering. rep(1:3, each=7) supplies the three group labels, and factor makes them categorical. The contrast option selects treatment coding for unordered factors, with method A as the first-level reference. The polynomial option would apply to ordered factors and has no role here.The formula using
aptitude * Group includes both main effects and their interaction. Writing for the method indicators, its fitted mean has the formThus A, B and C have separate intercepts and slopes. There are six coefficients and residual statistical degrees of freedom. The analysis of variance table uses sequential sums of squares: adding aptitude to an intercept-only model removes from the residual sum of squares; subsequently adding the two group indicators removes ; adding the two slope interactions removes only . The remaining sum of squares is , giving mean square .Each displayed F-test divides the added term's sum of squares by its statistical degrees of freedom and then by this full-model residual mean square. In particular the interaction test isThere is no evidence that the slopes differ, so the common-slope model is preferable among the fitted models. The small group -value concerns differences after including aptitude, whereas the first aptitude row is sequential and does not adjust for Group. It should not be interpreted as the covariate test after treatment adjustment.
The additive formula gives the parallel-lines modelIt has four coefficients and residual statistical degrees of freedom. Removing the interaction raises the residual sum of squares to , but lowers the residual mean square to . The sequential aptitude and group sums of squares are unchanged. The adjusted group test is now on statistical degrees of freedom, with : after allowing for initial aptitude, the methods are not all equally effective.
summary(..., cor=F) displays the fitted coefficients, their standard errors, the individual statistics, and two-sided -values; it omits the coefficient-correlation matrix. The intercept is the fitted A mean at aptitude zero, which is outside the observed range and is mainly a parametrization device. The common slope predicts about extra achievement units per aptitude unit, holding method fixed. Its adjusted test is on statistical degrees of freedom, with about . The method coefficients are adjusted differences from A, not the B and C intercepts themselves. The three fitted lines areThe B-minus-A estimate is with standard error and ; the C-minus-A estimate is with standard error and . Both comparisons are strongly significant.The B-minus-C comparison needs its own treatment contrast; its significance cannot be read off either comparison with A. Reconstructing the coefficient covariance from the design givesThus there is no detectable difference between B and C. This is consistent with pooling their effects in a further reduced model, but does not establish exact equality.
The residual standard error is . The five-number residual summary shows deviations on both sides of zero, with the largest magnitude about ; it does not by itself verify constant variance or normality. The coefficient of determination means about of the achievement variation about its overall mean is explained. The overall compares all three nonintercept coefficients with zero, on statistical degrees of freedom; its -value is . Printed coefficient -values rounded to
0.0000 are small, not literally zero. Past exam of the mathematics course of the University of Cambridge 2008 iii Paper 41 2 Solution 2026-10-14
Let , and . The proposed least-squares estimators satisfy the sum-to-zero constraints because and . Define . Direct summation givesNow write any other admissible parameters as , , , where . Expanding the ordinary least squares criterion, the cross-products with vanish by the preceding identities. The cross-products between , and vanish by their zero sums. ConsequentlyEvery added term is nonnegative and all vanish only at , . This proves the unique constrained minimum, withThe additive-model residual sum of squares and intercept-only residual sum of squares are thereforeThe same orthogonality gives the analysis of variance identityFitting factor B alone yields fitted values and residual sum . Fitting A alone gives residual sum . Adding B after A then reduces it to , a reduction of again. The reduction due to B is in either order. This is balanced factorial orthogonality; it generally fails for unequal cell replication.
There are observations. The additive model estimates independent parameters, so the missing degrees of freedom are A: 2, B: 1, residuals: 8. The individual requested residual sums are below.
To check for an interaction, extend the normal linear model to , with each row and column sum of zero. Equivalently, fit the six unrestricted cell means. Its residual sum of squares is the within-cell sumThe interaction adds parameters; the cell-means residual has degrees of freedom. Under the no-interaction null hypothesis and the independent equal-variance normal error model,The numerator and denominator arise from orthogonal Gaussian projections, proving the exact F-test. Reject for a sufficiently large value. The printed additive analysis of variance table does not supply , so it cannot determine this test statistic numerically; the replicated cell data would do so.
Past exam of the mathematics course of the University of Cambridge 2008 ii Paper 1 13J Solution Created 2026-09-24 Updated 2026-10-14
The array has replicates, levels of factor , and levels of factor , giving . R vectorizes an array with the first index changing fastest, then the second, then the third. Accordingly,
gl(I,K,length(y)) repeats each level for the ten replicates and cycles over its two levels, while gl(J,K*I,length(y)) repeats each level for twenty observations. These factors align with the vectorized response.The first fit is the additive Analysis of variance model , with independent normal errors of common variance . Under the default treatment constraints , the four fitted coefficients estimate the baseline cell mean, the minus effect, and the contrasts with . Thus the baseline fitted mean is , the second level adds , and the second and third levels add and .
The summary tests compare each indicated coefficient with zero, using its standard error and residual variance estimate . They have 56 residual degrees of freedom. The three non-intercept contrasts are strongly significant; the intercept test asks whether the baseline mean is zero, not whether either factor matters overall. The Analysis of variance tests are joint nested-model tests: no main effect, with one numerator degree of freedom, and no main effect, with two. Their sequential sums of squares are and . In this balanced design the main-effect subspaces are orthogonal, so ordering does not change those sums of squares. The denominator is the same residual mean square ; both factor effects are highly significant.
The second fit expands
a*b to a+b+a:b, adding two interaction coefficients. It allows the effect to differ between levels and has six parameters, equivalently one mean per cell, with 54 residual degrees of freedom. The interaction adds only about to explained sum of squares; its statistic is with degrees of freedom and . There is no evidence against additivity, so the simpler first model is preferable on these data. This does not prove the true interaction is exactly zero.For the final expression, , , and . The fitted vectors are orthogonal projections onto nested model spaces, so is the additional sum of squares due to interaction. The final code computesthe same interaction test as the Analysis of variance row. The exact value uses the original, unrounded observations and fits. Using only the displayed rounded sums and gives about instead; that discrepancy is rounding, not a different test. The omitted observations prevent reconstructing more digits from the printed data alone.
Past exam of the mathematics course of the University of Cambridge 2012 iii Paper 37 2 Solution Created 2026-10-03 Updated 2026-10-07
A regression factor is a categorical predictor represented by level indicators and contrasts. Treating year as a regression factor permits arbitrary differences between the three yearly means, reflecting conditions such as weather, rather than imposing a linear time trend.
Let be the yield for seed variety , fertiliser level , and year . A treatment-coded two-factor normal linear model with additive year effects iswith independent errors. The unrestricted coefficients are : six parameters for twelve observations. Equivalently use baseline-zero variety, fertiliser, and interaction arrays. There are no year-treatment interactions in this fit.
Dividing each sum of squares by its statistical degrees of freedom gives the completed analysis of variance:In particular, the missing interaction statistic is . Its null hypothesis is , against : the change in mean yield from high fertiliser is the same for both varieties. Under the null hypothesis and the independent homoscedastic normal linear model, this nested-model F-test has distribution . The printed -value 0.001137 strongly rejects no interaction.
Do not drop fertiliser just because its main-effect ANOVA row has . In this balanced factorial design that row measures a fertiliser effect averaged over varieties; large opposite effects can cancel. The strongly supported interaction requires retaining its associated main effects by regression model hierarchy. Seed and year also have evidence of effects in their ANOVA rows, so this table alone gives no compelling simplification of the fitted terms.
The interaction contrast is , with standard error 0.7946. The fitted high-minus-low fertiliser effect is for variety 1 but for variety 2. The fitted variety-2-minus-variety-1 contrast is under low fertiliser and under high fertiliser. Thus variety 2 performs best under low fertiliser, while high fertiliser benefits variety 1 and reduces variety 2's fitted yield. The marginal fertiliser effect is only .
The four fitted means in the baseline year are for respectively. Add in 2005 and in 2006 to every fitted mean. The 2005 coefficient has under a test of a zero contrast with 2004; the analogous 2006 contrast has . The latter is lack of evidence for a difference, not proof that the yearly means coincide. Standard errors for the combined contrasts require the coefficient covariance matrix. The experiment is small: residual standard error is 0.6882 on only six statistical degrees of freedom. If the same fields were reused, possible within-field dependence and field allocation would need checking before treating the fitted error independence as established.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 30 2 e Solution Created 2026-10-03 Updated 2026-10-07
The analysis of variance provides evidence of a chocolate effect both with day included (, p-value ) and with day omitted (, p-value ). Because every chocolate–day cell has the same replication, balanced factorial orthogonality separates the two main effects; the chocolate row is meaningful despite being entered first.
The chocolate-only fitted group means are approximately boards for A, B, C, D respectively. Thus A has the largest fitted lecturing speed and C the smallest. Relative to A, the fitted differences are boards. The printed individual Student t-tests give strong evidence for the A–C contrast (p-value ); B and D versus A have p-values and , respectively. Those latter contrasts are not significant at 5%, and the output does not test all other pairwise comparisons. Simultaneous claims would require accounting for multiple hypothesis testing.
There is little evidence of a day effect after adjusting for chocolate. A chocolate-only normal linear model is therefore a reasonable simpler summary, with residual standard deviation about boards and explained variation . This is an association under the additive statistical model; a causal claim would additionally require an appropriate assignment of chocolate and checks of the regression residuals and possible interaction terms.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 35 2 c Solution Created 2026-10-03 Updated 2026-10-07
Start with six program sequences: , , , , and . This gives two appearances of each program per row and per column. It also balances transitions: each ordered pair of distinct programs occurs five times across all adjacent sessions.
Apply restricted randomization by randomly assigning the six sequences to the six volunteers and independently permuting the three program labels. Using the supplied numbers, rank the first six from smallest to largest: the sequence indices are . Assign these, in order, to volunteers 1 through 6. Rank the next three numbers attached to symbols : their order is . Assign actual program labels to these ordered symbols, so base , base , base . The final ready-to-use randomized row-column design is:
Programs retain their real identities after this label permutation. The researcher should follow the table across chronological afternoons; arbitrary column permutations are deliberately excluded so that transition balance survives. Each program receives twelve sessions and occurs twice in every block. Under the additive block model, the analysis of variance has row, column, program and residual statistical degrees of freedom , respectively, besides the grand mean. Transition balance is useful against differential carryover effects, but is not a proof that they are absent.
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 33 2 Solution Created 2026-10-03 Updated 2026-10-14
Let be speed and the tool type. Each fit is a normal linear model with independent errors. The three mean specifications areThe constraints are treatment coding with type 1 as reference. The parameter counts are , respectively. Model 2 gives parallel lines; model 3 allows interaction terms and distinct slopes.
In the analysis of variance interaction row, adding three independent slope differences costs three degrees of freedom. Its extra sum of squares is the reduction in residual sum of squares, . Its mean square is , and its F-test statistic isThus the four missing entries are , , , and , to the precision allowed by the rounded output. This tests against the alternative that at least one slope difference is nonzero. Under and the normal linear model assumptions, the statistic has distribution . Its p-value gives no reason to reject at 5%.
The simpler common-line model is inadequate compared with the parallel-line model. Testing against at least one nonzero type effect, while retaining speed, gives the partial F-testIts p-value is far below , so reject the common-line restriction. This reduction differs from the sequential type sum of squares in the displayed table, because that table adds type before speed. Recommend model 2: different intercepts and a common decreasing slope.
The selected coefficient estimates giveThe intercept estimates the expected lifetime of type 1 at speed zero; if zero speed is outside the data range, it is only an extrapolated intercept. Its standard error is , and its Student t-test ratio is , with two-sided p-value . At any fixed speed, type 2 differs from type 1 by hours, with standard error , and p-value , giving little evidence of a difference. Types 3 and 4 exceed type 1 by and hours, with standard errors and ; their test ratios and and p-values and support positive differences. Each of these individual coefficient tests has null value zero, alternative nonzero, and null distribution .
The speed coefficient means a reduction of hours per extra revolution per minute, or hours per additional 100 rpm, for every type. Its standard error is ; the ratio has null distribution when the common slope is zero, and two-sided p-value .
The residual standard error estimates the common noise standard deviation in hours using 15 residual degrees of freedom, since . The coefficient of determination means that about of the corrected lifetime variation is explained by this fit. The overall F-test statistic tests the simultaneous restriction against at least one nonzero coefficient; its null distribution is and its p-value rejects an intercept-only mean. These conclusions remain conditional on suitable regression diagnostics for independent, homoscedastic, approximately normal errors.
The required sketch plots the four fitted lines. Its speed interval is illustrative because the observed speeds are not supplied; the ordering and vertical gaps are determined by the fitted coefficients.
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 iii Paper 33 2 Solution Created 2026-10-03 Updated 2026-10-06
Let be recall for age level , processing level , and replicate . Write for Younger and for Older. With Older and A as the reference levels in a regression factor, the additive two-factor normal linear model under treatment coding iswhere the errors are independent , with common positive variance. The design matrix is fixed; subjects supply independent observations; the specified conditional mean is correct; and the absence of an interaction term means the age difference is constant across processing levels. These are model assumptions, not consequences of random assignment. The treatment allocation supports independence between processing assignment and background characteristics, but age itself was not randomized.
An older subject in A has and , so the estimated mean is words. Its standard error is the intercept's . There are residual degrees of freedom, giving the 95% confidence interval for this mean:This is a mean-response confidence interval, not a prediction interval for a new individual's recall; the latter also includes the new observation's error variance.
The second two-factor normal linear model adds age-by-processing interaction terms:Its ten free mean parameters are equivalent to one mean for each of the ten cells. To compare the fits, the null hypothesis is . The full residual sum of squares is on degrees of freedom. Adding interaction reduces the additive model's residual sum of squares by , so the reduced value is . The nested-model F-test statistic isIts p-value is . Reject additivity and retain the interaction model. The significant interaction means that a single age effect averaged over all processing methods does not adequately summarize the data.
The regression intercept is the older-A mean. The age coefficient is the younger-minus-older contrast specifically in A. The processing coefficients compare B, C, D and E with A specifically among older subjects. The interaction coefficients are differences between the age contrast in each of those methods and its value in A. Adding the relevant coefficients givesThus A, C and especially D favour younger subjects in their estimated means, whereas B and E have little estimated age difference. In the younger group, D has the largest estimated recall, followed by C and A; B and E are much lower. Among older subjects C is largest, D and A are intermediate, and B and E are lowest. Comparing these orders is a description of estimates, not a claim that every pairwise difference is significant.
Each coefficient's printed standard error estimates its uncertainty; its statistic divides the estimate by that error, and its two-sided p-value uses under the relevant zero-contrast null hypothesis. For example, the older B-versus-A and E-versus-A contrasts have and . The C-versus-A and D-versus-A older contrasts have and . The B interaction has , while the D interaction is borderline at and the other two individual interaction tests are not significant at . These individual tests do not override the joint interaction F-test, and multiple comparisons require care. A simple younger-versus-older contrast outside A combines coefficients and must use their estimated covariance, rather than adding their marginal errors.
The residual standard error estimates . The coefficient of determination is the fraction of centered sample recall variation explained by the ten-cell model. The overall with null law tests all nine non-intercept coefficients jointly against zero, giving extremely strong evidence that the cell means are not all equal. The sequential analysis of variance separates age, process, and their interaction; the balanced design makes the main-effect sums orthogonal, whereas the coefficient table uses the specified reference-level contrasts.
To assess pooling into three processing types, retain age-by-type interaction because the previous test rejects additivity. The reduced model has six cell means. Its null hypothesis says A and C have equal means within each age, and B and E have equal means within each age: four restrictions. Compare it with the ten-cell model usingIn fact the supplied fitted cell means and equal cell sizes determine the increase without raw observations. Pooling two ten-person cells with means adds to the residual sum of squares. Here the four differences are , soTherefore and . At , the data do not reject the three-type reduction, though the result is borderline and is not proof that the pooled means are identical. This factor-level pooling test keeps the previously supported interaction structure; reducing the categories and removing all interaction simultaneously would test a different set of restrictions.
Past exam of the mathematics course of the University of Cambridge 2020 ii Paper 4 5J b Solution Created 2026-09-24 Updated 2026-09-29
The intercept-only model has residual degrees of freedom, so the sample size is . The one-covariate model and full model therefore have respectively and residual degrees of freedom. The completed sequential analysis of variance table hasThus the missing sums of squares are and , and the corresponding F-statistics are approximately and . The first p-value is below ; the second is approximately . The tiny second increment is consistent with the reported t-test because, for one added coefficient, the partial F-statistic equals the squared t-statistic up to displayed rounding.
Wilks lambda statistic 2026-10-14
For nonsingular within-group scatter and between-group scatter , the statistic is , where solve the generalized eigenvalue problem . It is small when the group means differ strongly relative to within-group variation. Maximizing a common-covariance normal likelihood under equal and unrestricted means gives the likelihood ratio . Its determinant factors cancel under any nonsingular change of response coordinates. For one response it is equivalent to the analysis of variance F-test.


