Topics (384k) Articles (398k) Users (410) Discussions (242) Comments (383) Files (13k) New article
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 219 4 iii b Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-05
The terms involving giveCompleting the square produces the truncated normal distributionFor , its normalized density is on . The exponential prior shifts the untruncated conditional mean downwards before truncation; changing the variance here to the intrinsic variance would be incorrect. These are the other latent-variable updates of the formal Gibbs sampler.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 219 4 iii a Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-05
Use the abbreviations in (i). Keeping only terms involving in the joint kernel and completing the square givesConsequently the Gaussian latent-colour update isThese updates are conditionally independent given the remaining variables. The flat mean prior gives one more normal full conditional:The factorization uses . Together these are the normal draws in the formal Gibbs sampler.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 219 3 i c Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-05
. A periodic covariance function gives identical latent values one period apart: if is its period, . The smooth repeating P1 trace is therefore the appropriate match.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 219 3 i b Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-05
. This is a Gaussian kernel covariance. Near zero, , consistent with a finite mean-square derivative variance. The kernel has derivatives of every order, and the resulting Gaussian process admits a smooth version. P3 is smooth but does not repeat, unlike P1.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 219 3 i a Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-05
. The exponential covariance function gives a stationary Ornstein-Uhlenbeck process. At a small lag ,The variance of a difference quotient therefore diverges as , so the process has no mean-square derivative. Its continuous version has rough, nondifferentiable paths, matching the jagged P2 trace in the original PDF.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 216 3 b ii Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-05
Given the parameters and , the coordinates are conditionally independent. Write , , and let denote the observed count. Their full conditional distributions have scalar densitiesEach is proper: the binomial distribution likelihood factor is bounded, and the remaining factor is a proper normal distribution density.
One completely specified exact algorithm is rejection sampling from . DefineFor ,for or , take , and for take . Propose and accept with probability , repeating until acceptance. The accepted density is proportional to the proposal times , exactly . Its acceptance probability is positive, so it terminates almost surely, although it can be inefficient.
An efficient exact alternative is adaptive rejection sampling. The log density hasThus it is a log-concave probability density. Choose one tangent point with positive derivative in the left tail and one with negative derivative in the right tail; these exist because the Gaussian term dominates there. Their tangent upper hull gives an integrable piecewise exponential rejection envelope. Sample that envelope, accept using the target-to-envelope ratio, and add evaluated points to improve it. Concavity guarantees the upper bound, so accepted samples remain exact. Sample each coordinate independently by either method; a finite number of Metropolis steps would not provide the requested exact draws.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 216 3 b i Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-05
Use the printed parameterization , , and . Let , be the design matrix with rows , and . Conditional on and the parameters, contributes no extra dependence on by conditional independence.
The stationary autoregressive normal distribution has prior density proportional toIts Gaussian autoregressive conditional precision is the tridiagonal matrix withCombining this prior with and completing the square givesThe precision matrix is positive definite. Compute its lower Cholesky decomposition , solve , draw , and solve . Then return . This Gaussian sampling from a precision Cholesky factor is exact because . Tridiagonal structure gives linear cost in and preserves the conditional correlation between days. Notice that the solve uses , not .
These conditionals are normalized for every fixed positive , despite the joint posterior impropriety explained in part (a). If the intended model uses instead, replace the observation coefficient by throughout; the information and precision terms then use and .
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 214 1 b iii Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-05
We use the uniqueness of the infinite percolation cluster on : for , there is almost surely exactly one infinite percolation cluster, denoted . Fix and let . Two observations account for the possible distinct endpoints of the face connections.
First, the probability that some finite percolation cluster meeting reaches tends to zero as . There are only finitely many vertices in , and each of their finite percolation clusters has finite radius; apply the union bound and continuity from above of a measure.
Second, all vertices of are joined to one another inside with probability tending to one. On each configuration, this is a finite set of vertices of one connected percolation cluster. Choose a finite open path in a graph from one such vertex to each of the others; the union of these finitely many paths is contained in some finite box. The assertion is vacuous if the set is empty.
By part (b.ii), each of the two face-connection events within fails with probability at most . Outside the two exceptional events just described, their endpoints in belong to and can be joined inside . Concatenating the left-face path, that joining path, and the right-face path produces a crossing of . ConsequentlyNow let . Since ,The order of limits matters: is fixed while the finitely many relevant percolation clusters are connected inside increasingly large boxes.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 214 1 b ii Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-05
For each of the coordinate faces of , define the increasing event that an open path in a graph lying in joins to . Their union is exactly the event of connection from to within . The bond percolation law and the centered boxes are invariant under coordinate permutations and sign changes, so all events have the same probability.
Apply the square-root trick for positively associated events from part (a), with in place of the number of events. If , part (b.i) gives, for every ,In particular this holds for the left and right faces, and it proves the stronger statement in which each connecting path in a graph stays inside the outer box.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 214 1 b i Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-05
Put , the union of all infinite percolation clusters. Since , the percolation probability is positive. The translation ergodicity of Bernoulli percolation makes a zero-one event; it has positive probability because , hence it occurs almost surely.
Let . These events increase to , so continuity from below of a measure gives . On , some vertex of has an infinite open path in a graph. For every , the segment up to its first visit to lies entirely in . Thus even with this restriction on the connecting path in a graph,This proves the requested uniformity and supplies the version needed for crossings later.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 207 5 b vii Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-05
Insert the Breslow estimator into the fitted cumulative intensities and interchange the finite sums:Every observed event contributes exactly one after summing its fitted contribution over its risk set. ThereforeThis identity is algebraic and holds for any finite coefficient used consistently in the relative hazards and the Breslow estimator; it does not require the score equation to be solved exactly. It can fail if the baseline hazard is estimated or smoothed by a different procedure.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 207 5 b vi Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-05
Fit the Cox proportional-hazards model with the other explanatory variables, initially omitting the variable whose form is being assessed, and plot the resulting martingale residuals against . Add a smooth trend, for example using a cubic spline or a local smoother. A systematic pattern indicates that affects the hazard function; the shape helps suggest a linear term, a transformation, or a nonlinear spline term in the log hazard.
Refit with the proposed form and inspect martingale residuals against again. Under an adequate functional form, their conditional mean should have no systematic trend, allowing for model fitting and the other covariates. Compare plausible alternative forms using the partial likelihood and suitable model checks.
Use the smoothed pattern to assess the covariate's functional form, rather than treating these residuals as normal regression errors. Martingale residuals are asymmetric, bounded above by 1, and can be arbitrarily negative; the raw residual plot can therefore be misleading without smoothing. This diagnostic concerns the covariate form, and does not by itself test the proportional hazards assumption.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 207 5 b v Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-05
In the martingale residual is the observed event count up to the end of the individual's follow-up: 1 for a recorded event and 0 for right censoring. The second term is the fitted counting-process compensator, obtained by integrating that individual's fitted hazard function while they remain at risk:Thus the residual is observed events minus the fitted cumulative event intensity over follow-up. The fitted intensity is not an event probability and can exceed 1. Positive values indicate more events than predicted over that observed exposure; negative values indicate fewer. A right-censored individual has a nonpositive residual. With true model parameters and independent censoring, the underlying observed-minus-compensator process is a martingale; fitted terminal residuals are not independent identically distributed errors.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 207 5 b iv Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-05
In the Cox proportional-hazards model, replace the number at risk in the Nelson–Aalen estimator by the sum of relative hazards:The total event counting process has conditional rate , so the estimated baseline hazard increment is . Integrating gives the Breslow estimatorWhen , all relative hazards are 1 and this reduces to the Nelson–Aalen estimator. The denominator is positive at each observed event time.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 207 5 b iii Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-05
Within the risk set , the Cox proportional-hazards model makes the conditional failure probabilities proportional to . ThusThe score function sums observed minus expected covariates at event times. At a finite interior maximum of the Cox partial likelihood,The balance holds in aggregate, not separately at every event. The log partial likelihood is concave becauseWhen there is informative covariate variation in the risk sets, this gives a unique finite solution if it exists. A completely separated event pattern can instead have its maximum only as ; the question's finite implicitly excludes that case.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 207 5 b ii Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-05
Taking logarithms of the Cox partial likelihood givesDifferentiate each term, using the chain rule for the logarithm:This score function is the sum over failures of the observed covariate minus its current risk-weighted mean. Define that mean as ; observations with have no direct event term, although they occur in the relevant risk sets.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 207 5 b i Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-05
Let be the risk set at an observed event time . In the Cox proportional-hazards model, conditional on one member of this set failing then and on the preceding history, the probability that it is individual isThe baseline hazard cancels. Multiplying these conditional contributions gives the Cox partial likelihoodThe no-ties assumption avoids the need for a tied-event approximation. This construction assumes independent censoring conditional on the modelled covariates. The printed phrase calling a scalar parameter is read as a scalar observed covariate ; is the unknown regression parameter.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 207 4 c iv Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-05
At an added potential event time with no event and a nonempty risk set, , so maximum likelihood estimation gives . Its factor in the Kaplan–Meier estimator is therefore .
Adding or deleting such times also leaves the risk sets at actual event times unchanged: those depend on the observed event and censoring histories. Consequently the fitted survivor function depends only on observed event times and their risk sets. Beyond the last observed follow-up, the tail is not identified; the standard flat continuation is a convention, rather than an additional consequence of likelihood maximization.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 207 4 c iii Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-05
Let be the number of events at potential time and let be the size of the risk set immediately before that time, including observations censored at . Define the discrete conditional event probabilityUnder independent censoring, and ignoring the separate censoring distribution, the survival likelihood factorizes asThis follows by multiplying a survival factor for each individual at risk who does not fail at , and an event factor for each failure. The log factor is maximized at , with the corresponding boundary values when or .
The survival function is the product of successive conditional survival probabilities. ThereforeThis is the Kaplan–Meier estimator. A product over no event times is 1. If everyone remaining experiences an event, the product becomes zero and stays zero; subsequent empty risk sets supply no additional factor.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 207 4 c ii Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-05
The set must contain every observed event time. Otherwise a discrete survival likelihood would assign probability zero to at least one exact event observation.
The set can include additional times without observed events. Include time zero when events at zero are present, and allow remaining tail probability beyond the fitted range. Estimation of a conditional event mass requires a nonempty risk set; once follow-up ends, later probability masses are not identified by the data. The usual Kaplan–Meier estimator retains the final estimated survival probability as its tail convention.
Pinned article: Introduction to the OurBigBook Project
Welcome to the OurBigBook Project! Our goal is to create the perfect publishing platform for STEM subjects, and get university-level students to write the best free STEM tutorials ever.
Everyone is welcome to create an account and play with the site: ourbigbook.com/go/register. We belive that students themselves can write amazing tutorials, but teachers are welcome too. You can write about anything you want, it doesn't have to be STEM or even educational. Silly test content is very welcome and you won't be penalized in any way. Just keep it legal!
Intro to OurBigBook
. Source. We have two killer features:
- topics: topics group articles by different users with the same title, e.g. here is the topic for the "Fundamental Theorem of Calculus" ourbigbook.com/go/topic/fundamental-theorem-of-calculusArticles of different users are sorted by upvote within each article page. This feature is a bit like:
- a Wikipedia where each user can have their own version of each article
- a Q&A website like Stack Overflow, where multiple people can give their views on a given topic, and the best ones are sorted by upvote. Except you don't need to wait for someone to ask first, and any topic goes, no matter how narrow or broad
This feature makes it possible for readers to find better explanations of any topic created by other writers. And it allows writers to create an explanation in a place that readers might actually find it.Figure 1. Screenshot of the "Derivative" topic page. View it live at: ourbigbook.com/go/topic/derivativeVideo 2. OurBigBook Web topics demo. Source. - local editing: you can store all your personal knowledge base content locally in a plaintext markup format that can be edited locally and published either:This way you can be sure that even if OurBigBook.com were to go down one day (which we have no plans to do as it is quite cheap to host!), your content will still be perfectly readable as a static site.
- to OurBigBook.com to get awesome multi-user features like topics and likes
- as HTML files to a static website, which you can host yourself for free on many external providers like GitHub Pages, and remain in full control
Figure 2. You can publish local OurBigBook lightweight markup files to either OurBigBook.com or as a static website.Figure 3. Visual Studio Code extension installation.Figure 5. . You can also edit articles on the Web editor without installing anything locally. Video 3. Edit locally and publish demo. Source. This shows editing OurBigBook Markup and publishing it using the Visual Studio Code extension. - Infinitely deep tables of contents:
All our software is open source and hosted at: github.com/ourbigbook/ourbigbook
Further documentation can be found at: docs.ourbigbook.com
Feel free to reach our to us for any help or suggestions: docs.ourbigbook.com/#contact





