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 2009 iii Paper 38 4 Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-14
For the one-sided Wilcoxon rank sum test, suppose and are independent samples, iid within each sample, with continuous distributions. The null hypothesis is a common distribution. For a lower-tail alternative, the distribution is stochastically smaller. In the common-shape location model , this is against ; in that model it also compares medians. Without a location-family assumption, equality or inequality of medians alone is not the defining rank-sum hypothesis.
Rank all observations from smallest to largest and form . Reject for small . Under , the labels are exchangeable, so every subset of of the ranks is equally probable. The exact null distribution of a rank sum is thereforeEnumerate these subsets, or use the coefficient of in . An efficient recursion adds rank either to the selected sample or not: , starting with . The lower-tail P-value is . A nonrandomized level- test chooses a lower-tail rejection region whose null probability is at most .
The shifted Mann–Whitney U test statistic is . It counts pairs with , so the same lower-tail test uses small . The distinction is important for these S-Plus outputs: the printed values are raw rank sums, not the shifted statistic used by some other software.
For the one-sided Wilcoxon signed-rank test, the pairs are independent between individuals but their two measurements may be dependent. Let , and assume the differences are iid, continuous and symmetric about a common location . Test against . Rank the absolute differences and useUnder the null, conditional on their absolute values, the signs are independent fair signs. Every subset of ranks therefore has probability of being the positive-sign subset, giving the exact null distribution of . Reject for small and calculate the lower-tail probability. Its null mean and variance are and . The symmetry assumption is essential: zero median by itself does not give this law. With zeros or ties, omit zero differences in the usual signed-rank version and use average ranks for ties, adjusting the distribution accordingly. The paired test is not appropriate for the independent RHR samples here.
For the experienced participants, let denote RHR1 running time and denote RHR2 running time. The null hypothesis is identical running-time distributions; under the location interpretation it is zero RHR1-minus-RHR2 shift. The one-sided alternative is a negative shift, so RHR1 participants tend to run faster. With , the printed statistic isAt , reject the null in favour of faster RHR1 running times. The sample medians and minutes agree with that direction; their difference is descriptive, not the rank-sum test statistic.
For the new participants the same independent-sample Wilcoxon rank sum test compares eight RHR1 times against nine RHR2 times, again with a lower-tail alternative. HereThe exact null distribution of a rank sum gives this probability. It does not reject at , although it is just below . The data suggest the same direction but are less decisive; this is not evidence that the two new-participant distributions are equal.
The final command pools the experienced and new RHR1 samples into observations, and the corresponding RHR2 samples into . It repeats the lower-tail rank-sum comparison on these two pooled groups.
exact=F requests a normal approximation for a rank sum with a continuity correction. Without ties,The lower-tail statistic is , with the usual tie-adjusted variance if ties occur. The supplied output iswhere is the standard normal distribution function. Thus the pooled test rejects at . The unreported pooled ranks must be formed afresh: the within-cohort raw rank sums cannot simply be added because pooling introduces cross-cohort comparisons.Taken together, there is evidence that participants classified as RHR1 have shorter running times among the experienced men and in the pooled sample. The smaller new-participant samples give weaker evidence in the same direction. A significant result in one cohort and a nonsignificant result in another does not itself prove that their RHR effects differ. Pooling also assumes a meaningful pooled comparison; if programme duration changes the distributions, a cohort-adjusted analysis would be more informative. These observational comparisons do not establish that the fitness programme caused the differences, and none of the three tests directly compares experienced participants with new participants.
Past exam of the mathematics course of the University of Cambridge 2009 iii Paper 38 3 Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-14
Let be the disease count among miners in exposure group , with representative exposure , for . The grouped-binomial logistic regression isThe model assumes independent miners, a common disease probability within each group at its representative exposure, and binomial variation without an extra dispersion parameter. The use of average exposure is a grouping approximation, not a claim that every miner in a group has identical exposure. The input response is and
weights=miners supplies the binomial denominators , not inverse variances; together they yield this count likelihood function. The default binomial link is the logit link.For , the likelihood-ratio test compares the intercept-only model with the linear-exposure model. The reduction in binomial deviance isUnder the usual regular large-sample approximation it has a chi-squared distribution with one degree of freedom. There is very strong evidence of exposure dependence, with a positive estimated coefficient .
For goodness of fit against separate probabilities in all eight groups, the residual binomial deviance has approximately degrees of freedom. Its upper-tail probability is about , giving no evidence of lack of fit. This is an approximate check, particularly because the earliest exposure groups have small expected disease counts. It supports adequacy of this mean structure, not proof that all its assumptions or possible confounding variables have been addressed.
The
predict call asks for a prediction at exposure , sets type="response" to return the fitted probability rather than its log odds, and requests the standard error of that fitted probability. It givesFor , the linear predictor is , and the delta method givesThe intercept-slope covariance is included in this expression. This measures uncertainty in the fitted mean probability; it is not the standard deviation of a new individual's binary disease outcome or of an unspecified new sample proportion.The model's odds at exposure are . Hence , independently of . By invariance of maximum likelihood estimation, estimate this odds ratio by . A Wald confidence interval for is ; exponentiating its endpoints after multiplication by gives the interval for the multiplier. Using the printed coefficient and standard error yieldsThus the estimated odds rise by about per year, or by a factor about per decade. These are changes in odds, not fixed multiplicative changes in probabilities.
The second fit keeps the same independent binomial distributions but permits a quadratic linear predictor,In the sequential analysis, each exposure term adds one coefficient. With the first model's deviances, all nine missing entries are recovered in this completed table:The final reduction is , with rounding to the precision of the printed output. Testing therefore gives on one degree of freedom. At the significance level I would retain the simpler linear-exposure model: it already fits adequately and the extra curvature is not clearly established. The quadratic fit does improve the likelihood somewhat; its Akaike information criterion is about smaller, since . Thus different reasonable selection criteria may weakly prefer different models, but these data do not give strong evidence that the additional term is necessary.
Past exam of the mathematics course of the University of Cambridge 2009 iii Paper 38 2 Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-14
Work at a regular admissible parameter value with , so the score identities in the question apply. For one observation from the exponential dispersion family, the score function and second derivative areThe zero expected score immediately gives . The equality between expected negative curvature and score variance then givesThusThe admissible density parameters necessarily make this variance nonnegative; the algebra does not require an unstated sign assumption beyond the regular family and .
With independent observations and canonical parameters , the chain rule gives the vector score functionA finite interior maximum-likelihood estimator satisfies its score equation, provingDifferentiating again, using , givesThis Hessian is independent of the observations, so taking expectation gives exactly the requested Fisher information matrix. In particular, is not the inverse observation-variance matrix: the linear predictor here is the canonical parameter, not the mean.
For the two-group Poisson regression, , , and . Put , , using here for the second group's mean. There are observations, andHence the total Fisher information matrix and its inverse areThe theorem on asymptotic normality of a maximum likelihood estimator says that in a regular identifiable model with nonsingular information the estimator is approximately multivariate normal, centred at the true parameter and with covariance equal to the inverse total information. Here one can regard one observation from each group as an independent pair and apply its usual iid version to such pairs. ThereforeFor a direct check, the second score equation gives the fitted second-group mean , and the first then gives the fitted first-group mean . Thus the Poisson log-rate ratio estimate is . The delta method, using independent sample-mean variances and , gives the same variance . If a group total is zero, its finite log-mean estimator fails to exist; with fixed positive true means this event has probability tending to zero exponentially as grows.
Past exam of the mathematics course of the University of Cambridge 2009 iii Paper 38 1 Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-14
Let be the flight distance in millimetres for paper level , launch-angle level , design level and replicate , where and . The full factorial design is fitted by the normal linear modelThe assumptions are independent errors with a common variance and normal distribution, and the displayed factor-combination mean structure. The corner-point constraints areand whenever at least one index equals . Thus the eight free mean coefficients are . These treatment coding coefficients are comparisons at the other factors' reference levels, rather than necessarily averaged main effects.
To test the three-factor interaction term, compare the full model with the model retaining all main effects and all two-factor interactions. The null hypothesis is , against a nonzero value. Removing it increases the residual sum of squares by and removes one parameter. With eight residual degrees of freedom, the nested-model F-test givesThere is no evidence that this three-factor interaction is needed. This does not establish that all two-factor interactions vanish: the paper-design interaction is substantial.
The
stepAIC command performs stepwise selection by the Akaike information criterion. Its upper scope is the full factorial model and its lower scope is the intercept-only model. Starting from the full model, it compares admissible additions and deletions, preserving the hierarchy of interaction terms, and chooses changes that reduce the Akaike information criterion. With the supplied scope its default search permits both directions. For these Gaussian fits the displayed criterion, up to constants common to all models, is , where counts mean coefficients. The first deletion changes it from to : the small increase in residual sum of squares is outweighed by removing a parameter. This is a greedy model selection procedure, not an exhaustive search or a sequence of fixed-level hypothesis tests. The command's arguments are described in the MASS documentation.For the selected model, let and . Thenindependently between flights. It has no angle term. The maximum-likelihood estimates of its mean coefficients are also obtained by ordinary least squares:For example, the four fitted means are just the four paper-design cell means, each averaging four flights over the angle levels. With , the variance-covariance matrix of the coefficient estimates is . Its diagonal gives the displayed standard errors; their ratios are , with mm.
The final line of
summary(model2.lm) is the joint nested-model F-test of , comparing this four-parameter model with a common mean. Its statistic iswith F-distribution under the fixed-model null and P-value . Thus the selected paper-design terms jointly improve the fit substantially. The coefficient of determination means they account for about of the observed centred variation. These nominal inferential summaries do not adjust for the preceding model selection on the same data.Using the unrounded fitted means givesin millimetres. Hence choose the high-performance design with the lighter paper; the fitted model leaves both launch angles tied, with expected distance about mm. A preference for one angle is not supported by this selected model. The strong paper-design interaction reverses the design comparison: the simple design is better on heavy paper, whereas the high-performance design is better on light paper. Consequently a single design effect averaged over paper types would conceal the main result. There is little evidence here for an angle effect, and considerable flight-to-flight variability remains.
Before fitting, inspect raw-distance dot plots for all eight factor combinations, and interaction plots of cell means against design, with separate lines for paper and panels for angle. With only two replicates per cell, showing individual observations is more informative than elaborate box plots. These reveal reversals, spread and possible unusual flights. Afterwards inspect a residual-versus-fitted plot, a Q-Q plot of residuals, a scale-location plot, residuals against each factor and, if recorded, flight order, and Cook's distance for influential observations. Residual patterns by angle would question its deletion, while unequal spread or departures from the normal distribution would question the error assumptions rather than merely demand another mean term.
Past exam of the mathematics course of the University of Cambridge 2009 iii Paper 37 4 Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-14
Let the Bühlmann–Straub model structural parameters beHere is the variance of hypothetical means and is the expected process variance. Assume the structural second moments are finite and the exposures are positive, as required by this least-squares problem. Write . Conditional independence separates the squared prediction error into squared conditional bias and conditional variance. The law of total expectation givesIndeed, conditional on , the prediction has mean and variance ; there are no cross-covariances because the annual observations are conditionally independent.
For fixed slope coefficients the optimal intercept is . For fixed sum , the Cauchy-Schwarz inequality giveswith equality when . Thus the remaining minimization is the scalar quadraticDifferentiation gives . In the nondegenerate case , the quadratic is strictly convex and the equality condition determines the unique slope coefficients. The Bühlmann–Straub credibility factor and premium are thereforeandThis derives the Bühlmann–Straub credibility estimate from its minimization criterion. Increasing exposure increases the weight on experience; increasing process noise decreases it. No exposure for year appears because the estimate concerns the expected claim per car, not the variance of next year's observed average.
The degenerate cases have a direct interpretation. If and , the unknown conditional mean is the known constant , so take . If and , each observation already equals almost surely, so gives exact prediction. If both vanish, all observations and the target equal almost surely; use the constant predictor rather than the undefined ratio .
In the approximate normal model, , , , and . Substitution into the derived credibility estimate givesWe now derive, rather than assume, the Bayes estimator under squared error loss. For positive , the likelihood and normal distribution prior give a posterior density proportional toThe coefficient of is , and the coefficient in the linear term is . Completing the square proves the normal-normal conjugacy with unequal exposures formulawithFor any decision , the posterior quadratic loss isIts unique minimizer is the posterior mean . Hence the Bayesian and credibility estimates coincide exactly in this normal model:The reason is that the posterior mean is already affine in the observations, so restricting prediction to affine functions loses nothing. In the general Bühlmann–Straub model, the posterior mean need not be affine; the credibility estimate is then only the best affine squared-error predictor. The zero-variance limits of the normal formulas agree with the degenerate cases above.
Past exam of the mathematics course of the University of Cambridge 2009 iii Paper 37 3 Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-14
In the classical risk model, let be the Poisson process of claim arrivals, independent of the independent claim sizes. The reserve starts at and earns premiums continuously at rate , soHere is the ultimate ruin probability and is the survival probability. The relative safety loading is .
To derive the survival integro-differential equation, condition on the first claim time , which has the exponential distribution of rate . Immediately before that claim the available capital is . A claim leaves survival probability , since the future claim process restarts with the same independent law; a larger claim causes ruin immediately. The first-claim decomposition for survival probability is thereforePut and . Changing variables to yieldsThis representation justifies differentiation. The function is continuous: extend by zero to negative arguments, then use continuity of translations of the integrable density in to control its convolution with the bounded function . Differentiating the lower endpoint of the displayed integral gives . Since ,This deduction uses the first-arrival law rather than taking the desired differential equation as an assumption.
For , the claim law is an Erlang distribution of shape two and rate two. Its mean is . With , we have . Changing the convolution variable to givesHence the first requested specialization isLet . Differentiation under the finite integral gives and . Differentiating the preceding equation and using then givesThus the second identity isDifferentiate once more:The preceding second-derivative equation gives . Substitution cancels the undifferentiated terms and provesThis is the Erlang claim-size differential equation for survival probability with and .
Its characteristic polynomial factors as . The limit therefore makes the general bounded solutionThe supplied zero-capital survival probability is , so . We also need the initial derivative carried by the original integral equation: implies , giving . Solving gives and . Therefore the survival and ruin probabilities areThe extra initial derivative is essential: and the limit at infinity alone would leave one free parameter in the third-order equation. The result has and tends to zero. It is positive and decreasing, since for . These signs agree with its interpretation as an ultimate ruin probability.
Past exam of the mathematics course of the University of Cambridge 2009 iii Paper 37 2 Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-14
For excess of loss reinsurance with retention , the direct insurer caps its payment at and the reinsurer pays the excess. ThusLet and . These are independent Bernoulli random variables, independent of . Since , its conditional law given is a binomial distribution. Conditioning on therefore gives the Bernoulli thinning identityHere the probability generating function may be evaluated on , and the identity extends wherever the transforms converge.
The positive reinsurer marks have the conditional law . HenceThe independent-mark representation is justified as follows. Conditional on any fixed count and pattern of exceedance indicators, the positive excesses are independent with this same conditional law; that law depends neither on the number of exceedances nor on their locations. Averaging over the indicator pattern thus leaves the positive mark sequence independent of . We may extend it by additional independent copies if needed, giving with the stated independence.
Now write . For exponential distribution claim sizes of mean ,Thus is exponential with the original mean , by memorylessness of the exponential distribution. The original zero-based geometric distribution count has . ConsequentlyThis is the geometric count under Bernoulli thinning, withFinally use the Laplace transform of a nonnegative random variable, keeping the mass at zero. For ,The last expression is the transform of a mixture distribution: mass at zero and, with probability , an exponential distribution of rate . Uniqueness of the Laplace transform identifies this zero-based geometric sum of exponential variables:Equivalently, and its positive density is . Therefore the requested exceedance probability isThe prefactor is essential: the aggregate is zero whenever no claim crosses the retention.
Past exam of the mathematics course of the University of Cambridge 2009 iii Paper 37 1 a by
Codex 0 Created 2026-10-03 Updated 2026-10-14
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





