Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 206 2 b Solution Created 2026-10-03 Updated 2026-10-05
There are observations, since the intercept-only model has residual degrees of freedom. Adding price introduces one coefficient and decreases the binomial deviance by . Adding a three-level factor introduces two coefficients and decreases it by . Thus the missing entries areThe likelihood-ratio test comparing the smaller and full logistic regression tests against at least one nonzero layout contrast. Its statistic is . Under ordinary interior-parameter, full-rank and finite-estimate regularity conditions, Wilks theorem gives an asymptotic chi-squared distribution with two degrees of freedom. The reported p-value exceeds , so at that level retain the simpler price-only model.
The table is an analysis of deviance for nested generalized linear models: price is entered before layout. Thus its price row tests the price-only model against an intercept, whereas the layout row tests layout after allowing for price. The latter is the relevant comparison of model1 and model2. Failing to reject a layout effect is not proof that layouts have identical effects; it means these data do not justify the extra two parameters under this test.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 207 3 c iii Solution Created 2026-10-03 Updated 2026-10-05
Use one joint hypothesis test for . Fit the unrestricted model with statistical parameters , where and for treatment indicator . Refit under , estimating the two common baseline intensities; do not fix them at their unrestricted estimates. The likelihood-ratio test statistic isUnder regular identifiable positive-rate models, sufficient independent patient trajectories, and the null hypothesis, Wilks theorem gives two degrees of freedom because two coefficients are constrained. Reject if exceeds the chosen upper chi-squared distribution quantile. Alternatively a two-dimensional Wald test uses , including the off-diagonal covariance. Two separate tests do not provide this single calibrated assessment. The point estimates alone cannot produce a numerical p-value without fitted likelihoods or a coefficient covariance matrix.
Past exam of the mathematics course of the University of Cambridge 2017 ii Paper 4 27K b Solution Created 2026-09-24 Updated 2026-10-05
The pivot has independent standard normal coordinates, so has the chi-squared distribution with degrees of freedom. Let be its quantile. The confidence ellipsoidtherefore has exactly coverage for every . No large-sample approximation is required when the covariance is known.
Past exam of the mathematics course of the University of Cambridge 2017 ii Paper 4 27K d Solution Created 2026-09-24 Updated 2026-10-05
Use the convention that the likelihood ratio is maximized alternative likelihood divided by null likelihood. The alternative excludes zero, but its supremum agrees with the unrestricted maximum, even on the exceptional sample . Completing the square givesUnder the null, , so exactly for every . Equivalently is distributed as for . With the reciprocal likelihood-ratio convention the statistic is instead.
Wilks theorem predicts a limiting chi-squared distribution with degrees of freedom equal to the difference of parameter dimensions, here , under regularity and an interior null point of the unrestricted model. This example strengthens the asymptotic conclusion to an exact finite-sample identity.
Past exam of the mathematics course of the University of Cambridge 2018 ib Paper 3 20H Solution Created 2026-09-24 Updated 2026-10-03
Under the null hypothesis that treatment and recovery are independent, estimate each expected cell count byand form the Pearson chi-squared test of independence statistic . For a table its asymptotic null law is a chi-squared distribution with one degree of freedom. A second-order Taylor expansion of the generalized likelihood-ratio test statistic around the fitted counts gives this Pearson statistic, which explains its asymptotic null distribution.
Writing the four residuals over their fitted counts and simplifying givesFor ,whose one-degree-of-freedom p-value is about . There is no evidence of an effect. One fitted count is only , however, so the chi-squared approximation is questionable; Fisher's exact test would be preferable.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 205 3 Solution Created 2026-10-03 Updated 2026-10-05
For a diagonal entry, put . Independence and the given moment-generating function inequality for the chi-squared distribution giveThe Chernoff bound with yieldsApply the same argument to and sum the two tails:
To obtain the off-diagonal bound, set and . They are jointly normal with unit variances and covariance zero, so independence of uncorrelated jointly normal variables makes them independent standard normals. Since , the moment-generating function of the product of two independent standard normal random variables isFor , is a sum of independent such products. The given inequality implies for . Taking , and repeating for the negative tail, gives
Now take and . There are diagonal entries but only distinct off-diagonal entries, since is symmetric. By the union bound, the event has probability at leastThis is the required entrywise concentration of a Gaussian Gram matrix.
On that single event, any vector supported on at most coordinates satisfieswhere the last step is the Cauchy-Schwarz inequality on the support. If each have at most nonzero coordinates, has at most . The same entrywise event applies simultaneously to all of them, so no union over vectors is needed. The sparse norm preservation from entrywise Gram control givesThe printed ratio is undefined at . Its equivalent quadratic statement, , includes that case trivially. The nontrivial concentration argument assumes ; at the stated probability lower bound is nonpositive and hence vacuous.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 218 4 c Solution Created 2026-10-03 Updated 2026-10-05
Under a correctly specified Poisson regression with adequate expected counts, the residual Poisson deviance is approximately chi-squared distribution with residual degrees of freedom. The observed givesThus the ordinary Poisson model gives a very poor fit under this goodness-of-fit approximation. This is consistent with overdispersion, although a wrong mean model or dependence can also cause lack of fit; quasi-Poisson variance inflation alone does not establish that the mean model is adequate.
For Quasi-Poisson regression, . The Pearson dispersion estimator isIt uses squared Pearson residuals, not the residual deviance divided by 102. The fitted coefficients are unchanged, and their estimated covariance matrix is multiplied by . With , standard errors increase by , so the main treatment coefficient hasThe main Progabide coefficient is not significant at 5% after this dispersion adjustment. R uses a Student's t-distribution when dispersion is estimated, as described in its GLM summary documentation; the large-sample normal approximation also gives the same decision.
Because an interaction term is present, this tests the treatment contrast at baseline zero. An overall absence of treatment influence requires the joint null . The printed marginal standard errors do not give their covariance, so they are insufficient to calculate that joint Wald test, or the treatment contrast test at an arbitrary nonzero baseline.
Past exam of the mathematics course of the University of Cambridge 2018 ii Paper 1 5J Solution Created 2026-09-24 Updated 2026-10-03
Write for the request count on day . Both fits are Poisson regression models with independentIn model 1,where the variables are indicator variables for winter, weekend, bank holiday, and low or medium pollution; non-winter weekdays that are not bank holidays and have high pollution form the baseline. Model 2 imposesretaining only winter and weekend effects.
The models are nested, and the likelihood-ratio test statistic is the decrease in residual deviance,There are three restrictions. By Wilks theorem, under this statistic is asymptotically a chi-squared distribution with three degrees of freedom. Sincewe reject model 2 at the level in favour of model 1.
Past exam of the mathematics course of the University of Cambridge 2018 ii Paper 3 28K c Solution Created 2026-09-24 Updated 2026-10-03
If is the -quantile of the chi-squared distribution with degrees of freedom, an asymptotic confidence region isIn this known-identity-covariance model one may replace by ; then the confidence ball is exact. For an individual coordinate, the corresponding exact confidence interval is
Past exam of the mathematics course of the University of Cambridge 2018 ii Paper 3 5J Solution Created 2026-09-24 Updated 2026-10-03
Treat the cell counts as independent Poisson random variables. Under independence of Month and Hospital, the independence log-linear model for a two-way contingency table iswith no Month–Hospital interaction. Compare its Poisson deviance with the appropriate upper quantile of a chi-squared distribution. This is the likelihood-ratio test of independence in a contingency table.
The approximation assumes independent counts with correctly specified Poisson means, identifiable parameters, and sufficiently large fitted cell means for the asymptotic chi-squared law to be accurate. Equivalently, one may condition on the margins and use the corresponding multinomial sampling formulation.
For the month table there are cells and independent model parameters, so the residual degrees of freedom areSincemodel 1 does not reject Month–Hospital independence at the level.
After combining months into four quarters, the table is , givingdegrees of freedom. Nowso model 2 rejects Quarter–Hospital independence at the level.
There is no contradiction. Relabelling twelve months as four quarters aggregates the contingency table, changes the null hypothesis, and reduces the degrees of freedom. The quarter-level hospital pattern is coherent enough to cross the much lower six-degree-of-freedom threshold even though the more detailed month-level omnibus test does not. This is an instance of how aggregation can change a contingency-table independence test.
Past exam of the mathematics course of the University of Cambridge 2019 ib Paper 3 20H c iii Solution Created 2026-09-24 Updated 2026-09-29
Let denote the -quantile of the chi-squared distribution. Since , inversion of the central probability event givesas a confidence interval for .
Past exam of the mathematics course of the University of Cambridge 2020 ia Paper 1 12F c Solution Created 2026-09-24 Updated 2026-09-29
Since and a standard normal variable has second and fourth moments and ,Thus has the chi-squared distribution with degrees of freedom and
Convergence in distribution means that the cumulative distribution functions satisfy at every continuity point of . The Lévy continuity theorem states that this is equivalent to pointwise convergence of characteristic functions to the characteristic function of , provided the limiting function is continuous at zero.
For fixed , independence and a Gaussian integral giveUsing ,Therefore , the characteristic function of the standard normal distribution. Lévy's theorem now givesThis derives the limit directly, without assuming the central limit theorem.
Past exam of the mathematics course of the University of Cambridge 2020 ii Paper 2 28J Solution Created 2026-09-24 Updated 2026-09-29
PutThe log-likelihood, apart from an additive constant, isOver the full parameter space its maximum-likelihood estimates are . Under , maximizing over the nuisance parameter gives . Thus the generalized likelihood-ratio test statistic, in the convention , is
Under , the normal-sample decomposition givesWriting , the central limit theorem for a sum of squared independent standard normal variables yields . Hence Slutsky theorem givesand in particular .
For , Taylor theorem at givesConsequentlyby the continuous mapping theorem and Slutsky's theorem. Since the square of a standard normal variable has the chi-squared distribution with one degree of freedom,
Past exam of the mathematics course of the University of Cambridge 2022 iii Paper 225 2 a Solution Created 2026-09-28 Updated 2026-10-03
Under , the Hilbert-space central limit theorem giveswhere is a centered Gaussian random element with covariance . Distinct leading eigenvalues imply consistency of the empirical eigenvalues and eigenfunctions, up to irrelevant signs. The first standardized functional principal component scores of are independent variables, so Slutsky theorem yieldsAn asymptotic level- test rejects above the quantile of the chi-squared distribution.
Under a fixed alternative, put . The weak law of large numbers and eigenpair consistency giveThus the statistic diverges and the test is consistent whenever at least one retained projection is nonzero. A fixed alternative orthogonal to the first eigenfunctions is invisible to this fixed- statistic.
Past exam of the mathematics course of the University of Cambridge 2023 iii Paper 225 2 Solution 2026-09-28
Let be the ordered eigenpairs of the common covariance operator , and write . Estimate by the pooled covariance operatorand denote its first eigenpairs by . The sign ambiguity of each eigenfunction disappears after squaring. Consider the Two-sample FPCA mean statistic
Under , the Hilbert-space central limit theorem giveswhere is a centered Gaussian random element with covariance . The assumed eigenvalue gaps give consistency of the estimated eigenvalues and eigenfunctions, so Slutsky's theorem yieldsAn asymptotic level- test therefore rejects when exceeds the -quantile of the chi-squared distribution with degrees of freedom.
Under a fixed alternative,The test is consequently consistent whenever the mean difference has a nonzero projection onto one of the retained principal components. A difference orthogonal to their span is invisible to this fixed- test, so alone does not guarantee consistency. Increasing with can recover such alternatives, but requires additional eigenvalue and approximation control.
Past exam of the mathematics course of the University of Cambridge 2023 ii Paper 1 29K b Solution Created 2026-09-24 Updated 2026-09-25
The multivariate Wald statistic for a candidate parameter isReplacing by any consistent estimator of gives the same limit.
Under , part (a) and consistency of the information matrix imply, by Slutsky theorem, thatConsequentlyusing the characterization of the chi-squared distribution as the squared norm of a standard normal vector.
Past exam of the mathematics course of the University of Cambridge 2024 iii Paper 218 1 c Solution Created 2026-09-24 Updated 2026-09-25
The Pearson goodness-of-fit test has null hypothesis that the independent counts follow the fitted Poisson regression, in particular , against the alternative that the model does not fit; in this setting the scientifically relevant direction is overdispersion, . Under the null, is approximately chi-squared distribution with degrees of freedom. Its tiny -value decisively rejects the Poisson variance assumption.
The negative binomial regression keeps the logarithmic mean model but allows . It improves the residual deviance from to , close to its residual degrees of freedom, and lowers the Akaike information criterion from to . Both comparisons strongly favour the negative-binomial fit, although its dose coefficient remains statistically insignificant.
Past exam of the mathematics course of the University of Cambridge 2024 iii Paper 225 2 b Solution Created 2026-09-24 Updated 2026-10-03
Let be the leading eigenpairs of the sample covariance operator. For fixed with and , the FPCA mean test usesUnder the null, consistency of the empirical eigenpairs and the multivariate central limit theorem implyThe level- test therefore rejects above the quantile of the chi-squared distribution with degrees of freedom.
For a fixed mean , if at least one leading coordinate , , is nonzero, then in probability and the test is consistent. It has only null-level asymptotic power against means orthogonal to the first principal component functions. Under , the limit is noncentral chi-squared with noncentrality
For observed counts and positive expected counts in a contingency table, the statistic is . Under common category probabilities or statistical independence, estimate by the product of the row and column totals divided by the grand total. With large expected counts, this gives the test statistic for the Pearson chi-squared test of homogeneity or the Pearson chi-squared test of independence, with asymptotic chi-squared distribution on degrees of freedom.
Pearson chi-squared test of homogeneity 2026-10-06
The Pearson chi-squared test of homogeneity tests whether several independent categorical samples have the same category probabilities. Under the null, expected cell counts equal the product of the corresponding row and column totals divided by the total sample size. The Pearson chi-squared statistic for contingency tables has an asymptotic chi-squared distribution with degrees of freedom, when expected counts are sufficiently large. The sampling design differs from a Pearson chi-squared test of independence, though the statistic has the same form.