Topics (266k) Articles (272k) Users (374) Discussions (237) Comments (384) Files (2k) New article
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 34 1 b Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-07
Multiplying the likelihood function by the Pareto distribution prior givesThe integral of this kernel is , so the normalized posterior distribution isThus it is . This proves uniform-Pareto conjugacy: applying Bayes theorem preserves the family of prior distributions.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 34 1 a Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-07
Each observation has uniform distribution density . Independence makes the likelihood function their product. For positive observations the support reduces to , givingFor data outside the positive orthant the likelihood is zero. Changing the convention at the endpoint does not change a continuous posterior distribution.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 32 7 iii Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-07
At each event time, a Schoenfeld residual is the observed event covariate minus its risk-set weighted mean:Under a correct constant-coefficient model, these event-time residuals have no systematic time trend. Plot scaled Schoenfeld residuals against time or a prespecified transformation such as log time, with smooth curves and uncertainty bands. Depending on the plotting convention, adding the fitted coefficient produces an estimate of ; a horizontal curve then supports a constant coefficient, while a clear trend suggests violation. Examine sparse late follow-up with its wider uncertainty.
Formal tests can use residual-time association or a proportional-hazards time interaction extension , testing jointly for a multi-parameter factor and globally across covariates. Evaluate at each current event/risk-set time: multiplying a baseline variable by that person's eventual observed follow-up time would use outcome information and would not be the intended time-dependent model. A nonsignificant test with limited information does not establish proportionality.
For categorical groups, approximately parallel empirical log-minus-log survival curves provide another check, because proportional hazards imply . Use observed group curves, not fitted proportional-hazards curves that are parallel by construction, and recognize possible confounding by other variables. If a violation is real, consider stratifying on a categorical nuisance variable, adding an explicitly time-varying effect, or choosing another survival-model family. Stratification allows separate baseline hazards but sacrifices a single estimated hazard ratio for that stratification variable. Do not force a constant coefficient merely to preserve the original model label; describe the time pattern or limit the interpretation of the constant summary.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 32 7 ii Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-07
The model is linear in each coded covariate on the log-hazard scale, not necessarily in the raw scientific variable. For a continuous variable , begin with plots and a scientifically plausible range of forms. Compare with a prespecified transformation such as when , or use a restricted cubic spline or fractional polynomial to represent a flexible smooth effect. Do not treat arbitrary integer category codes as a linear quantitative measurement without justification.
Plot martingale residuals from a suitable model against with a smooth trend. A residual pattern can suggest a missing or misspecified effect; these residuals are asymmetric, so the smooth relationship is more informative than judging normality. A model omitting helps reveal its overall shape; plots after including it help assess remaining misspecification. Partial-residual displays or fitted effect curves with uncertainty give complementary information.
Assess nonlinearity with a joint likelihood-ratio or score test for the nonlinear terms in a spline extension. The models containing only and only are generally nonnested, so a difference in their log-likelihoods is not automatically chi-squared. They can be compared by a justified nonnested criterion or validation, or embedded in a model containing both and and tested by dropping one term. Such an encompassing model may be highly collinear, and its coefficients should not be interpreted in isolation. If can be zero or negative, is undefined; choose an appropriate form rather than silently adding an arbitrary offset. Transformation choice is a question about the entire effect curve and its supported range, not only one coefficient's significance. Recheck time constancy after revising the functional form, since misspecification can mimic nonproportionality.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 32 7 i Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-07
Choose candidate variables from subject-matter knowledge, measurement quality and the target question before screening on outcomes. For an adjusted-effect analysis, retain prespecified confounders and essential design variables even when their individual values are large. For prediction, consider reliable predictors available at the intended prediction time; do not include future information. Handle missingness transparently, using a justified multiple imputation strategy where appropriate rather than changing the analyzed population unpredictably as variables enter.
Encode a categorical variable with indicators relative to a stated reference category, and assess it as a group. Check multicollinearity, sparse categories and plausible interactions. The relevant information is chiefly the number and distribution of events, not merely the number of enrolled subjects: hundreds of correlated or rarely varying predictors cannot be supported by a small event count.
Compare prespecified nested models by a likelihood-ratio test based on the partial log-likelihood and the change in parameter dimension. Penalized methods such as ridge regression or Lasso regression applied to the Cox likelihood can stabilize many-variable models; choose tuning by suitable validation and account for mandatory variables. The Akaike information criterion or a limited, documented model-selection procedure can help balance fit and complexity. Unrestricted stepwise searches and repeated univariable screening invite unstable choices, omit joint confounding effects, and make naive post-selection intervals misleading. Prefer a defensible, validated covariate set to a collection chosen only for small values.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 32 6 e Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-07
Add a stratum indicator that is “First” for the first episode and “Later” for every subsequent episode, including the final censored episode:
A Stratified Cox model then uses distinct baseline hazards and , with a common treatment coefficient unless an interaction is explicitly desired. Form separate risk sets within the two strata and multiply their partial likelihoods. There is no need to force every later event number to have its own baseline when the stated aim is only first versus subsequent headaches. This is a first-event versus recurrent-event baseline stratification.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 32 6 d Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-07
For second and subsequent episodes, subtract the preceding headache time from both calendar endpoints. The new clock is the age since the start of that headache, not the age since recovery ended. Keeping the recovery restriction from part (c) therefore gives
For example, the second stop is , while its entry is . Thus subsequent rows begin at gap age three, not zero. The first row retains time since treatment started. Keep the patient and episode labels, and preferably the original calendar endpoints as auxiliary fields: gap ages in different episodes are not chronological treatment times. The value 7.1 for episode three being smaller than 8.3 for episode two does not reverse their occurrence order. This gap-time recurrent-event model forms risk sets on the episode-age scale while preserving each episode's historical eligibility.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 32 6 c Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-07
Set the availability indicator to zero during the three-day recovery interval after each headache. Keep each episode's endpoint, but delay its entry to the previous headache time plus three. The calendar-time rows become
The first interval still begins at zero because the patient was already headache-free for at least seven days before treatment. The recovery gaps supply no at-risk exposure and no partial-likelihood risk-set membership; they should not be retained as ordinary event-free at-risk time. If recovery extends past administrative closure, no subsequent eligible interval is created. This is a refractory period in recurrent-event analysis, represented by availability rather than by changing the event times.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 32 6 b Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-07
The second episode starts only after the first headache, at 24.8; its row is absent from every risk set before that time. More generally, episode starts at the observed end of episode . The left-open, right-closed interval convention assigns an event at a shared boundary only to the interval ending there. Thus the first event is counted once, and the second cannot be counted before the first. Preserving the episode entry times and patient history enforces the ordering; entering every recurrence as a new record starting at treatment time zero would not do so.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 32 6 a Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-07
Use one row per consecutive at-risk episode, retaining a patient identifier for dependence and an episode number for event order. In calendar time, the intervals are ; status is one if the row ends in a headache and zero if it ends in censoring. Patient 001 contributes
The fifth episode is censored, not a fifth observed headache. All rows retain . This start-stop recurrent-event data layout corresponds to the counting-process intensity in survival analysiswhere indicates that the patient is currently observed and eligible for a headache. Fit the regression coefficient by Cox partial likelihood using the resulting risk sets, and estimate the baseline cumulative hazard nonparametrically, for example by the Breslow estimator. Patient rows are portions of one history, not new independent patients.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 32 5 ii Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-07
Keeping the event-free A individual under observation through day 193 leaves them in the risk set at both later B events. Now the calculations are
ThereforeThe negative score now indicates lower A event hazard, relative to B, in the contribution after day 160. The observed event counts have not changed. The change is in what events A was expected to contribute: its additional event-free exposure makes the two later B events informative comparisons, producing negative A score terms. No conclusion about the complete study's significance follows from this late contribution without the earlier scores and variances.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 32 5 i Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-07
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 32 4 b Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-07
Within month two, each individual contributes only the time spent at risk between times one and two. There are complete one-month contributions. The six event contributions are , and the censored contribution is . ConsequentlyThe month-specific likelihood factor in a piecewise-exponential survival model is , givingThe eight individuals no longer at risk at time one contribute no month-two exposure. Using either all 112 individuals or all 104 as full-month observations would give the wrong denominator.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 32 4 a Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-07
Assume independent censoring: the censoring mechanism contributes no factor involving the lifetime rate . The exponential density and survival function are and . An observed event contributes the density; a right-censored lifetime contributes the probability of surviving its censoring time. Thus the likelihood for , up to censoring factors independent of it, isFor and , vanishes at , and proves the maximum:Censored individuals add follow-up time to the denominator but no event to the numerator. If and , the likelihood decreases for and has only a supremum as ; zero is an extended boundary estimate, not a positive-rate exponential MLE. The derivation is for independent individuals entering at time zero; delayed entry would require conditional survival contributions and exposure measured from entry.
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





