Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 206 1 d Solution Created 2026-10-03 Updated 2026-10-06
In the larger normal linear model, add laboratory intercept offsets to the mean in part (a). The nested-model F-test comparesThe smaller and larger models fit four and six mean coefficients respectively. Under , independent Gaussian errors with common variance give independent quantities and . Thus the test statistic isThe p-value is the upper-tail probability . At the conventional 5% significance level, do not reject the common-intercept restriction. Prefer the simpler model
tumour1 on this comparison. This does not prove the intercepts coincide, nor address the curvature identified in part (b); the exact F-test calibration assumes the underlying error and mean assumptions. The one-decimal RSS values give when subtracted, whereas the table's difference uses unrounded values. Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 206 2 c Solution Created 2026-10-03 Updated 2026-10-06
Let be sunny days and latitude. The R linear-model formula expands to a normal linear model with both main effects and their interaction term:The fitted conditional mean isThe residual standard error is , giving the usual variance estimate , and .
The estimated interaction term is tiny relative to its standard error: and the two-sided p-value is . A sensible initial simplification is to remove the interaction and refit an additive linear model,
lm(energy ~ sunny + latitude). Both main effects are significant in the supplied fit, and should initially be retained. Do not simply copy their old coefficient estimates into the new fit: removing a design column generally changes all estimates. Centering predictors makes intercepts and main-effect interpretations more useful, but does not change the fitted surface. The Box–Cox transformation in part (d) suggests a further response-scale improvement; after changing the response scale, reassess the interaction and diagnostics. Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 206 2 e Solution Created 2026-10-03 Updated 2026-10-06
Check that the chosen mean structure adequately describes the transformed response. Examine the residual-versus-fitted plot and residuals versus each predictor: systematic curvature suggests omitted nonlinear effects or an interaction term. Plot residual spread against fitted values, for example using a scale-location plot, to assess homoscedasticity. Compare standardized residuals with a normal distribution using a quantile-quantile plot, especially for finite-sample Student's t-distribution and F-test inference.
Also check independence using the sampling design and residuals versus time, collection site, or other groups; spatially related photovoltaic systems may have correlated errors that are invisible in a residual-versus-fitted plot. Investigate large standardized regression residuals, high regression leverage, and influential observations using Cook's distance. Check that the design matrix has full rank and that severe multicollinearity is not making estimates unstable. Reassess whether the response transformation and retained predictors improve these diagnostics and prediction; a coefficient p-value alone cannot establish model adequacy. If observations are independent only conditional on site effects, use an appropriate dependence model rather than treating correlated systems as independent replicates.
Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 206 4 c Solution Created 2026-10-03 Updated 2026-10-06
This is a sequential analysis of deviance for nested generalized linear models. Adding age to the intercept-only logistic regression reduces deviance by , with approximate p-value . Adding frailty to the age model reduces it by another , with p-value . Thus both variables have evidence of association with surgical success, under the model assumptions, and neither should be dropped solely on these results.
The second test assesses frailty adjusted for age, whereas the first assesses age before frailty is included. Sequential tests depend on term order. Evidence for age adjusted for frailty is additionally provided by its full-model Wald test, . Both fitted coefficients are negative: age and frailty are associated with lower fitted success probabilities. On the odds scale, one extra year at fixed frailty multiplies the odds by , and frailty at fixed age multiplies them by . These are odds ratios, not risk ratios, and an observational statistical association does not by itself establish a causal effect.
Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 206 6 c Solution Created 2026-10-03 Updated 2026-10-06
The restricted maximum likelihood procedure estimates covariance parameters from error contrasts that remove the unknown fixed effects. Let have rank and choose an full-rank matrix with . Then has a likelihood involving the variance parameters but not . Maximizing that likelihood is restricted maximum likelihood. An equivalent restricted likelihood from orthogonal error contrasts, up to terms independent of , iswhereAfter estimating , use generalized least squares for and the conditional modes from part (b). In an independent-error normal linear model, this covariance procedure reduces to estimating by instead of .
The two models being compared have different fixed-effect spaces, so their error contrasts, dimensions, and restricted likelihoods differ. Their REML values are not likelihoods of the same transformed data and must not be used directly for this fixed-effect likelihood-ratio test. Refit both with ordinary maximum likelihood, integrating out the random effects but retaining the original response vector, and maximize each model's marginal likelihood.
The null hypothesis is , leaving the random slope variance free; the alternative permits a nonzero population stirring effect. The supplied test has , one extra fixed coefficient, and approximate p-value . Retain the fixed stirring-rate effect at 5%. A mean-zero random slope cannot substitute for an estimated nonzero population slope. The asymptotic calibration assumes regular nuisance covariance parameters and should be interpreted cautiously with only three furnaces; simulation can provide a better finite-sample calibration.
Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 206 6 d Solution Created 2026-10-03 Updated 2026-10-06
The comparison removes the random slope and tests against , while retaining the same fixed intercept and slope. A variance cannot be negative, so zero is a boundary point of the parameter space. The regular Wilks theorem assumptions behind an ordinary likelihood-ratio test fail. Consequently the default chi-squared p-value from
anova is not reliably calibrated for this variance-component likelihood-ratio test at a boundary. This is different from the fixed-slope test in part (c). The reference to strength_model1 means the earlier object strength_model; no separate model 1 object was defined.A useful alternative is a parametric bootstrap. Fit the null random-intercept model, then simulate data on the actual predictor values and furnace grouping by generating null intercept effects and observation errors from its fitted Gaussian distribution. Refit null and alternative models to each simulated dataset using the same likelihood method and compute the same likelihood-ratio statistic. If is the observed statistic, estimate its upper-tail probability byThis incorporates the zero-variance boundary and the actual small group count. It is a fitted-null simulation approximation because nuisance parameters are estimated, not a universally exact test. Since both models have the same fixed-effect space, a similarly calibrated restricted-likelihood statistic is also possible. Under suitable asymptotics for a single identifiable added variance component the familiar limiting law is , but using the bootstrap avoids relying on that approximation with only three groups. There is no supplied statistic or calibrated bootstrap result here from which to decide whether the slope variance is required.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 205 3 Solution Created 2026-10-03 Updated 2026-10-05
Let denote the number of rejected null hypotheses and the number of rejected true null hypotheses. The familywise error rate is , whereas the false discovery rate is , with a zero contribution when . A valid true-null p-value satisfies for .
For the closed testing procedure, choose a level- local test of every nonempty intersection . Reject only if every intersection containing it is rejected by its local test. If any true null hypothesis is rejected, the local test of must reject. Since that intersection is true, its rejection probability is at most . If is empty there can be no false rejection. This proves strong closed-testing control of the familywise error rate, under arbitrary dependence, provided each local test is valid under its whole intersection null.
For the Benjamini-Hochberg procedure, order the p-values and setwith maximum zero if the set is empty; reject the first hypotheses. To prove its false discovery rate bound, fix a true-null index . Replace by zero and let be the modified rejection count. This is a function of the other p-values and satisfies .
The Benjamini-Hochberg leave-one-out identity isHere is its deterministic justification. If was rejected, lowering its value cannot decrease , and leaves all ordered values of ranks greater than unchanged. No such rank can newly satisfy its threshold, so . Conversely, if and , at least other values and are at most this threshold. Therefore the original procedure has . Monotonicity under decreasing also gives , so and is rejected. This establishes the identity; harmless deterministic tie-breaking also covers the artificial zero introduced in the modified data.
The assumed independence makes independent of . Conditional on , validity of the p-value impliesSum over to obtainIf true-null p-values are exactly uniform rather than merely valid, the first inequality is equality. No restriction on dependence among the false-null p-values is needed beyond their joint independence from the true-null values.
For the requested Simes inequality, apply this result to the true-null p-values alone, for . Every rejection is now false, so and the false discovery rate is the probability of any rejection. The event of at least one Benjamini-Hochberg procedure rejection is exactlyIts probability is at most . This holds for ; with no true nulls the written minimum and division by are undefined and the error-control statement is instead vacuous.
The final step-up rule is the Hochberg procedure. Use Simes tests as the local tests for a closed testing procedure: reject when . Under any true intersection all its p-values are valid and independent, so the Simes inequality proves level for its local test. The implication supplied in the question says that whenever the Hochberg procedure rejects , every intersection containing passes its local Simes test. Thus every such rejection is also a closed-testing rejection. ConsequentlyThe true-null independence assumption is essential to this particular proof of local-test validity; the arbitrary-dependence guarantee of closed testing does not create valid local tests automatically.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 206 2 b Solution Created 2026-10-03 Updated 2026-10-05
There are observations, since the intercept-only model has residual degrees of freedom. Adding price introduces one coefficient and decreases the binomial deviance by . Adding a three-level factor introduces two coefficients and decreases it by . Thus the missing entries areThe likelihood-ratio test comparing the smaller and full logistic regression tests against at least one nonzero layout contrast. Its statistic is . Under ordinary interior-parameter, full-rank and finite-estimate regularity conditions, Wilks theorem gives an asymptotic chi-squared distribution with two degrees of freedom. The reported p-value exceeds , so at that level retain the simpler price-only model.
The table is an analysis of deviance for nested generalized linear models: price is entered before layout. Thus its price row tests the price-only model against an intercept, whereas the layout row tests layout after allowing for price. The latter is the relevant comparison of model1 and model2. Failing to reject a layout effect is not proof that layouts have identical effects; it means these data do not justify the extra two parameters under this test.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 206 4 b Solution Created 2026-10-03 Updated 2026-10-05
Let have columns , and let have one column per incubator, with entry in the column for observation 's incubator and zeros elsewhere. Integrating the Gaussian random effects givesConsequently its marginal log-likelihood isThe likelihood-ratio test of against usesFor each covariance, the optimizing coefficients are the generalized least squares estimator . Both fits should use the same marginal likelihood convention, for example fitting the alternative with
update(fly.model, REML=FALSE) and the null as a Gaussian linear model. The displayed alternative REML criterion alone cannot supply .The variance component is constrained to be nonnegative, and zero lies on the boundary. Thus the interior-parameter hypothesis of Wilks theorem fails; the usual approximation is inappropriate. A limit sometimes applies to a single variance component under additional asymptotic conditions, but four incubators do not give a persuasive large-number-of-groups approximation.
Use a parametric bootstrap under the null: estimate there; simulate independent Gaussian errors with that fitted variance at exactly the observed times and grouping labels; refit both models by maximum likelihood for each simulated sample; and calculate . The upper-tail proportion, conventionally , estimates the p-value. Boundary fits with estimated must remain in the simulation distribution. A restricted-likelihood ratio and a correspondingly calibrated bootstrap are another option when the fixed-effect design is identical, but one must not mix ordinary and restricted likelihoods in a single statistic.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 207 1 c Solution Created 2026-10-03 Updated 2026-10-05
Under the null hypothesis of consistency, has approximately zero expectation and variance , since the displayed trials are independent. Thus a two-sided Wald test usesThe observed difference is , and . Its two-sided p-value is approximately , so there is no detectable discrepancy here. Failure to reject is not proof of consistency: this test has limited statistical power, and transitivity in network meta-analysis also needs substantive assessment. If evidence sources overlap, replace by .
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 207 2 a iii Solution Created 2026-10-03 Updated 2026-10-05
The Bonferroni correction compares every p-value with . Only the first two displayed values lie below that threshold; all undisplayed values are at least the tenth displayed value. HenceFor the Benjamini-Hochberg procedure at false discovery rate level , the rank- threshold is . The first nine displayed ranks meet their thresholds, while rank ten does not: . Consequently nine is the intended count if every later rank also fails its threshold. The rule is a step-up rule, however:It does not stop at the first failed comparison. The full rejection count is therefore not determined by ten order statistics. For example, completing the list with values equal to gives , whereas completing it with values equal to gives , since . Both completions respect the printed ten smallest p-values. Thus at least nine are rejected; exactly nine requires an extra assumption about the undisplayed ranks. In the second completion even the tenth marker is rejected, despite failing its own rank threshold. The false discovery rate guarantee also requires the usual validity and independence or appropriate positive-dependence assumptions, unlike the arbitrary-dependence Bonferroni correction.