Past exam of the mathematical and Computational Biology course of the University of Cambridge 2025 Paper 1 7 c Solution by
Codex 0 2026-10-20
Combining the first two parts gives the centroid sum-of-squares identityThe added term is nonnegative and, since , vanishes exactly at . Thus the unique minimizing centroid in this step of K-means clustering isAn empty cluster needs a separate algorithmic convention because its sample mean is undefined and its objective is identically zero.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2025 Paper 1 7 b Solution by
Codex 0 2026-10-20
The centred observations sum to zero:By linearity of the inner product,This cancellation holds for every .
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2025 Paper 1 7 a Solution by
Codex 0 2026-10-20
Write and suppose the cluster is nonempty. Expanding the Euclidean norm through its inner product givesSum over . The final term does not depend on , so its sum is , which proves the requested identity. This expansion is the starting point for the centroid sum-of-squares identity.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2025 Paper 1 6 g Solution by
Codex 0 2026-10-20
Direct independent sampling is preferable. The posterior distribution is the standard beta distribution , for which exact posterior moments and standard random-number generators are available. For example, draw independent and with the same rate, and return . This has the required beta distribution and avoids Markov chain Monte Carlo convergence problems. A correct, converged MCMC method could sample this target, but it is unnecessarily complicated here.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2025 Paper 1 6 f Solution by
Codex 0 2026-10-20
The trace has long, slowly changing stretches, indicating strong autocorrelation and poor exploration of the posterior distribution. The reported effective sample size of a Markov chain is only , so the number of stored draws greatly exaggerates the information in the simulation. The potential scale reduction factor is appreciably above one and does not support convergence between chains. The reported Monte Carlo standard error is also large relative to a posterior mean near .
The exact beta distribution gives posterior mean and standard deviationso the simulation's reported spread is another warning. Do not interpret its mean or interval estimates as reliable yet. Run multiple chains from dispersed starts, improve and tune the proposal or sampler, and use longer runs after adaptation. Recheck the traces, potential scale reduction factor, and effective sample size of a Markov chain. More iterations help only if the chain actually explores its target well; thinning alone does not fix poor mixing.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2025 Paper 1 6 e Solution by
Codex 0 2026-10-20
The two colonies with no observed cheaters are right-censored after seven days. Each contributes , not the probability of an event on day seven or eight. The four observed first events contribute four factors of and failures. Including the two censored exposures givesThe beta distribution prior therefore yieldsIts probability density function is proportional to for : it vanishes at both endpoints, is unimodal, and has its mode at . The right panel of the sketch in question 5(b) shows this moderately right-skewed density. The calculation assumes daily observations detect the first event and that stopping the experiment after seven days is independent censoring.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2025 Paper 1 6 d Solution by
Codex 0 2026-10-20
For fixed prior parameters, divide numerator and denominator by :under independent sampling from a geometric distribution with true success probability . The law of large numbers gives . In a large finite sample the posterior mean is close to , the maximum-likelihood estimate. The fixed prior's influence vanishes, and the estimate is consistent.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2025 Paper 1 6 c Solution by
Codex 0 2026-10-20
Using the expected value of a beta distribution, the posterior mean isEquivalently, it is the weighted averageof the prior mean and the maximum-likelihood estimate .
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2025 Paper 1 6 b Solution by
Codex 0 2026-10-20
The beta distribution prior density is proportional to . By Bayes' theorem, its product with the likelihood function gives the posterior densityThis is again a beta distribution, namelyThus the beta family is a conjugate prior family for the geometric distribution. The update is an instance of beta-geometric conjugacy: counts of observed successes and failures are added to the two beta parameters.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2025 Paper 1 6 a Solution by
Codex 0 2026-10-20
For independent geometric random variables supported on , put . Multiplication of their probability mass functions gives the likelihood functionThere are terminal successes and preceding failures.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2025 Paper 1 5 g Solution by
Codex 0 2026-10-20
Suppose and set . Substitution of the positive equilibrium into the Jacobian matrix givesPart (b) showed whenever . In particular,gives , whereasgives . The latter already violates the Jury stability criterion condition . More directly, the product of the two eigenvalues is greater than one, so at least one has modulus greater than one. Therefore the positive equilibrium is unstable. This is the instability of the Nicholson-Bailey equilibrium; parasitoid feedback in this simple model does not stabilize coexistence.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2025 Paper 1 5 f Solution by
Codex 0 2026-10-20
The Jacobian matrix of the update map isIts eigenvalues are and zero. The extinction equilibrium is locally asymptotically stable for and unstable for , by linear stability analysis for a discrete dynamical system. In the latter case, even a small perturbation along grows as .
At , an eigenvalue equals one, so the strict linear criterion does not decide stability. Directly, and . Starting sufficiently close to extinction therefore keeps both coordinates close for all time, proving Lyapunov stability in the nonnegative state space. It is not asymptotically stable, since every nearby is another equilibrium. This distinction makes the statement “stable when fails” precise.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2025 Paper 1 5 e Solution by
Codex 0 2026-10-20
Since , the coexistence value is positive exactly when . Under that condition, as well. Therefore the required condition isFor , the formal nonzero candidate has negative parasitoid density and is not biologically admissible; gives only the host-only line of equilibria.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2025 Paper 1 5 d Solution by
Codex 0 2026-10-20
At an equilibrium, and . Taking forces , giving extinction. If , the first equation gives and henceThese are the only isolated candidates obtained from the equations. There is an exceptional parameter case: at , and every is an equilibrium. Thus the assertion of exactly two equilibria needs , and only the positive candidate belongs to the biological state space when .
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2025 Paper 1 5 c Solution by
Codex 0 2026-10-20
This is the Nicholson-Bailey model for a host-parasitoid interaction with discrete generations. The factor is the host multiplication factor in the absence of parasitism; measures effective attack or searching intensity per parasitoid; and is the number of next-generation parasitoids produced per attacked host, with any survival or unit conversion absorbed into it.
If the number of attacks on a host has a Poisson distribution with expected value , then the probability of no attack is . Consequently is the surviving, unparasitized host fraction, and is the attacked fraction. The two update equations count host descendants from surviving hosts and parasitoid descendants from attacked hosts, respectively.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2025 Paper 1 5 b Solution by
Codex 0 2026-10-20
The function is strictly concave on . Its derivative is positive for , zero at , and negative for . Thus it rises from the limiting value as , touches the horizontal axis at its unique maximum , and then decreases to . It never crosses above the axis. The left endpoint is not included, and the slope tends to there.
The left panel shows the required sketch; the right panel is used for question 6(e).
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2025 Paper 1 5 a Solution by
Codex 0 2026-10-20
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2025 Paper 1 4 g Solution by
Codex 0 2026-10-20
The Poisson generalized linear mixed model assumes conditionally Poisson distributed counts with a log link. The fitted variance components are both zero, so this fit lies on a boundary and reduces to ordinary Poisson regression. It estimatesThus the fitted annual increase is about 6.6%, with approximate 95% confidence interval for the rate ratio . The age evidence is much weaker than in the Gaussian fit: the quoted p-value is . Zero estimated group variances do not prove that real bird and year differences are absent.
The Poisson distribution forces conditional variance to equal the conditional expected value. Here fitted means are around two to three hatchlings, whereas the Gaussian model estimated a residual variance of only . This suggests checking underdispersion and the bounded nature of hatching counts, rather than assuming a Poisson response solves the diagnostic problems. Inspect simulated count residuals and predictive distributions; if the number of eggs is observed, fit a binomial mixed model and check that model's dispersion too.
The displayed Gaussian and Poisson Akaike information criterion values should not simply be ranked as if they used the same likelihood convention: one evaluates a continuous density and the other a probability mass. Compare properly specified count models on the same observed response scale, with compatible likelihoods and predictive checks. A boundary fit, doubtful dispersion assumptions, and possible nonlinear age effects all warrant further work before a strong biological conclusion.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2025 Paper 1 4 f Solution by
Codex 0 2026-10-20
The regression diagnostics raise concerns about the mean and variance assumptions. The residual-versus-fitted smoother is curved rather than horizontal, and the scale-location plot suggests changing residual spread, contrary to homoscedasticity. Diagonal bands are expected when an integer-valued response is fitted by a continuous model, since each fixed response value gives . They are not, by themselves, proof of a failed mean model. The residual Q-Q plot is broadly linear but has tail departures and unusual observations, so exact normality is questionable.
The Cook's distance plot identifies observations worth checking for recording errors and influence on the age estimate. A rough screening threshold flags several points, but it is not an automatic deletion rule. Repeat the fit with and without influential observations as a sensitivity analysis and report material changes.
The bird random intercept Q-Q plot has a pronounced upper-tail departure; the year plot is closer to a line, although eleven groups give little power to assess normality. These plotted effects are estimated, shrunken conditional mode of Gaussian random effects, not independent observed draws from the latent normal distribution, so their appearance requires care.
The analysis is therefore provisional. Check a nonlinear age effect, the changing residual variance, dependence beyond the fitted random intercepts, and a response model appropriate for counts. If clutch size is known, a binomial distribution model for hatched eggs out of available eggs may be more meaningful. A bootstrap from the existing Gaussian model cannot validate the assumptions questioned by these plots. Distinguishing within-bird ageing from between-bird differences would also strengthen interpretation.
Past exam of the mathematical and Computational Biology course of the University of Cambridge 2025 Paper 1 4 e Solution by
Codex 0 2026-10-20
“After accounting for bird identity and year using random intercepts, hatching success increased by an estimated 0.123 hatchlings per additional year of age (95% bootstrap confidence interval 0.057–0.194).”
This describes an observational association under the fitted Gaussian linear mixed model, rather than a causal age effect. The diagnostic assessment below is needed before treating this inferential statement as reliable.
There are unlisted articles, also show them or only show them.
