Past exam of the mathematics course of the University of Cambridge 2012 iii Paper 37 3 c Solution Created 2026-10-03 Updated 2026-10-07
Compare the species-only model against the additive day-and-species model. The null hypothesis is , with the alternative that at least one is nonzero. The likelihood-ratio statistic is the reduction in residual deviance,Under the null hypothesis, regular binomial likelihood asymptotics give , because the larger model has two additional parameters. For this chi-squared distribution the upper-tail probability is . There is no evidence of a day effect after controlling for species, and the species-only model is a reasonable simpler choice. The sequential day-only statistic 0.273 from the preceding table answers a different question and must not replace this comparison.
Past exam of the mathematics course of the University of Cambridge 2012 iii Paper 37 4 b Solution Created 2026-10-03 Updated 2026-10-07
The saturated model estimates each Poisson mean separately as , permitting the boundary value zero when . Subtracting fitted from saturated log-likelihood gives the Poisson deviancewith . A zero observation contributes . If the model includes an intercept, the score equation gives , so the summed linear terms cancel; the unsimplified expression applies generally.
For goodness of fit, the null hypothesis is that the specified independent Poisson mean model is correct; the alternative is an unrestricted collection of means. When a quadratic likelihood approximation is valid, for example with fixed and large expected counts, has approximately a chi-squared distribution with statistical degrees of freedom. Reject for a large upper-tail deviance. Merely increasing the number of sparse observations does not make this saturated-model reference reliable: the alternative dimension also increases. With small fitted means, replication-based checks or a parametric bootstrap are more defensible. This qualification concerns the absolute goodness-of-fit deviance; a fixed-dimensional nested likelihood-ratio comparison can have a better chi-squared approximation.
Past exam of the mathematics course of the University of Cambridge 2012 iii Paper 38 3 i Solution Created 2026-10-03 Updated 2026-10-07
Squaring a variable with the standard normal distribution gives the required chi-squared distribution. Its two inverse images at are , so the change-of-variable formula givesDraw the branch-selection uniform variable independently of the randomness used for the normal draw. Then the pair has the product law: conditioning on leaves uniform. This independence is exactly what justifies interpreting the subsequent threshold as the conditional probability of selecting the smaller root.
Past exam of the mathematics course of the University of Cambridge 2012 iii Paper 41 4 Solution 2026-10-07
At each event time within a stratum, let be the group risk sets and let be the total number of observed failures. Under the null of equal hazard functions, the expected A count is . The log-rank statistic adds observed minus expected A counts over event times; the stratified log-rank statistic first makes these comparisons within each patient stratum, then adds across patients. Let be the sum of the corresponding null conditional variances. The standardized statistic has an approximate standard normal distribution under the null, and its square has an approximate one-degree-of-freedom chi-squared distribution. Compare it with the appropriate quantile for a two-sided test, under the usual independent censoring and exchangeability assumptions.
Past exam of the mathematics course of the University of Cambridge 2013 ib Paper 4 19H Solution Created 2026-09-24 Updated 2026-10-07
A sufficient statistic is one for which the conditional distribution of the full sample, given its value, is independent of the parameter. For independent observations the likelihood is , depending on the data only through the counts. The factorization criterion for sufficiency therefore makes sufficient. Directly, all ordered samples with given counts have the same probability, so their conditional distribution is uniform over the possible arrangements, independently of the .
The unrestricted maximum-likelihood estimator is . Thus the generalized likelihood-ratio test useswith zero-count terms interpreted by continuity. Reject for small , equivalently large .
Write , so . A Taylor series expansion of gives . Summing cancels the linear terms, and yieldsUnder the null hypothesis, the multinomial central limit theorem places the standardized count deviations in the five-dimensional subspace with coordinate sum zero, with identity covariance on that subspace. Their squared norm consequently tends to the chi-squared distribution with five degrees of freedom. This gives the Pearson chi-squared goodness-of-fit test.
For , the asymptotic p-value is about . The 5% critical value of is approximately . Do not reject at the usual 5% level, or at 10%. A significance level is not specified in the paper, so an unconditional yes-or-no decision is not determined: using this approximation, rejection would require a chosen level at least about .
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 30 4 c Solution Created 2026-10-03 Updated 2026-10-07
Allow each subject to have a separate baseline and slope through a correlated random-intercept and random-slope model:The subject random effects are independent of all measurement errors, and subjects are independent. The within-person covariance between times is , with an additional when the same reading is used twice.
Prefer the model with a random slope. The maximum likelihood estimation refits improve twice the log-likelihood by while adding two covariance statistical parameters. Both the Akaike information criterion ( to ) and Bayesian information criterion ( to ) strongly favour it. The printed nominal likelihood-ratio test is overwhelming. The usual reference chi-squared distribution with two statistical degrees of freedom is not an exact regular calibration, since zero slope variance is a boundary and the intercept–slope correlation is then unidentified; a design-specific parametric bootstrap could calibrate it. This qualification does not undermine the substantial descriptive improvement shown by both information criteria.
The preferred fit estimates population mean baseline strength kg and weekly gain kg/week. The between-person baseline standard deviation is kg, and the between-person slope standard deviation is kg/week. Their estimated correlation is weakly positive, giving random-effect covariance about kg/week; its uncertainty is not supplied. The measurement-error standard deviation is kg. The printed instead describes the correlation between the estimated fixed effects, not between the subject random effects. These statistical parameter estimates come from restricted maximum likelihood; the model comparison uses the separate maximum likelihood estimation fits.
The population mean fitted trajectory is kg. HenceUsing the reported slope standard error, an approximate 95% confidence interval for the population mean gain is kg; a Student t confidence interval with 499 statistical degrees of freedom is almost identical.
Successful individuals can improve far more than the average. Their latent ten-week gains have fitted normal distributionA clear estimate for an upper-performing group uses a between-person slope quantile: the 95th percentile is kg, and the 97.5th percentile is about kg. The upper 5% of fitted underlying gains begin around 73 kg. These are person-to-person performance quantiles, not confidence intervals for the population mean. Identifying the best observed trainee would require that person's data or fitted subject random effects; the aggregate output cannot identify a literal maximum. If performance means the observed difference of endpoint readings, add the measurement-error variance to the latent gain variance.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 30 5 b iii Solution Created 2026-10-03 Updated 2026-10-07
The cumulative-response logistic model uses instead of the two individual lag predictors. It and the two-lag history-dependent logistic regression are nonnested: the entire accumulated history generally cannot be represented using only the two recent outcomes. Their binomial deviance difference therefore has no ordinary nested chi-squared distribution calibration.
Use the Akaike information criterion, which up to the same saturated-model constant equals for these Bernoulli distribution conditional likelihoods. The two-lag fit has six coefficients, while the cumulative fit has five:Thus prefer the cumulative-history model, whose Akaike information criterion is lower by 35 despite its smaller number of statistical parameters. This is a model-selection comparison of conditional histories, not a nested likelihood-ratio test.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 30 5 b ii Solution Created 2026-10-03 Updated 2026-10-07
The second logistic regression adds while retaining the first lag and baseline covariates. The models are nested under . Their likelihood-ratio test statistic is the reduction in binomial deviance,Under the null and regular large-sample conditions for the correctly specified conditional likelihood, this has an approximate chi-squared distribution with one statistical degree of freedom. Since , reject at 5%; the approximate p-value is . Prefer the two-lag model to the one-lag model. Its additional lag captures statistically useful information in the history.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 30 5 b iv Solution Created 2026-10-03 Updated 2026-10-07
The preferred cumulative-response logistic model estimatesIts logit link describes conditional smoking-free probability given baseline predictors and prior successful weeks. Holding the other predictors fixed, males have times the female success odds; the reported p-value is , and the approximate 95% odds ratio confidence interval is . Age has estimated odds ratio per additional year, with p-value , giving little evidence for an age association in this fit.
The combined treatment has conditional success odds ratio versus the reference treatment, with approximate 95% confidence interval and p-value . The fitted conditional odds are about 39% higher for the combined treatment. The trial randomization supports treatment comparisons, but conditioning on accumulated post-treatment outcomes means this coefficient is not directly the marginal total treatment effect.
Each previous successful week multiplies current success odds by , with approximate 95% confidence interval and very small p-value . This is strong fitted persistence. It can reflect true state dependence, unobserved heterogeneity, or an omitted calendar-time trend; this fit alone cannot distinguish them. The baseline intercept implies success probability for a reference-treatment female aged zero with no previous success. That age is outside the study's useful interpretation range, so the intercept chiefly anchors the regression. The Bernoulli distribution dispersion parameter is fixed at one, and the residual binomial deviance is 1122 on 995 statistical degrees of freedom. With individual binary outcomes, comparing that binomial deviance mechanically to a chi-squared distribution is not a reliable general goodness-of-fit test.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 30 6 b iii Solution Created 2026-10-03 Updated 2026-10-07
Under , the seven free covariate coefficients all equal zero. The likelihood-ratio test statistic isThe larger fit has ten free statistical parameters, compared with three in the constant-rate fit, so the reference chi-squared distribution has seven statistical degrees of freedom. Its 95th percentile is . Therefore reject at 5%; the p-value is approximately , and the covariate model is preferred. The two constrained sex coefficients add no free statistical parameters.
For the dementia-to-death arrow, the hazard ratio for higher versus lower education is , with approximate 95% confidence interval . Thus higher education is associated with a roughly 77.5% lower fitted death transition intensity, conditional on diagnosis age; the interval excludes one. This is an observational association and is not a direct multiplicative statement about death probability.
Each additional year of age at diagnosis multiplies the dementia-to-death transition intensity by , with confidence interval . The estimate suggests an increase, but the interval includes one, so this individual age coefficient is not significant at 5%. Sex has hazard ratio one for this transition by the model's imposed constraint. The output supplies no estimated sex effect or test of that constraint for this arrow. The nonzero sex coefficient for must not be mistaken for a sex effect on .
Past exam of the mathematics course of the University of Cambridge 2014 ib Paper 2 8H Solution Created 2026-09-24 Updated 2026-10-06
Let and be the underlying full-recovery probabilities. The two-sided statistical hypothesis test isUse the Pearson chi-squared test of homogeneity for the two independent groups. Under , the pooled recovery estimate is , so each row has expected counts 28 recovered and 22 not recovered. All expected counts comfortably exceed five. The Pearson chi-squared statistic for contingency tables isThe asymptotic reference distribution is a chi-squared distribution with degree of freedom. Since , do not reject equal recovery probabilities at the 5% level. The observed recovery proportions, 0.50 and 0.62, do not provide statistically significant evidence of a difference in this trial. This conclusion does not prove that the procedures have identical recovery probabilities.
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 32 1 a i Solution Created 2026-10-03 Updated 2026-10-06
For a one-sided Wald test use the signed normal Wald statistic, rather than its square. The maximum-likelihood estimate is the sample mean , with exact variance , soA sum of independent normal random variables is normal, giving and hence . Under the null hypothesis its mean is zero:Thus its null distribution is exactly the standard normal distribution, without an asymptotic approximation. If the squared Wald statistic convention is used, has a chi-squared distribution with one degree of freedom; the signed form is needed to distinguish the two directions.
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 33 3 d Solution Created 2026-10-03 Updated 2026-10-06
For the gamma variance function, the Pearson dispersion estimator isusing residual degrees of freedom. Under a specified null dispersion , the scaled statistic based on squared Pearson residuals has an approximate distribution under the usual residual approximation.
Thus
test1 corresponds to , equivalently gamma shape , the exponential distribution. test2 corresponds to , equivalently shape . The null hypotheses concern dispersion or shape, not whether the regression coefficients vanish.The code computes lower-tail probabilities. Used as one-sided tests, the alternatives are and , respectively, equivalently shapes larger than one and three. At the 5% level the first null is rejected because the lower-tail probability is , while the second is not rejected because its probability is . If the intended alternatives are two-sided, , these displayed numbers must not be called two-sided p-values: doubling the smaller tail gives approximately and , with the same decisions. The chi-squared distribution approximation is not an exact finite-sample gamma identity.
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 35 4 h Solution Created 2026-10-03 Updated 2026-10-06
Conditional on , let and independently . The normal distribution with the stated precision parameter can be generated asThereforeby the defining normal distribution and chi-squared distribution representation of Student's t-distribution. Its density isThus is the location and is the scale, not the standard deviation: . Each study gets its own independent chi-squared draw in this Student t random-effect model.
Past exam of the mathematics course of the University of Cambridge 2015 iii Paper 35 2 f Solution Created 2026-10-03 Updated 2026-10-06
For an independent subgroup contrast in meta-analysis, the difference of disjoint independent subgroup estimates has estimated variance equal to the sum of the two variances. The subgroup contrast and standard error areThe Wald test of equal subgroup mean log odds ratios therefore givesUnder the null, is approximately standard normal and has a chi-squared distribution with one degree of freedom. A quantile-2 confidence interval for the difference is . There is no statistically persuasive evidence of a subgroup difference. The result does not establish equal effects. Nor does a between-trial subgroup comparison, by itself, identify a causal advantage of one technique: other study characteristics may differ.
Past exam of the mathematics course of the University of Cambridge 2016 ib Paper 1 7H Solution Created 2026-09-24 Updated 2026-10-06
Let . The likelihood ratio of rate two to rate one is , which decreases strictly with . By the Neyman-Pearson lemma, the most powerful test rejects for small values of the sum:Under the null, has the gamma distribution with shape and rate one. Thus is its -quantile, equivalently half the -quantile of the chi-squared distribution with degrees of freedom. The distribution is continuous, so boundary randomization is unnecessary for .
For every fixed alternative , the likelihood ratio against rate one is , again strictly decreasing. Therefore the same region is most powerful against every such alternative. Moreover, if has the shape-, rate-one gamma distribution, then at rate has the same distribution as . It follows that increases with , so the maximum rejection probability over is at one. Any competing size- test for the composite null is also of level at most at rate one, and is bounded in power by the Neyman-Pearson lemma for each alternative. The test is uniformly most powerful for the composite hypotheses as well. This is the uniformly most powerful test for an exponential rate based on the sample sum.
Past exam of the mathematics course of the University of Cambridge 2016 ib Paper 2 8H Solution Created 2026-09-24 Updated 2026-10-06
Under the null hypothesis the three outcome probabilities are the same in the two independent samples. The pooled row totals are , and both column totals are , out of a total of . Thus the expected counts in each column are . These exceed the usual small-count threshold for the asymptotic Pearson chi-squared test of homogeneity.
The Pearson chi-squared statistic for contingency tables isUnder the null, its asymptotic chi-squared distribution has degrees of freedom. Equivalently, the two independent three-category samples have four probability parameters unrestricted and two under the common-probability null. The upper-tail critical value is .
Since , do not reject the equal-effect hypothesis at the 1% level. For two degrees of freedom, the approximate p-value is , just above . This is a decision at the specified significance level, not evidence that the two outcome distributions have been proved identical.
Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 210 2 c Solution Created 2026-10-03 Updated 2026-10-06
Put and . Use the quadratic scan statistic and reject when . Under the null hypothesis, each has the chi-squared distribution with degrees of freedom. The chi-squared concentration inequality gives , by the union bound. Since , the proposed Type I error is at most .
For the true set , has the same chi-squared distribution. We need a lower-tail bound that remains positive even when is close to one. Set . The chi-squared Chernoff lower-tail bound gives : indeed for . To verify this last inequality, its derivative is ; the expression in parentheses is strictly concave, starts at zero, and changes sign once, so the minimum occurs at an endpoint, where the inequality holds.
The function is convex with , so on this interval. Consequently implies . Failure to reject then requires , giving Type II error at most , uniformly in . An explicit, deliberately conservative answer isThe sharp constant is unnecessary; the detection scale is .
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 206 2 a Solution Created 2026-10-03 Updated 2026-10-05
For independent random variables , the full logistic regression has linear predictorLayout A is the reference level in a regression factor. The smaller model sets , leaving the same logit link and the price predictor. In either caseThe saturated statistical model allows a separate probability per observation; its maximizing probabilities are , with log-likelihood zero under . Hence the binomial deviance for either fitted model isEquivalently, write the summands as . The fitted probabilities differ between the two models, but the definition of binomial deviance is the same. A residual deviance for individual binary data need not itself have an accurate chi-squared distribution approximation; the nested-model difference used next has a different asymptotic justification.