Past exam of the mathematics course of the University of Cambridge 2001 iii Paper 23 4 b Solution Created 2026-10-03 Updated 2026-10-14
One method applies inverse transform sampling to the standard normal cumulative distribution function: , followed by for mean and standard deviation . Numerical approximations to are needed, and the endpoints must be avoided.
A convenient alternative is the Box-Muller transform. From independent uniforms setThe radial probability density function is for , and the angle is independently uniform on . Dividing their joint density by the polar-coordinate Jacobian determinant givesThus the outputs are independent standard normal distribution draws. Apply to obtain other normal means and variances. With finite pseudorandom number generators, this is an approximation to the ideal independent-uniform model; poor dependence in the input stream is not cured by the transform.
Past exam of the mathematics course of the University of Cambridge 2002 iii Paper 39 2 Solution Created 2026-10-03 Updated 2026-10-14
The calculation is principal component analysis on a correlation matrix, rather than on an unscaled covariance matrix. For each of the eleven rating variables, subtract its column mean and divide by its column standard deviation. If is the resulting matrix, use the divisor convention of the fitted object to writeHere the scaling standard deviations use divisor , consistently with this convention. Using sample standard deviations with divisor gives the same correlation matrix and directions, with the corresponding score scale. Every diagonal entry of is one, so .
A principal component is the linear combination of the standardized ratings along . Its principal component score for judge is , and its variance is . The displayed component standard deviations are ; the explained variance of a principal component is . In particular,The first component explains about of the standardized variation, and the first two jointly explain . Components three, four and five add about , and . The cumulative line adds these proportions successively; it is not the proportion explained by that component alone. Retaining two components discards about of the total standardized squared variation.
The displayed principal component loadings are the unit eigenvector coefficients . The first direction has positive, broadly similar weights for all ratings. It measures an overall favorable-rating tendency: a judge high on most ratings has a high first score. The second direction compares integrity and demeanour, with large positive coefficients, against such attributes as decision promptness, case-flow management and physical ability, with negative coefficients. Thus among similarly rated judges, a positive second score indicates relatively stronger integrity/demeanour compared with those operational ratings. This is a description of a data direction, not a causal interpretation. Multiplying a whole eigenvector and its scores by minus one reflects the display but changes nothing substantive.
These principal component loadings are not themselves variable-component correlations. With standardized variables,For example, the integrity correlation with component one is approximately . Blank loadings in the printed second column indicate suppressed small entries, not exact zeros. The complete unrounded loading vectors in the fitted object must be used to calculate scores.
A two-dimensional representation plots the 43 pairswith each point labeled by its judge. In the fitted software object these are the first two columns of the score matrix. Nearby points have similar projections of their standardized ratings. The rank-two reconstruction is the orthogonal projection onto the leading principal plane and minimizes the total squared reconstruction error over all two-dimensional linear subspaces. To see this, for any orthonormal pair of directions the captured variance is the sum of its two Rayleigh quotients, at most by diagonalizing ; the remaining variance is the total minus that captured sum. Distances in the plot omit the smaller components, so a close projected pair need not be equally close in every original rating. The actual 43 coordinates cannot be recovered from the summary alone; the supplied data matrix or fitted score matrix is needed.
Past exam of the mathematics course of the University of Cambridge 2003 iii Paper 40 4 b Solution Created 2026-10-03 Updated 2026-10-14
Use a conventional two-sided test at significance level . Let per arm, , and . Under the specified alternative, the normal approximation to the difference of independent binomial proportions has standard deviationFor planning the pooled null standard error, use , giving . The rejection threshold is approximately , exceeding the mean alternative difference. With the standard normal distribution function, the approximate statistical power isNo: the usual two-sided 5% calculation gives about 45% power, below 50%. The expected death counts are only 20 and 10, so an exact discrete design calculation could refine this approximation.
The question does not specify the tail convention. If a beneficial direction is prespecified and a one-sided test at 5% is justified, replace by approximately ; the resulting statistical power is about , and the answer is then yes. This change of testing convention must be declared.
Past exam of the mathematics course of the University of Cambridge 2003 iii Paper 43 2 i Solution Created 2026-10-03 Updated 2026-10-14
The empirical distribution gives each observed value mass , so its empirical distribution function isFor each of independent replications, draw values with replacement from this empirical distribution, recompute the same estimator , and use their sample standard deviation:This estimates the conditional bootstrap standard error; dividing it by would instead estimate simulation uncertainty in the bootstrap mean and is not the requested sampling standard error.
When the original observations are distinct, the first resampled index may be arbitrary. After distinct indices have been drawn, the next index avoids them with probability . Multiplying conditional probabilities givesHere denotes probability conditional on the data.
Past exam of the mathematics course of the University of Cambridge 2004 iii Paper 35 1 a Solution Created 2026-10-03 Updated 2026-10-14
Let be the vector of expected returns and the positive definite covariance matrix of risky returns. For risky investment portfolio weights satisfying , the portfolio opportunity set consists ofShort selling permits negative weights. For a fixed expected return, the least possible variance is attained on the left boundary of this set. Its upper branch is the mean-variance efficient frontier: every other attainable point has either a larger standard deviation for the same expected return or a smaller expected return for the same risk. The lower boundary is therefore inefficient.
For example, writing , , and , minimization of subject to its two linear constraints givesTo obtain these weights, use Lagrange multipliers: the stationary equation is , and the budget and mean constraints determine . Positive definiteness makes this the unique constrained minimum. Thus the boundary is a hyperbola in risk/mean coordinates.
Adding the risk-free asset allows borrowing and lending at . In the usual positive-premium case the market portfolio is the risky tangency portfolio, and combinations of it with the risk-free asset form the upper capital market lineThe Sharpe ratio measures excess expected return per unit of standard deviation; its maximum is the market price of risk . Points between the risk-free point and the tangency point lend some wealth; points beyond it borrow to leverage the market portfolio. The first panel illustrates the actual data here. The second anticipates the change in part (g), where the normalization of the tangency direction reverses its orientation.
Past exam of the mathematics course of the University of Cambridge 2004 iii Paper 35 1 e Solution Created 2026-10-03 Updated 2026-10-14
The expected return of the market portfolio is the weighted mean of the asset returns:For its variance, use rather than expanding nine terms:Hence its return standard deviation isMeans and standard deviations here are both measured in percentage points, consistently with the given covariance matrix.
Past exam of the mathematics course of the University of Cambridge 2004 iii Paper 35 1 f Solution Created 2026-10-03 Updated 2026-10-14
The excess expected return is . Dividing it by the return standard deviation yields the Sharpe ratio and upper capital market line slope:
Past exam of the mathematics course of the University of Cambridge 2004 iii Paper 35 4 c Solution Created 2026-10-03 Updated 2026-10-14
Let denote the strike, , and suppose , , and . Under the Black-Scholes model and the risk-neutral measure, is normal withApplying risk-neutral valuation to the European call option payoff givesUse , whose differential is precisely the normal density times . The threshold is , soEquivalently, rescale the tail interval to obtain on .
For independent uniform inputs, the Monte Carlo estimator is . It is unbiased, converges by the strong law of large numbers, and has variance . The payoff has finite second moment because the lognormal stock has finite moments. Its estimated standard error is the sample standard deviation divided by .
Past exam of the mathematics course of the University of Cambridge 2004 iii Paper 43 1 iii Solution Created 2026-10-03 Updated 2026-10-14
Write and . Apply the Schur complement covariance to the first two coordinates, conditioning on the third. The conditional covariance and conditional variances areDivide the conditional covariance by the product of the conditional standard deviations. The conditional correlation is thereforeThis is the partial correlation after removing the linear effect of . For a nonsingular multivariate normal distribution, both residual variances are positive and the answer is independent of . If a residual variance vanishes, the requested correlation coefficient is undefined, even though the residual covariance formula remains valid.
Past exam of the mathematics course of the University of Cambridge 2004 iii Paper 43 4 Solution Created 2026-10-03 Updated 2026-10-14
princomp(): principal component analysis. Supply observations in rows and numeric variables in columns. After centering, let denote the resulting matrix and its sample covariance matrix, with an explicitly stated normalization. WriteThe first direction maximizes the Rayleigh quotient over unit vectors; successive directions maximize it subject to orthogonality to the earlier directions. The principal component scores are , with variances and zero pairwise sample covariance. Zero covariance alone does not imply independence. Each principal component loading describes a direction in variable space; its sign is arbitrary, and repeated eigenvalues leave the basis inside the corresponding eigenspace arbitrary.The function returns principal component loadings, component standard deviations
sdev and, when requested, principal component scores. By default it uses a covariance matrix; cor=T instead performs principal component analysis on a correlation matrix, standardizing nonconstant variables to variance one. This choice matters when variables have different measurement units. These interface details are documented in the S-Plus help for princomp.A scree plot shows the ordered eigenvalues; a plot of the first two principal component scores can reveal groups, unusual observations or a dominant gradient. The first components explain of the total variance. Reconstructing each centered observation by its orthogonal projection onto these directions minimizes average squared reconstruction error among -dimensional linear subspaces. Thus PCA gives an optimal linear compression for squared reconstruction error, with scaling and the retained dimension chosen explicitly. It is an unsupervised learning method, rather than a classification rule fitted to supplied labels.
tree(): classification trees and regression trees. A call such as tree(response ~ predictors, data=dat) fits a recursive partitioning model. At a current node, test numerical predictors against candidate thresholds, or divide the levels of a categorical predictor into two sets. Select a split that most improves the fitting criterion, then repeat within its children. Numerical splits give axis-aligned regions. A categorical response produces a classification tree; a numeric response produces a regression tree, as specified in the S-Plus tree documentation.For a regression tree, the constant prediction in a terminal region is its sample mean, minimizing the sum of squared residuals there. For a classification tree, estimate class probabilities by the observed proportions in a leaf and predict a most probable class under equal misclassification costs. The classification-tree deviance of a node iswith ; splitting maximizes the decrease from parent to children. This fitting criterion differs from the number of wrong classifications. The middle sketches show the same three-region partition as a binary tree: first split on variable one, then split the right-hand branch on variable two.
Growing to small leaves can overfit. Use cost-complexity tree pruning, balancing fitted loss against leaf count,and select complexity by cross-validation. Plotting the fitted tree and annotating nodes displays the rules; prediction routes each new observation through the fitted splits. A tree gives an interpretable, piecewise-constant prediction rule; training fit alone does not measure prediction accuracy.
The
rpart() alternative. This also fits classification and regression trees by recursive partitioning, with squared-error splitting for ordinary numeric responses and, by default for classification, Gini impurity . Classification settings can instead use information-based splitting and specify prior probabilities and a loss matrix. It supports surrogate splits to approximate a node's primary left/right assignment when the primary predictor is missing. Its complexity-parameter path and cross-validated errors support cost-complexity tree pruning; for example, select a complexity parameter and apply prune(fit, cp=...). The maintainer's rpart documentation describes the criteria and the distinction in handling surrogate predictors. The partition and tree sketches apply to either implementation; the fitted tree need not be the same because splitting criteria and controls can differ.cmdscale(): classical multidimensional scaling. Its input is a dissimilarity matrix or stored distance object. It outputs coordinates for the observations in a chosen dimension, usually two for visualization. Let contain the squared entries of , and putFor centered Euclidean coordinates , the distance identity gives : multiplying by removes the row and column norm terms. Diagonalize this Gram matrix and retain its largest positive eigenvalues. The coordinates areThus classical scaling exactly recovers Euclidean distances when all positive eigenvalues are retained. Reducing dimension approximates the centered Gram matrix; it does not in general minimize squared discrepancies in the original distances. Negative eigenvalues identify a failure of the Euclidean distance matrix criterion, so their size matters when interpreting a display. The historical S-Plus cmdscale help describes the dimension argument, eigenvalue output and optional additive adjustment to dissimilarities.Plot the two coordinate columns on equally scaled axes and label observations. Nearby plotted points suggest small dissimilarities only insofar as the dimension reduction fits the input well. The bottom sketches give an exact Euclidean example: a configuration and its independently recovered two-dimensional coordinates have identical pairwise distances, despite different coordinate axes. Classical scaling converts distances into geometry; translations, rotations and reflections do not change the represented distances. For Euclidean distances between observations, its coordinates agree with the corresponding principal component scores up to these harmless choices of axes.
Illustrative PCA directions and scree plot, equivalent recursive partition and tree, and exact classical-scaling recovery of Euclidean distances
. Details. Past exam of the mathematics course of the University of Cambridge 2004 iii Paper 67 2 d Solution Created 2026-10-03 Updated 2026-10-14
First fix a genuine normalization error in the original PDF: the Gaussian exponent uses , so must be the standard deviation, the variance is , and the normalized probability density function isThe printed prefactor has only under its square root; its integral is rather than one. Use the normalized normal distribution above.
The one-scale probability of exceeding the linear spherical-collapse threshold is . In the Press-Schechter formalism, the mass fraction above is assigned toThe factor two is necessary to recover all the mass in the hierarchical limit : the uncorrected one-point upper tail tends to only one half. A precise justification is available in the excursion-set description of halo formation with a sharp-k smoothing filter. The smoothed Gaussian random field then becomes Brownian motion in its variance . Reflecting a trajectory after its first crossing of pairs trajectories which crossed but end below the threshold with those which end above it. The Brownian reflection principle therefore gives .
This multiscale mass assignment is an extra modelling prescription: a Gaussian one-point probability and a collapse threshold alone do not mathematically determine a halo mass function. The “all matter” normalization additionally assumes arbitrarily large small-scale variance; a finite variance cutoff leaves an uncollapsed fraction.
Differentiate at fixed and fixed :For decreasing , a mass interval contains the positive fraction . Its comoving mass is , so division by halo mass gives the Press-Schechter halo mass function:The absolute value, or equivalently a minus sign multiplying , is essential for a positive abundance. The original PDF correctly places absolute values around the abundance and the full derivative expression; these bars are lost in the converted TeX. The density is comoving, so the prefactor uses today's matter mass density, rather than the physical density at redshift .
Past exam of the mathematics course of the University of Cambridge 2006 ib Paper 4 6B b Solution Created 2026-09-24 Updated 2026-10-14
For a normalized wavefunction in the required operator domains and a self-adjoint operator , its expectation value and standard deviation areEquivalently the squared uncertainty is , which is visibly nonnegative. Since the expectation value of a self-adjoint operator is real, expansion of the square and giveFor a state not normalized to one, divide each defining expectation integral by before using this formula.
Past exam of the mathematics course of the University of Cambridge 2007 ib Paper 1 7C Solution Created 2026-09-24 Updated 2026-10-14
Write , , and . The normal likelihood is proportional to . Its unrestricted maximizers are , . Under the null the variance maximizer is . Substitution gives the generalized likelihood-ratio test statisticThe ratio decreases as increases, so the likelihood-ratio rejection region is two-sided in . Under , is standard normal and is independent chi-squared with degrees of freedom. Independence follows by resolving the isotropic Gaussian sample vector into its projection on the constant vector and its orthogonal complement. Hence has the exact Student t-distribution with degrees of freedom.
For a chosen significance level , compute the sample mean and the sample standard deviation with denominator , and reject precisely whenEquivalently, report the two-sided -value . This requires and positive population variance; holds almost surely under that model. The nuisance variance is removed by the exact null distribution, so one should not substitute a normal critical value or a large-sample chi-squared approximation. This is the normal-mean likelihood ratio with unknown variance.
Past exam of the mathematics course of the University of Cambridge 2007 iii Paper 47 3 c i Solution Created 2026-10-03 Updated 2026-10-14
Covariance-based PCA uses centered protein measurements in their original gram units. Its total variance is . Correlation-based PCA first divides each centered food measurement by its sample standard deviation, giving nine unit-variance variables and total variance nine. Thus it is principal component analysis on a correlation matrix, not an equivalent rotation of the original unscaled measurements.
The variances of cereals and milk together account for of the original total. Consequently those variables have considerable influence on covariance-based PCA. Its first component is dominated by a cereal coefficient opposed to milk , broadly a cereal-versus-milk contrast. Its second is dominated by milk , with cereals and fish . Its third is chiefly white meat versus fish , with a smaller negative milk term. Component signs may all be reversed without changing the analysis; the important features are relative signs and magnitudes.
After standardization, eggs and starch can contribute as strongly as large-variance foods. The first correlation-based component gives positive weight to meat, eggs, milk and starch, opposed principally to cereals and pulses/nuts; eggs now has coefficient despite its small raw variance. The second emphasizes fish and fruit/vegetables negatively, opposed especially to starch and white meat. The third contrasts white meat and fruit/vegetables with milk, fish and red meat. Thus standardization changes both the emphasis and the directions, rather than just the displayed units of the same components.
The explained variance of a principal component must use the appropriate total:Raw and standardized percentages describe different variance objectives and must not be compared as if one method were always superior.
Standardize when relative patterns across variables, rather than their absolute gram-scale variation, should have equal marginal weight. Correlation-based PCA is also insensitive to changing a variable's measurement unit, which covariance-based PCA is not. Here every food group already has the same units, so differing units do not force standardization. If large fluctuations in actual protein amounts are scientifically important, covariance-based PCA is appropriate. If dietary composition across all food groups is the focus, correlation-based PCA can be more informative. Standardization can nevertheless amplify noise in nearly constant variables; the decision should follow the scientific purpose and measurement reliability.
Past exam of the mathematics course of the University of Cambridge 2008 ia Paper 2 12F Solution Created 2026-09-24 Updated 2026-10-14
Use the positive-support convention for the geometric distribution and put . Differentiating the convergent geometric series givesConsequentlySubtracting the square of the expectation from the second moment yields
For the die, this is the coupon collector problem. When scores are still missing, let count rolls up to and including the next newly observed score. Every fresh roll has success probability , so has a geometric distribution of parameter . These six successive waiting times are independent: conditional on the entire past at the start of a stage, its waiting-time distribution depends only on the number , not on the identities of the missing scores. Iterated conditioning therefore factors their joint distribution. The total number of rolls is .
Using linearity of expectation givesUsing variance additivity for independent random variables, or the coupon collector waiting-time variance formula just derived by this decomposition, givesHence the requested standard deviation isThe hint rounds the sum of squares from to ; using that rounded value gives , consistent at the precision of the hint. The exact computation preserves the slightly more precise value above.
Past exam of the mathematics course of the University of Cambridge 2008 iii Paper 41 1 Solution Created 2026-10-03 Updated 2026-10-14
Write . In this normal linear model, the ordinary least squares criterion is . Differentiating with respect to gives the normal equations for linear least squares, . Full column rank of the design matrix makes invertible, and completing the square proves that the unique minimum isSince , its sampling distribution is the multivariate normal distributionLet be the hat matrix. It is symmetric and idempotent with rank , and . The regression residual vector is , soAn orthogonal projection of a Gaussian vector onto the residual space gives . The residual projection and fitted projection have zero cross-covariance, hence are independent because they are jointly normal. In particular, is an unbiased estimator of and is independent of . The maximum-likelihood estimator of instead divides by and is not unbiased.
For the null hypothesis , put . Under that null hypothesis, is standard normal and independent of . Therefore the Student t-test usesA two-sided level- test rejects when . The denominator is the estimated standard error of the regression coefficient.
The fitted linear regression includes an intercept and three covariates:Thus , and the residual degrees of freedom are . The fitted conditional mean isEach slope measures a conditional association with the response while the other two covariates are held fixed. Increasing wind speed by one mile per hour corresponds to a fitted decrease of in the concentration units used. Its standard error is , giving and a two-sided p-value of : evidence of a negative conditional association at the 5% level. The temperature slope is per degree Fahrenheit, with standard error , and p-value . The insolation slope is per langley per day, with standard error , and p-value . Neither of these last two conditional effects is significant at 5%; that does not establish that either true slope is zero. These are associations, not a demonstration of causal effects.
The intercept estimates the mean at zero values of all three covariates. Its value has a large standard error , giving and p-value . The zero-covariate combination may be outside the observed range, so this test may have little practical relevance. Every coefficient test uses a Student t-distribution with degrees of freedom.
The reported residual standard deviation measures unexplained variation in concentration units; the subsequent table gives , consistent with after rounding. The five-number residual summary describes the spread, from to , with median . An intercept forces the residual sum to zero, not the residual median. These five numbers alone cannot establish normal errors, constant variance or independence; residual-versus-fitted and quantile-quantile plots would be more informative, and successive days also warrant checking serial dependence. The coefficient of determination means that 65.33% of the sample response sum of squares about its mean is explained by this fit. Its adjusted version iswhich accounts for the number of estimated regression coefficients.
The stepwise selection by the Akaike information criterion searches between the intercept-only model and the specified model with all three main effects. For these Gaussian fits, the printed Akaike information criterion is, up to a constant common to the candidates,The full model has and AIC . Removing insolation increases the residual sum of squares by but decreases AIC to , so that removal is chosen. Removing temperature or wind instead would give AIC or and is worse. In the next step the candidate models include deletions and restoration of insolation. Keeping wind and temperature has the smallest AIC: removing temperature gives , restoring insolation gives , and removing wind gives . Hence the search stops, givingThe accompanying F-tests compare a larger model with a one-parameter reduction: , where is estimated from the larger model. For example, removing insolation gives , equal to the corresponding squared test statistic. Deletions from the second-stage model use in the denominator, whereas restoring insolation uses the full-model denominator. These tests describe the comparisons; they do not determine the AIC choice. In particular, temperature is retained despite its deletion-test p-value . AIC balances fit and complexity, and a stepwise optimum need not be a global optimum over a richer model class. Ordinary coefficient inference after choosing a model does not account for the selection itself.
For positive responses, the Box–Cox transformation is for , and . Its profile likelihood refits the linear regression and variance at each and includes the transformation Jacobian. The graph peaks at roughly –. The approximate 95% likelihood-ratio confidence interval contains values a little below zero through approximately one, using the cutoff . Thus a logarithmic transformation () and a square-root transformation () are plausible, while leaving the response on its original scale () is at or very near the upper confidence boundary. The broad profile supports considering a mild power transformation; it does not determine a sharply estimated power. The raster does not justify more precise endpoints or a decisive assertion about which side of the boundary lies.
Past exam of the mathematics course of the University of Cambridge 2008 iii Paper 46 2 a Solution Created 2026-10-03 Updated 2026-10-14
Treat the two retrieved sets of positive tests as independent binomial samples, each of size 500, and use a two-sided test at significance level . The normal-approximation sample size for comparing two proportions, with equal numbers in each group, isFor , , this gives , or 356 per group. Thus 500 positives in each period are sufficient for 80% power under these assumptions.
More explicitly, a pooled two-proportion test rejects whenwhere pools the maximum-readout successes. At the proposed alternative, the difference has mean and standard deviation . The planning null critical difference is , giving approximate powerThis compares the readout percentage among positive tests. It assumes comparable measurement rules and independent observations; a change in that percentage alone does not identify its causal explanation or the prevalence of drug use in the full tested population.
Past exam of the mathematics course of the University of Cambridge 2009 ib Paper 4 6B Solution Created 2026-09-24 Updated 2026-10-14
Put and write the Gaussian wave packet as . Differentiation givesHence , the free Time-dependent Schrödinger equation.
With , its probability density isThe stated Gaussian integral shows its integral is one. Symmetry gives ; differentiating that Gaussian integral with respect to its coefficient gives . Thus the position standard deviation isIt is not a stationary state: its probability density changes with time as the packet spreads. A stationary state would have only an overall time-dependent phase and a fixed position density.
Past exam of the mathematics course of the University of Cambridge 2009 iii Paper 38 3 Solution Created 2026-10-03 Updated 2026-10-14
Let be the disease count among miners in exposure group , with representative exposure , for . The grouped-binomial logistic regression isThe model assumes independent miners, a common disease probability within each group at its representative exposure, and binomial variation without an extra dispersion parameter. The use of average exposure is a grouping approximation, not a claim that every miner in a group has identical exposure. The input response is and
weights=miners supplies the binomial denominators , not inverse variances; together they yield this count likelihood function. The default binomial link is the logit link.For , the likelihood-ratio test compares the intercept-only model with the linear-exposure model. The reduction in binomial deviance isUnder the usual regular large-sample approximation it has a chi-squared distribution with one degree of freedom. There is very strong evidence of exposure dependence, with a positive estimated coefficient .
For goodness of fit against separate probabilities in all eight groups, the residual binomial deviance has approximately degrees of freedom. Its upper-tail probability is about , giving no evidence of lack of fit. This is an approximate check, particularly because the earliest exposure groups have small expected disease counts. It supports adequacy of this mean structure, not proof that all its assumptions or possible confounding variables have been addressed.
The
predict call asks for a prediction at exposure , sets type="response" to return the fitted probability rather than its log odds, and requests the standard error of that fitted probability. It givesFor , the linear predictor is , and the delta method givesThe intercept-slope covariance is included in this expression. This measures uncertainty in the fitted mean probability; it is not the standard deviation of a new individual's binary disease outcome or of an unspecified new sample proportion.The model's odds at exposure are . Hence , independently of . By invariance of maximum likelihood estimation, estimate this odds ratio by . A Wald confidence interval for is ; exponentiating its endpoints after multiplication by gives the interval for the multiplier. Using the printed coefficient and standard error yieldsThus the estimated odds rise by about per year, or by a factor about per decade. These are changes in odds, not fixed multiplicative changes in probabilities.
The second fit keeps the same independent binomial distributions but permits a quadratic linear predictor,In the sequential analysis, each exposure term adds one coefficient. With the first model's deviances, all nine missing entries are recovered in this completed table:The final reduction is , with rounding to the precision of the printed output. Testing therefore gives on one degree of freedom. At the significance level I would retain the simpler linear-exposure model: it already fits adequately and the extra curvature is not clearly established. The quadratic fit does improve the likelihood somewhat; its Akaike information criterion is about smaller, since . Thus different reasonable selection criteria may weakly prefer different models, but these data do not give strong evidence that the additional term is necessary.
Past exam of the mathematics course of the University of Cambridge 2010 ii Paper 4 5J Solution Created 2026-09-24 Updated 2026-10-14
Write and fit the normal linear modelThe basic linear regression analysis assumes centered independent normal random variables of a common variance , conditional on the predictors. Independence between makes does not by itself establish independence between different models of the same make; that stronger assumption should be checked, or within-make dependence modelled. The requested R fit is
fit <- lm(log(price) ~ mpg + psngr + length + width + weight, data = cars)The estimate column contains the ordinary least squares coefficients. The standard error estimates the standard deviation of each coefficient estimator. The t value is its estimate divided by its standard error. The last column gives the two-sided p-value for a zero coefficient, using a Student t-distribution with residual degrees of freedom under the stated normal linear model; the stars summarize significance thresholds.
Conditional on the other predictors, passenger capacity and width have negative fitted coefficients, while length and weight have positive ones. All four are significant at the conventional 5% level; length is borderline. There is little evidence for an additional mpg effect once the others are included. These are conditional associations, not causal claims. For example, increasing weight by 100 pounds multiplies the fitted price by approximately , about 1.087.
A reasonable candidate simplification removes mpg and compares the nested models by an F-test, rather than treating a nonsignificant coefficient as proof of no effect:
fit2 <- update(fit, . ~ . - mpg)
anova(fit2, fit)Inspect regression residuals, normal quantiles, residual-versus-fitted plots, leverage and influential observations. The correlated size predictors may produce multicollinearity; missing make effects, nonlinear terms or unequal residual variances may also matter. A random make effect or a covariance adjustment addresses the possible dependence noted above.

