The terms involving give
Completing the square produces the truncated normal distribution
For , 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.
Use the abbreviations in (i). Keeping only terms involving in the joint kernel and completing the square gives
Consequently the Gaussian latent-colour update is
These 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.
. 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.
The original PDF has in the prefactor, not the TeX transcription's . It prints ; this kernel repeats at because . To parameterize the period itself by , use as below. The absolute value is immaterial inside the squared sine.
. 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.
. 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.
Given the parameters and , the coordinates are conditionally independent. Write , , and let denote the observed count. Their full conditional distributions have scalar densities
Each 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 . Define
For ,
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 has
Thus 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.
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 to
Its Gaussian autoregressive conditional precision is the tridiagonal matrix with
Combining this prior with and completing the square gives
The 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 .
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 . Consequently
Now let . Since ,
The order of limits matters: is fixed while the finitely many relevant percolation clusters are connected inside increasingly large boxes.
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.
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.
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. Therefore
This 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.
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.
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.
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 estimator
When , all relative hazards are 1 and this reduces to the Nelson–Aalen estimator. The denominator is positive at each observed event time.
Within the risk set , the Cox proportional-hazards model makes the conditional failure probabilities proportional to . Thus
The 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 because
When 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.
Taking logarithms of the Cox partial likelihood gives
Differentiate 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.
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 is
The baseline hazard cancels. Multiplying these conditional contributions gives the Cox partial likelihood
The 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.
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.
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 probability
Under independent censoring, and ignoring the separate censoring distribution, the survival likelihood factorizes as
This 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. Therefore
This 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.
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!
We have two killer features:
  1. 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-calculus
    Articles 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/derivative
  2. 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.
    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.
  3. https://raw.githubusercontent.com/ourbigbook/ourbigbook-media/master/feature/x/hilbert-space-arrow.png
  4. Infinitely deep tables of contents:
    Figure 6.
    Dynamic article tree with infinitely deep table of contents
    .
    Descendant pages can also show up as toplevel e.g.: ourbigbook.com/cirosantilli/chordate-subclade
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