Past exam of the mathematics course of the University of Cambridge 2001 iii Paper 29 4 v Solution Created 2026-10-03 Updated 2026-10-14
Use a hierarchical Bayesian model with binomial observation errors and a common distribution for the underlying risks:Give a shared hyperprior, or parameterize them by mean and concentration and put priors on and . Conditional on these hyperparameters, the risks are independent and identically distributed; after integrating them out they are exchangeable random variables with shared uncertainty. The data estimate the overall risk level and between-hospital variation. Conditional Beta-binomial conjugacy givesand full Bayes point estimates under squared-error loss areAn Empirical Bayes method instead estimates the hyperparameters from the marginal beta-binomial distribution likelihoodand inserts their fitted values in the conditional posterior means. Both approaches provide partial pooling, stronger for smaller hospitals. Full Bayes also propagates hyperparameter uncertainty into the credible intervals. If systematic covariates are needed, one can place exchangeable residual effects in a logistic regression model rather than assuming a common unconditional risk distribution.
Past exam of the mathematics course of the University of Cambridge 2003 iii Paper 38 3 b Solution Created 2026-10-03 Updated 2026-10-14
The first fit is a Bernoulli logistic-regression model for the probability of a positive response. Its fitted linear predictor isand its fitted probability is . There are eight coefficients. The null degrees of freedom identify , and the residual degrees of freedom are .
Each slope is a change in the log odds per unit of its covariate, holding the others fixed. Exponentiating gives conditional odds ratios; for example a ten-unit glucose increase multiplies fitted odds by , and a ten-year age increase by . These are changes in odds, not multiplicative changes in probability, and the observational associations are not automatically causal effects. The intercept corresponds to all numerical covariates being zero, generally an extrapolation beyond meaningful subjects.
The standard errors come from the inverse Fisher information matrix of the logistic regression. With binomial dispersion parameter fixed at one, the displayed t ratios are asymptotic normal Wald statistics. In the full fit, glucose and the pedigree measure have clear individual evidence of nonzero slopes, with two-sided and . The body-mass and age terms are borderline, with and ; pregnancy count is weaker, . Blood pressure and skinfold have little individual evidence after adjustment. These labels should not be converted into a claim that the weaker predictors have no effect, or used as automatic model-selection rules.
A deviance residual here isIts square is the observation's contribution to binomial deviance, so the squared residuals sum to the printed residual deviance. The five-number summaries describe the distribution of these signed residuals. The null deviance belongs to an intercept-only logistic regression; the full fitted deviance is . Four Fisher scoring iterations record convergence of the numerical likelihood fit.
The second model uses only glucose:Its two coefficients leave residual degrees of freedom. A ten-unit glucose increase multiplies its fitted odds by . This differs from the adjusted multiplier , because the models condition on different covariates; both adjustment and noncollapsibility of the odds ratio can change logistic coefficients. The glucose-only model has deviance , so its maximized log-likelihood is lower than the full model's.
For these fixed-dimensional nested models, analysis of deviance and Wilks theorem giveThus the additional six predictors collectively improve the glucose-only model, even though several individual Wald tests are not significant. These comparisons assume independent subjects, an appropriate logistic mean structure, full rank, and regular finite parameter estimates without separation.
It would be incorrect to infer that absolute fit is good merely because . Individual Bernoulli deviance need not have a chi-squared calibration: there is just one binary observation per saturated probability, and the saturated dimension increases with sample size. A simple counterexample is an intercept-only model with true probability , for which , not one. For absolute adequacy, inspect residual patterns and predicted-risk calibration, use meaningful grouped comparisons when appropriate, or calibrate a chosen fit statistic by parametric bootstrap. The regular nested-model tests above are not subject to that saturated-model dimensionality problem. Only the displayed summaries and a few example rows are supplied, so patient-level diagnostics or complete numerical refitting cannot be reconstructed from this page alone.
Past exam of the mathematics course of the University of Cambridge 2003 iii Paper 38 5 ii a Solution Created 2026-10-03 Updated 2026-10-14
For a population question use a population-averaged logistic model for repeated binary outcomes. Code for the new treatment and for the control, with visit times months for . Let , , andDifferent subjects are independent. Each response has a Bernoulli distribution with this marginal mean, but no independence of a subject's three responses is assumed. The linear time effect and absence of treatment-by-time interaction are substantive mean assumptions; if inappropriate they can be replaced by time indicators and interaction terms.
For complete data, set , , and , where has rows . A working exchangeable correlation matrix has unit diagonal and off-diagonal value ; set . The generalized estimating equation isWith correct means and independent subjects, a positive-definite working covariance matrix and regularity give consistency even if the working correlation is wrong. Write and . The fitted subject-level sandwich covariance matrix isevaluated at the estimates. This inference is asymptotic in the number of independent subjects, not the number of visits.
For the actual incomplete data, define if visit is observed, with and monotone dropout. Let contain treatment, baseline covariates and responses observed before visit . Under sequential missing at random, specifyThe assumption is that the retention decision, conditional on this history, does not additionally depend on unseen current or future outcomes. Fit the , for example by visit-specific logistic regressions. A simple valid choice uses working independence and the inverse-observation-weighted estimating equations for longitudinal dropout:Terms with are zero and require no missing response. Given the full response vector, sequential missing at random makes . Consequently the weighted score has the same expectation as the complete-data score, proving its mean-zero property. Correct retention probabilities, positivity and a correctly specified marginal mean are required. Use cluster-robust uncertainty, accounting for fitted retention-model coefficients, or resample entire subjects and refit both models. Under missing completely at random, the simpler unweighted observed-response GEE can suffice; ordinary unweighted GEE is not valid under arbitrary history-dependent missing at random.
The treatment coefficient gives a population conditional-on-baseline odds ratio at each visit. To communicate an absolute population treatment benefit, standardize predicted probabilities over the full baseline population, rather than only completers:A causal reading additionally uses the randomized controlled trial assignment, consistency of the treatment definition, no interference and the dropout assumptions; the statistical model alone does not supply those conditions.
Past exam of the mathematics course of the University of Cambridge 2003 iii Paper 38 5 ii b Solution Created 2026-10-03 Updated 2026-10-14
For conditional individual response profiles use a logistic random-intercept model for repeated binary outcomes. Introduce a subject effect independently across subjects and independently of treatment and baseline covariates, under the specified model. Conditional on , assume the three responses are independent Bernoulli random variables withHere is persistent unmeasured subject heterogeneity and its variance. It induces dependence after integration: for distinct visits, the response covariance is , generally positive. This is a complete joint generalized linear mixed model, unlike a mean-only GEE specification.
Under missing at random conditional on the observed responses and baseline variables, with distinct parameters for missingness and outcomes, the missingness model is ignorable for likelihood inference. Let . The outcome observed-data likelihood isThe omitted Bernoulli factors sum to one over missing outcomes. Fit the fixed coefficients and by maximizing this integrated likelihood, with suitable quadrature or another justified integration method. If , use the limiting point-mass model. Correct response and random-effect distributions, identifiable coefficients and regularity are needed; the latent distribution assumption is not merely a convenient working covariance.
For patient , combine the fitted model with the posterior density of proportional to its normal density times that patient's observed Bernoulli factors. Integrating over this posterior gives a patient-specific predicted response profile. The treatment odds ratio for a fixed and the same baseline variables is . This conditional contrast does not by itself identify each person's unobserved causal treatment effect: a parallel-arm trial observes only one treatment per person. Random slopes or heterogeneous treatment effects require further modelling and sufficient information; they are not implied by fitting a random intercept.
Past exam of the mathematics course of the University of Cambridge 2003 iii Paper 38 5 i Solution Created 2026-10-03 Updated 2026-10-14
The independence analysis is not justified without further assumptions. Three binary responses from the same subject generally remain correlated after conditioning on baseline covariates and treatment. The fitted independent-Bernoulli likelihood discards that correlation and gives incorrect model-based standard errors and tests if it is present. Positive within-subject correlation commonly makes those errors too small.
There is an important distinction between estimating the mean and estimating uncertainty. If the stated marginal logistic regression is correct and responses are fully observed, the independence score still has zero expectation. With independent subjects and regularity, its root can consistently estimate marginal coefficients despite within-subject dependence; a subject-level sandwich covariance matrix is then needed. True independence is a special case in which the original standard errors would be appropriate.
Dropout creates a separate issue. Restricting that score to observed responses need not preserve its zero expectation if observation depends on the response history or unseen depression outcomes. Therefore both point estimates and uncertainty may be wrong. Neither random treatment assignment nor baseline adjustment alone establishes an ignorable missingness mechanism. We need a model matched to the scientific estimand and explicit assumptions about missing data.
Past exam of the mathematics course of the University of Cambridge 2003 iii Paper 40 4 a Solution Created 2026-10-03 Updated 2026-10-14
Use individual stratified randomization within each prison, with concealed centrally generated permuted-block randomization and varying block sizes. Prison can affect both baseline risk and intervention delivery, so balancing assignments within prison protects against imbalance in that important covariate. Varying block sizes and allocation concealment prevent staff from predicting the next allocation and selecting participants accordingly. Prespecify how incomplete final blocks are treated. To enforce the overall 4000:4000 allocation exactly, coordinate the stratum totals centrally, allocating odd final places through a concealed random rule; exact half allocation within every prison is impossible if some prison totals are odd.
Individual randomization stratified by prison is preferable to randomizing only twenty whole prisons for this design. A cluster-randomized trial would have few independent units and could lose substantial precision through intraclass correlation. Sharing or selling the intervention can cause treatment contamination, so record it and retain an intention-to-treat analysis; substantial spillover might justify a separately powered cluster design rather than being ignored.
Past exam of the mathematics course of the University of Cambridge 2004 iii Paper 37 5 ii a Solution Created 2026-10-03 Updated 2026-10-14
The permitted transitions form the following diagram. Each arrow is labelled by its fitted transition intensity in units of inverse years; the absence of an arrow is a structural restriction, not an estimated small effect.
State 1 can move directly to 2, 3 or 5; state 2 can move to 4 or 5; state 3 can move to 4 or 5; and state 4 can move only to 5. There are no recovery transitions, and state 5 is an absorbing state. The rates of leaving the four living states are the sums of their outgoing arrows:The diagonal generator entries are their negatives, so every row of sums to zero. These diagonal entries are not arrows or negative event rates. For example the direct rate is per year, while death after reaching another state can occur at a much larger rate. The printed fit has no covariates on the intensities, so it estimates one pooled rate system and contains no treatment-effect comparison, despite the trial's treatment randomization. The reported describes the fitted likelihood level; by itself it is not a goodness-of-fit test without a reference or competing model.
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 2006 iii Paper 44 1 c Solution Created 2026-10-03 Updated 2026-10-14
A cross-sectional age association need not equal within-person growth. The following alternatives each suggest a concrete extension of the study.
- Birth-cohort differences. Older participants were born in a different period. Persistent differences established early in life could produce a positive age slope even if every person's adult ear length were constant. Repeat measurements in a longitudinal study of several birth cohorts, separating within-person changes from differences in their initial measurements. Calendar age, birth year and observation year are algebraically related, so all three unrestricted linear effects cannot be identified without additional assumptions.
- Confounding by sex, body size or ancestry. Suppose a characteristic is associated both with ear length and with age among the sampled patients. Omitting it then changes the apparent age slope. Measure these characteristics, examine their distributions across ages, and fit a multiple linear regression or compare age slopes within appropriately defined groups. A guessed overall sex proportion supplies none of the required age-by-sex information.
- Selection bias from attendance or consent. Consulting patients and people willing to be measured may differ from the general population. For example, attendance could select different combinations of age and body characteristics. Sample from a population register, recruit people regardless of consultation, record refusals and compare age-specific recruitment patterns; compare the resulting slope with the practice-based slope.
- Survivorship bias. Ear length or a correlated characteristic might be associated with survival. Then people with larger ears could be overrepresented among older survivors even without growth. Follow a population cohort, measure ears before subsequent deaths or dropout, and investigate whether survival or retention depends on initial ear length after accounting for age and other covariates. This tests the proposed selection mechanism rather than assuming it.
- Age-related measurement error. Different practitioners may see different age mixes and have different measurement offsets; observers might also measure older ears differently. Use one protocol, calibrate instruments, randomly allocate observers where possible, conceal previous readings, obtain duplicate independent measurements and record observer identity. Analyze observer effects and the repeat-measurement differences before interpreting an age slope biologically.
These explanations are hypotheses to be checked, not established facts about the participants. Neither a small p-value nor an approximately linear scatter plot excludes them.
Past exam of the mathematics course of the University of Cambridge 2006 iii Paper 44 5 Solution Created 2026-10-14 Updated 2026-10-20
Use the usual semiparametric Cox proportional-hazards model with observed covariates :The covariates are implicit in the question's regression fit, even though the displayed data notation only lists exit times and event indicators. Assume entry at a common origin, time-constant covariates, distinct observed times and independent censoring. Write and . Conditional on a single event at in its risk set, the chance that individual supplies it isThe baseline hazard cancels. Consequently estimate by maximizing Cox partial likelihoodFor example, the score and information of Cox partial likelihood follow by differentiation. Define , and . ThenWhen a finite identifiable maximum exists, iterate until convergence. The observed Fisher information also gives the usual asymptotic coefficient uncertainty. Censored subjects enter the relevant risk sets, even though they supply no numerator event factor.
After fitting , estimate the cumulative hazard of the reference subject by the Breslow estimatorIts jump at an event is the observed event count divided by the total fitted hazard multiplier at risk. The estimate is an integrated baseline hazard, with hazard represented by a measure placing these jumps at observed event times. If a smooth ordinary hazard function is wanted, smooth these increments with a chosen kernel and bandwidth; differentiating the step function as an ordinary function would incorrectly give zero away from the jumps. The fitted individual cumulative hazard is over that individual's follow-up. The invariances below concern this Cox partial likelihood fit and this Breslow estimator; they need not hold for a fully parametric proportional-hazards fit or an arbitrarily smoothed hazard estimator.
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 2007 iii Paper 43 2 Solution Created 2026-10-03 Updated 2026-10-14
For an exponential dispersion family, differentiating the normalization integral with respect to gives an expected score of zero. The score is , hence . Differentiating again, the expected squared score is ; it is also . ThusThe canonical link function sets the linear predictor equal to the natural parameter: . The variance function is , so ; the dispersion parameter is separated from the mean-dependent factor.
The saturated statistical model has a separate mean for each response and fits , with boundary parameters interpreted by limits. At the same fixed dispersion, its log likelihood and the fitted model's log-likelihood define the scaled devianceThe unscaled deviance isKeeping dispersion fixed in this definition is essential; it is not a comparison with a separately estimated zero variance in a Gaussian saturated fit.
For the normal distribution, expanding its density exponent givesConsequentlyHere and the canonical link is the identity, so . The saturated natural parameter is . Substitution into the deviance formula yields
For the cholesterol fits, all formulae include an intercept. Model 1 has age and BMI with three coefficients; models 2 and 3 have one of these covariates with two coefficients; model 4 has only the intercept. Their residual statistical degrees of freedom are respectively . Their reported deviances are residual sums of squares, because these are Gaussian linear models.
The relevant hypothesis is in the full model, against , with age already present. Thus compare model 2 with model 1 using the partial F-test. Its extra sum of squares is , and the common variance is estimated from model 1 by . ThereforeSince , reject at ; the two-sided coefficient-test equivalent has . BMI is associated with cholesterol after adjustment for age, under the linear Gaussian model. The RSS values alone do not identify the sign of its coefficient or the size of the association.
For comparison, the marginal BMI test would compare model 4 with model 3, giving on statistical degrees of freedom, with . This does not answer the adjusted question and makes the BMI evidence appear stronger than the conditional test. Age also contributes after BMI: comparing model 3 with model 1 gives on statistical degrees of freedom, with . Thus retaining both predictors is supported at the stated level.
A raw deviance difference must not simply be compared with the supplied cutoff: Gaussian dispersion is unknown and the differences here are unscaled. If were known, the scaled difference would have a law. Estimating it from the full fit gives the exact finite-sample comparison above, with the appropriate denominator statistical degrees of freedom.
Past exam of the mathematics course of the University of Cambridge 2007 iii Paper 43 5 a Solution Created 2026-10-03 Updated 2026-10-14
A Gaussian generalised additive model with the identity link specifiesThe are unknown smooth functions estimated from the data, rather than necessarily straight lines. The model is additive in their effects, so it does not automatically contain interactions between covariates. To identify the intercept separately from the smooths, impose a constraint such as for each . Linear terms can also be included alongside smooth terms. More generally a specified link function can make additive; for the normal identity-link model the mean itself has the displayed form. Smoothness is typically controlled through a basis and a roughness penalty, preventing an unrestricted smooth from interpolating all the noise.
Past exam of the mathematics course of the University of Cambridge 2007 iii Paper 43 5 e Solution Created 2026-10-03 Updated 2026-10-14
library(mgcv) loads the fitting package; gam fits a Gaussian generalised additive model with the printed identity link. The smooth specification s(x, bs="cr") uses a penalized cubic regression spline. This is a finite-dimensional smooth basis, rather than a full interpolating spline with a free value at all observations. The fitted model isHere in the centred cubic regression-spline basis, with its curvature penalized through . The intercept is estimated separately. In the displayed fit the smooth test space has rank , consistent with nine smooth coefficients after the centring constraint, while penalization lowers its effective dimension.The intercept estimate is , with standard error , and . Because the smooth is centred over the observations, the intercept is the overall fitted average, not necessarily the fitted response at . Its test compares this average with zero. The significance-code legend maps progressively smaller -values to stars; stars are an annotation, not an effect-size measure.
The smooth has effective degrees of freedom, displaying substantial nonlinearity: a centred purely linear term would use one.
Est.rank=9 reports the rank used for its approximate significance calculation. The -value below is very strong evidence that the mean depends on , against a zero smooth term. It does not mean the fitted curve is the exact generating function, or that lack of fit has been tested. The total effective dimension including the intercept is .The adjusted coefficient of determination of and deviance explained of indicate that nearly all variation about the response mean is explained. For this Gaussian model, deviance explained is . The scale estimate estimates residual variance, corresponding to a residual standard deviation about . The GCV score is the prediction-oriented criterion used for smoothing selection, not a probability. It is consistent with the reported scale and effective dimension: .
In the PDF's plot, the solid curve is the estimated centred smooth , and the dashed curves show pointwise uncertainty around that smooth, rather than prediction intervals for new noisy responses. The label
s(x,8.24) gives its rounded effective degrees of freedom. The rug marks the observed covariate locations. Reading the endpoints givesThe smooth is increasing with an almost flat middle and one inflection, resembling a cubic. A simpler model to investigate is ordinary Gaussian polynomial regressionIt uses four mean coefficients rather than about nine effective ones. The apparent near-odd shape also makes a plausible further reduction, but the linear and quadratic terms should be checked rather than discarded solely from the picture. The figure suggests this alternative; it does not supply coefficients or establish the true simulation model. 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 41 4 c Solution Created 2026-10-03 Updated 2026-10-14
The second analysis is an exposure-adjusted Poisson regression for case counts:Cell counts are independent, and their conditional variance equals their conditional mean. The population term is an offset with coefficient fixed at one. Thus the fitted case rate is ; treating as a free covariate would fit a different model. Age multipliers and the adjusted city rate ratio are exponentials of the corresponding regression coefficients.
The fitted model again has nine parameters and six residual degrees of freedom. Sequential additions of age and city reduce the Poisson deviance by on seven degrees of freedom and on one, respectively. The residual deviance is , close to the six residual degrees of freedom. The city likelihood-ratio test is overwhelmingly significant, as in the binomial analysis. The table provides no Poisson coefficient estimates, so an exact Poisson city rate ratio cannot be read from it.
Past exam of the mathematics course of the University of Cambridge 2008 iii Paper 41 5 a ii Solution Created 2026-10-03 Updated 2026-10-14
With right censoring, an event has not occurred by the last observation time , so the data establish only . One records and , distinguishing an observed event from a censored exit. A business still operating at the follow-up deadline is administratively right-censored. Its observed age is a lower bound on its lifetime, not its eventual closure age. Standard survival analysis requires suitable independent censoring, possibly conditional on the fitted covariates.
Past exam of the mathematics course of the University of Cambridge 2008 iii Paper 41 5 a i Solution Created 2026-10-03 Updated 2026-10-14
Survival data describe the time from a specified origin to an event, together with covariates and information about how observation begins and ends. Some event times are observed exactly; others are subject to censoring or excluded by truncation. Here the time origin is the opening of a business and the event is its closure. An observed record contains an entry age, an exit age, an event indicator and the business characteristics. The time origin and observation mechanism are part of the data specification.
Past exam of the mathematics course of the University of Cambridge 2008 iii Paper 41 5 b ii Solution 2026-10-14
Converting size to a regression factor allows two unrestricted contrasts rather than imposing a linear trend on numerical size codes. The command relevel with a numeric second argument selects the second existing factor level as its reference level. For sorted codes this is medium, coded . However, the displayed coefficient labels size1 and size3 instead correspond to codes with code as reference. The printed coding and coefficient labels are inconsistent. The actual factor levels and labels must be checked. Under the intended medium-size reference, the two reported contrasts compare small and large businesses with medium ones; with literal coding their printed names would be size0 and size2.
Using B's delayed-entry survival object, the Cox proportional-hazards model isHere is the unspecified baseline hazard for a medium-size village business and is the Cambridge indicator. The fitted hazard ratios are conditional on the other covariates and constant over business age under the proportional hazards assumption. The function fits regression coefficients through partial likelihood; its survival object must actually be B's version, rather than A's earlier object with the same name.
The location coefficient , with standard error , gives and a two-sided Wald test p-value about . Its reported hazard ratio is , with 95% confidence interval . At the same age and size, a Cambridge business therefore has an estimated closure hazard about 55.2% lower than a village business. The reciprocal ratio is . A hazard ratio is not a survival-probability ratio or a proportional increase in lifetime.
The intended small-versus-medium contrast is , with standard error , and p-value . Its hazard ratio is , with 95% confidence interval . The intended large-versus-medium contrast is , with standard error , and p-value ; its hazard ratio is , with interval . Neither size contrast provides convincing evidence of an effect. The wide intervals also show why these results do not establish equality of size-specific hazards.
The sample has businesses. The likelihood-ratio test, Wald test and score test jointly test all three coefficients being zero; their statistics are , and on three degrees of freedom, with p-values , and . None rejects at 5%. This is compatible with the significant one-coefficient location test: testing a specified one-dimensional contrast and testing three coefficients together are different questions. The location result offers some adjusted evidence, but the joint output does not demonstrate a strong overall improvement, and interpretation should acknowledge the uncertainty and the number of comparisons.
The reported is a Cox–Snell likelihood pseudo-R-squared, here . It measures likelihood improvement rather than a literal fraction of variance in lifetimes explained. Its attainable maximum is reported as . It does not validate the proportional hazards assumption or establish useful predictive performance. Adjusted survival predictions would require estimating the baseline survival function as well: . The coefficient summary alone does not supply adjusted five- or ten-year survival probabilities.
Before reporting results, check the size coding discrepancy, the precise sampling dates and the survival records. The stated January 2000–December 2005 span is six calendar years, despite being called five years. Check nonnegative ages, entry no later than exit, correctly recorded closure indicators and the same opening-based clock throughout. Establish whether inclusion and censoring are plausibly independent of lifetime given the covariates, and whether different opening cohorts or calendar environments can reasonably share the fitted lifetime model. Simply including delayed entry does not cure informative selection, omitted confounders or dependence between businesses.
Assess proportional hazards using Schoenfeld residuals against time and a proportional hazards assumption test, supplemented by groupwise log-minus-log survival plots. Investigate influential observations with coefficient-deletion diagnostics and deviance residuals, and inspect overall fit using Cox–Snell residuals. Consider a city-by-size interaction or time-varying effects if supported by the available events, rather than relying on the displayed three main effects. Finally, report the uncertainty and declining late risk sets—only six remain at the final listed event—and distinguish a conditional association from a causal explanation or a prediction for all future businesses.
Past exam of the mathematics course of the University of Cambridge 2008 iii Paper 46 3 b Solution 2026-10-14
Under independent censoring conditional on the modelled covariates, an observed event contributes , and a right-censored observation contributes . Factors from the censoring distribution may be omitted when they contain no survival-model parameters. The survival likelihood and log-likelihood are thereforeCensored individuals still contribute their observed exposure through ; they are not deleted from the analysis.

